@carbon/vue 2.45.0 → 3.0.4-alpha.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/README.md +34 -264
- package/dist/carbon-vue-3.common.js +27392 -0
- package/dist/carbon-vue-3.common.js.map +1 -0
- package/dist/carbon-vue-3.umd.js +27403 -0
- package/dist/carbon-vue-3.umd.js.map +1 -0
- package/dist/carbon-vue-3.umd.min.js +17 -0
- package/dist/carbon-vue-3.umd.min.js.map +1 -0
- package/dist/demo.html +1 -34
- package/package.json +185 -62
- package/src/components/CvAccordion/CvAccordion.stories.js +54 -0
- package/src/components/CvAccordion/CvAccordion.vue +95 -0
- package/src/components/CvAccordion/CvAccordionItem.vue +101 -0
- package/src/components/{cv-accordion/cv-accordion-skeleton.vue → CvAccordion/CvAccordionSkeleton.vue} +14 -18
- package/src/components/CvAccordion/_CvAccordionItemSkeleton.vue +30 -0
- package/src/components/CvAccordion/consts.js +17 -0
- package/src/components/CvAccordion/index.js +6 -0
- package/src/components/CvAspectRatio/CvAspectRatio.stories.js +56 -0
- package/src/components/CvAspectRatio/CvAspectRatio.stories.scss +4 -0
- package/src/components/CvAspectRatio/CvAspectRatio.vue +33 -0
- package/src/components/CvAspectRatio/consts.js +2 -0
- package/src/components/CvAspectRatio/index.js +4 -0
- package/src/components/CvBreadcrumb/CvBreadcrumb.stories.js +75 -0
- package/src/components/CvBreadcrumb/CvBreadcrumb.vue +37 -0
- package/src/components/CvBreadcrumb/CvBreadcrumbItem.vue +28 -0
- package/src/components/CvBreadcrumb/CvBreadcrumbSkeleton.vue +29 -0
- package/src/components/CvBreadcrumb/CvBreadcrumbSkeletonItem.vue +14 -0
- package/src/components/CvBreadcrumb/index.js +11 -0
- package/src/components/CvButton/CvButton.stories.js +119 -0
- package/src/components/CvButton/CvButton.vue +68 -0
- package/src/components/CvButton/CvButtonCommon.js +75 -0
- package/src/components/CvButton/CvButtonSet.stories.js +36 -0
- package/src/components/CvButton/CvButtonSet.vue +30 -0
- package/src/components/CvButton/CvIconButton.stories.js +139 -0
- package/src/components/CvButton/CvIconButton.vue +88 -0
- package/src/components/CvButton/index.js +7 -0
- package/src/components/CvButton/sbBtnPrefix.js +2 -0
- package/src/components/CvCheckbox/CvCheckbox.stories.js +111 -0
- package/src/components/CvCheckbox/CvCheckbox.vue +73 -0
- package/src/components/CvCheckbox/index.js +3 -0
- package/src/components/CvCodeSnippet/CvCodeSnippet.stories.js +181 -0
- package/src/components/CvCodeSnippet/CvCodeSnippet.stories.scss +4 -0
- package/src/components/CvCodeSnippet/CvCodeSnippet.vue +125 -0
- package/src/components/CvCodeSnippet/CvCodeSnippetSkeleton.vue +43 -0
- package/src/components/CvCodeSnippet/_CviCodeSnippetInline.vue +72 -0
- package/src/components/CvCodeSnippet/_CviCodeSnippetMultiline.vue +199 -0
- package/src/components/CvCodeSnippet/_CviCodeSnippetOneline.vue +106 -0
- package/src/components/CvCodeSnippet/consts.js +2 -0
- package/src/components/CvCodeSnippet/index.js +4 -0
- package/src/components/CvComboBox/CvComboBox.stories.js +174 -0
- package/src/components/CvComboBox/CvComboBox.vue +460 -0
- package/src/components/CvComboBox/index.js +3 -0
- package/src/components/CvContentSwitcher/CvContentSwitcher.stories.mdx +196 -0
- package/src/components/CvContentSwitcher/CvContentSwitcher.vue +64 -0
- package/src/components/CvContentSwitcher/CvContentSwitcherButton.vue +117 -0
- package/src/components/CvContentSwitcher/CvContentSwitcherContent.vue +21 -0
- package/src/components/CvContentSwitcher/cvContentSwitcherStore.js +30 -0
- package/src/components/CvContentSwitcher/index.js +3 -0
- package/src/components/CvCopyButton/CvCopyButton.stories.js +28 -0
- package/src/components/CvCopyButton/CvCopyButton.vue +45 -0
- package/src/components/CvCopyButton/_CviCopyButton.vue +71 -0
- package/src/components/CvCopyButton/index.js +3 -0
- package/src/components/CvDataTable/CvDataTable.stories.mdx +304 -0
- package/src/components/CvDataTable/CvDataTable.vue +648 -0
- package/src/components/CvDataTable/CvDataTableAction.vue +22 -0
- package/src/components/CvDataTable/CvDataTableCell.vue +11 -0
- package/src/components/CvDataTable/CvDataTableHeading.vue +143 -0
- package/src/components/CvDataTable/CvDataTableRow.vue +139 -0
- package/src/components/CvDataTable/CvDataTableSkeleton.vue +48 -0
- package/src/components/CvDataTable/_CvDataTableRowInner.vue +169 -0
- package/src/components/CvDataTable/cvDataTableStore.js +340 -0
- package/src/components/CvDataTable/index.js +3 -0
- package/src/components/CvEmpty/_CvEmpty.vue +22 -0
- package/src/components/CvGrid/CvColumn.vue +85 -0
- package/src/components/CvGrid/CvGrid.vue +42 -0
- package/src/components/{cv-grid/cv-row.vue → CvGrid/CvRow.vue} +8 -12
- package/src/components/CvGrid/GvGrid.stories.mdx +217 -0
- package/src/components/CvGrid/_SbContainer.vue +22 -0
- package/src/components/CvGrid/_cvColumnValidation.js +48 -0
- package/src/components/CvLink/CvLink.stories.js +169 -0
- package/src/components/CvLink/CvLink.vue +38 -0
- package/src/components/CvLink/index.js +4 -0
- package/src/components/CvList/CvList.stories.js +88 -0
- package/src/components/CvList/CvList.vue +50 -0
- package/src/components/CvList/CvListItem.vue +12 -0
- package/src/components/CvList/index.js +4 -0
- package/src/components/CvLoading/CvLoading.stories.js +78 -0
- package/src/components/CvLoading/CvLoading.stories.scss +4 -0
- package/src/components/CvLoading/CvLoading.vue +106 -0
- package/src/components/CvLoading/index.js +4 -0
- package/src/components/CvNotification/CvInlineNotification.stories.js +109 -0
- package/src/components/CvNotification/CvInlineNotification.vue +102 -0
- package/src/components/CvNotification/CvToastNotification.stories.js +108 -0
- package/src/components/CvNotification/CvToastNotification.vue +88 -0
- package/src/components/CvNotification/consts.js +31 -0
- package/src/components/CvNotification/index.js +5 -0
- package/src/components/CvOverflowMenu/CvOverflowMenu.stories.mdx +119 -0
- package/src/components/CvOverflowMenu/CvOverflowMenu.vue +283 -0
- package/src/components/{cv-overflow-menu/cv-overflow-menu-item.vue → CvOverflowMenu/CvOverflowMenuItem.vue} +26 -20
- package/src/components/CvOverflowMenu/index.js +3 -0
- package/src/components/CvPagination/CvPagination.stories.mdx +160 -0
- package/src/components/CvPagination/CvPagination.vue +246 -0
- package/src/components/CvPagination/index.js +3 -0
- package/src/components/CvSelect/CvSelect.stories.mdx +227 -0
- package/src/components/CvSelect/CvSelect.vue +224 -0
- package/src/components/CvSelect/CvSelectOptgroup.vue +9 -0
- package/src/components/CvSelect/CvSelectOption.vue +22 -0
- package/src/components/CvSelect/index.js +3 -0
- package/src/components/CvSkeletonText/CvSkeletonText.stories.js +56 -0
- package/src/components/CvSkeletonText/CvSkeletonText.vue +63 -0
- package/src/components/CvSkeletonText/index.js +3 -0
- package/src/components/CvSvg/_CvSvg.vue +48 -0
- package/src/components/CvSvg/__tests__/_TestIcon.vue +19 -0
- package/src/components/CvSvg/__tests__/test-svg.svg +5 -0
- package/src/components/CvTag/CvTag.stories.js +64 -0
- package/src/components/CvTag/CvTag.vue +105 -0
- package/src/components/CvTag/consts.js +15 -0
- package/src/components/CvTag/index.js +5 -0
- package/src/components/CvUIShell/CvHeader.vue +203 -0
- package/src/components/CvUIShell/CvHeaderGlobalAction.vue +105 -0
- package/src/components/{cv-ui-shell/cv-header-menu.vue → CvUIShell/CvHeaderMenu.vue} +41 -37
- package/src/components/CvUIShell/CvHeaderMenuButton.vue +103 -0
- package/src/components/CvUIShell/CvHeaderMenuItem.vue +38 -0
- package/src/components/CvUIShell/CvHeaderName.vue +25 -0
- package/src/components/CvUIShell/CvHeaderNav.vue +18 -0
- package/src/components/CvUIShell/CvHeaderPanel.vue +106 -0
- package/src/components/CvUIShell/CvSideNav.vue +131 -0
- package/src/components/CvUIShell/CvSideNavIcon.vue +17 -0
- package/src/components/CvUIShell/CvSideNavItems.vue +22 -0
- package/src/components/CvUIShell/CvSideNavLink.vue +47 -0
- package/src/components/CvUIShell/CvSideNavMenu.vue +85 -0
- package/src/components/CvUIShell/CvSideNavMenuDivider.vue +7 -0
- package/src/components/CvUIShell/CvSideNavMenuItem.vue +31 -0
- package/src/components/CvUIShell/CvSkipToContent.vue +20 -0
- package/src/components/CvUIShell/CvSwitcher.vue +9 -0
- package/src/components/CvUIShell/CvSwitcherItem.vue +9 -0
- package/src/components/CvUIShell/CvSwitcherItemLink.vue +26 -0
- package/src/components/CvUIShell/CvUIShell.stories.mdx +454 -0
- package/src/components/{cv-ui-shell/_cv-side-nav-footer.vue → CvUIShell/_CvSideNavFooter.vue} +11 -15
- package/src/components/CvUIShell/_CvSideNavLinkText.vue +9 -0
- package/src/components/CvWrapper/CvWrapper.js +23 -0
- package/src/global/component-utils/event-bus.js +23 -0
- package/src/global/component-utils/validators.js +14 -0
- package/src/global/settings.js +5 -0
- package/src/global/storybook-utils/__tests__/story-source-code.js +162 -0
- package/src/global/storybook-utils/controls-from-props.js +72 -0
- package/src/global/storybook-utils/index.js +5 -0
- package/src/global/storybook-utils/sbCompPrefix.js +1 -0
- package/src/global/storybook-utils/split-slot-args.js +14 -0
- package/src/global/storybook-utils/story-source-code.js +52 -0
- package/src/index.js +13 -83
- package/src/use/components.js +24 -0
- package/src/use/cvCheck.js +94 -0
- package/src/use/cvId.js +57 -0
- package/src/use/cvLink.js +42 -0
- package/src/use/cvTheme.js +30 -0
- package/src/use/index.js +1 -0
- package/src/use/overflow.js +37 -0
- package/dist/carbon-vue.common.js +0 -23411
- package/dist/carbon-vue.common.js.map +0 -1
- package/dist/carbon-vue.umd.js +0 -23421
- package/dist/carbon-vue.umd.js.map +0 -1
- package/dist/carbon-vue.umd.min.js +0 -30
- package/dist/carbon-vue.umd.min.js.map +0 -1
- package/src/assets/images/component-icons.svg +0 -57
- package/src/assets/images/example-icon-svg.js +0 -10
- package/src/assets/images/example-icon.svg +0 -6
- package/src/assets/images/example-icons.svg +0 -6
- package/src/carbon.yml +0 -442
- package/src/components/cv-accordion/_cv-accordion-item-skeleton.vue +0 -29
- package/src/components/cv-accordion/cv-accordion-item.vue +0 -87
- package/src/components/cv-accordion/cv-accordion.vue +0 -59
- package/src/components/cv-accordion/index.js +0 -5
- package/src/components/cv-aspect-ratio/cv-aspect-ratio.vue +0 -28
- package/src/components/cv-aspect-ratio/index.js +0 -2
- package/src/components/cv-breadcrumb/_cv-breadcrumb-item-skeleton.vue +0 -13
- package/src/components/cv-breadcrumb/cv-breadcrumb-item.vue +0 -28
- package/src/components/cv-breadcrumb/cv-breadcrumb-skeleton.vue +0 -30
- package/src/components/cv-breadcrumb/cv-breadcrumb.vue +0 -21
- package/src/components/cv-breadcrumb/index.js +0 -5
- package/src/components/cv-button/button-mixin.js +0 -91
- package/src/components/cv-button/cv-button-set.vue +0 -17
- package/src/components/cv-button/cv-button-skeleton.vue +0 -12
- package/src/components/cv-button/cv-button.vue +0 -19
- package/src/components/cv-button/cv-icon-button.vue +0 -42
- package/src/components/cv-button/index.js +0 -6
- package/src/components/cv-checkbox/cv-checkbox-skeleton.vue +0 -15
- package/src/components/cv-checkbox/cv-checkbox.vue +0 -70
- package/src/components/cv-checkbox/index.js +0 -3
- package/src/components/cv-code-snippet/_cv-code-snippet-inline.vue +0 -39
- package/src/components/cv-code-snippet/_cv-code-snippet-multiline.vue +0 -79
- package/src/components/cv-code-snippet/_cv-code-snippet-oneline.vue +0 -47
- package/src/components/cv-code-snippet/cv-code-snippet-skeleton.vue +0 -30
- package/src/components/cv-code-snippet/cv-code-snippet.vue +0 -83
- package/src/components/cv-code-snippet/index.js +0 -3
- package/src/components/cv-combo-box/cv-combo-box.vue +0 -386
- package/src/components/cv-combo-box/index.js +0 -3
- package/src/components/cv-content-switcher/cv-content-switcher-button.vue +0 -104
- package/src/components/cv-content-switcher/cv-content-switcher-content.vue +0 -26
- package/src/components/cv-content-switcher/cv-content-switcher-store.js +0 -22
- package/src/components/cv-content-switcher/cv-content-switcher.vue +0 -117
- package/src/components/cv-content-switcher/index.js +0 -4
- package/src/components/cv-data-table/_cv-data-table-row-inner.vue +0 -139
- package/src/components/cv-data-table/cv-data-table-action.vue +0 -25
- package/src/components/cv-data-table/cv-data-table-cell.vue +0 -14
- package/src/components/cv-data-table/cv-data-table-heading.vue +0 -109
- package/src/components/cv-data-table/cv-data-table-row.vue +0 -113
- package/src/components/cv-data-table/cv-data-table-skeleton.vue +0 -64
- package/src/components/cv-data-table/cv-data-table.vue +0 -525
- package/src/components/cv-data-table/index.js +0 -8
- package/src/components/cv-date-picker/cv-date-picker.vue +0 -362
- package/src/components/cv-date-picker/index.js +0 -3
- package/src/components/cv-date-picker/plugins/appendToPlugin.js +0 -52
- package/src/components/cv-date-picker/plugins/fixEventsPlugin.js +0 -75
- package/src/components/cv-date-picker/plugins/monthSelectPlugin.js +0 -66
- package/src/components/cv-date-picker/plugins/rangePlugin.js +0 -45
- package/src/components/cv-dropdown/cv-dropdown-item.vue +0 -84
- package/src/components/cv-dropdown/cv-dropdown-skeleton.vue +0 -20
- package/src/components/cv-dropdown/cv-dropdown.vue +0 -373
- package/src/components/cv-dropdown/index.js +0 -5
- package/src/components/cv-feedback-button/_cv-feedback-button.vue +0 -74
- package/src/components/cv-file-uploader/consts.js +0 -12
- package/src/components/cv-file-uploader/cv-file-uploader-skeleton.vue +0 -22
- package/src/components/cv-file-uploader/cv-file-uploader.vue +0 -348
- package/src/components/cv-file-uploader/index.js +0 -5
- package/src/components/cv-form/cv-form-group.vue +0 -32
- package/src/components/cv-form/cv-form-item.vue +0 -13
- package/src/components/cv-form/cv-form.vue +0 -13
- package/src/components/cv-form/index.js +0 -5
- package/src/components/cv-grid/cv-column.vue +0 -77
- package/src/components/cv-grid/cv-grid.vue +0 -32
- package/src/components/cv-grid/index.js +0 -5
- package/src/components/cv-icon/_cv-icon.vue +0 -30
- package/src/components/cv-inline-loading/consts.js +0 -8
- package/src/components/cv-inline-loading/cv-inline-loading.vue +0 -91
- package/src/components/cv-inline-loading/index.js +0 -4
- package/src/components/cv-inline-notification/cv-inline-notification.vue +0 -89
- package/src/components/cv-inline-notification/index.js +0 -3
- package/src/components/cv-link/cv-link.vue +0 -30
- package/src/components/cv-link/index.js +0 -3
- package/src/components/cv-list/cv-list-item.vue +0 -13
- package/src/components/cv-list/cv-list.vue +0 -42
- package/src/components/cv-list/index.js +0 -4
- package/src/components/cv-loading/cv-loading.vue +0 -86
- package/src/components/cv-loading/index.js +0 -3
- package/src/components/cv-modal/cv-modal.vue +0 -295
- package/src/components/cv-modal/index.js +0 -2
- package/src/components/cv-multi-select/cv-multi-select.vue +0 -484
- package/src/components/cv-multi-select/index.js +0 -3
- package/src/components/cv-number-input/cv-number-input-skeleton.vue +0 -14
- package/src/components/cv-number-input/cv-number-input.vue +0 -215
- package/src/components/cv-number-input/index.js +0 -3
- package/src/components/cv-overflow-menu/cv-overflow-menu.vue +0 -253
- package/src/components/cv-overflow-menu/index.js +0 -4
- package/src/components/cv-pagination/cv-pagination.vue +0 -268
- package/src/components/cv-pagination/index.js +0 -2
- package/src/components/cv-progress/cv-progress-step.vue +0 -135
- package/src/components/cv-progress/cv-progress.vue +0 -82
- package/src/components/cv-progress/index.js +0 -4
- package/src/components/cv-radio-button/cv-radio-button.vue +0 -40
- package/src/components/cv-radio-button/cv-radio-group.vue +0 -24
- package/src/components/cv-radio-button/index.js +0 -4
- package/src/components/cv-search/cv-search.vue +0 -194
- package/src/components/cv-search/index.js +0 -2
- package/src/components/cv-select/cv-select-optgroup.vue +0 -14
- package/src/components/cv-select/cv-select-option.vue +0 -14
- package/src/components/cv-select/cv-select.vue +0 -158
- package/src/components/cv-select/index.js +0 -4
- package/src/components/cv-skeleton-text/cv-skeleton-text.vue +0 -64
- package/src/components/cv-skeleton-text/index.js +0 -2
- package/src/components/cv-slider/cv-slider-skeleton.vue +0 -22
- package/src/components/cv-slider/cv-slider.vue +0 -247
- package/src/components/cv-slider/index.js +0 -4
- package/src/components/cv-structured-list/_cv-structured-list-item-selectable.vue +0 -37
- package/src/components/cv-structured-list/_cv-structured-list-item-standard.vue +0 -13
- package/src/components/cv-structured-list/cv-structured-list-data.vue +0 -23
- package/src/components/cv-structured-list/cv-structured-list-heading.vue +0 -13
- package/src/components/cv-structured-list/cv-structured-list-item.vue +0 -46
- package/src/components/cv-structured-list/cv-structured-list.vue +0 -38
- package/src/components/cv-structured-list/index.js +0 -5
- package/src/components/cv-svg/_cv-svg.vue +0 -38
- package/src/components/cv-tabs/cv-tab.vue +0 -68
- package/src/components/cv-tabs/cv-tabs-skeleton.vue +0 -20
- package/src/components/cv-tabs/cv-tabs.vue +0 -410
- package/src/components/cv-tabs/index.js +0 -5
- package/src/components/cv-tag/cv-tag-skeleton.vue +0 -19
- package/src/components/cv-tag/cv-tag.vue +0 -121
- package/src/components/cv-tag/index.js +0 -4
- package/src/components/cv-text-area/cv-text-area.vue +0 -98
- package/src/components/cv-text-area/index.js +0 -2
- package/src/components/cv-text-input/cv-text-input.vue +0 -173
- package/src/components/cv-text-input/index.js +0 -2
- package/src/components/cv-tile/_cv-tile-clickable.vue +0 -22
- package/src/components/cv-tile/_cv-tile-expandable.vue +0 -92
- package/src/components/cv-tile/_cv-tile-selectable.vue +0 -48
- package/src/components/cv-tile/_cv-tile-standard.vue +0 -11
- package/src/components/cv-tile/cv-tile.vue +0 -83
- package/src/components/cv-tile/index.js +0 -2
- package/src/components/cv-time-picker/cv-time-picker.vue +0 -138
- package/src/components/cv-time-picker/index.js +0 -2
- package/src/components/cv-toast-notification/cv-toast-notification.vue +0 -72
- package/src/components/cv-toast-notification/index.js +0 -2
- package/src/components/cv-toggle/cv-toggle-skeleton.vue +0 -25
- package/src/components/cv-toggle/cv-toggle.vue +0 -52
- package/src/components/cv-toggle/index.js +0 -3
- package/src/components/cv-toolbar/cv-toolbar-divider.vue +0 -11
- package/src/components/cv-toolbar/cv-toolbar-option.vue +0 -16
- package/src/components/cv-toolbar/cv-toolbar-search.vue +0 -40
- package/src/components/cv-toolbar/cv-toolbar-title.vue +0 -14
- package/src/components/cv-toolbar/cv-toolbar.vue +0 -13
- package/src/components/cv-toolbar/index.js +0 -6
- package/src/components/cv-tooltip/consts.js +0 -2
- package/src/components/cv-tooltip/cv-definition-tooltip.vue +0 -44
- package/src/components/cv-tooltip/cv-interactive-tooltip.vue +0 -241
- package/src/components/cv-tooltip/cv-tooltip.vue +0 -44
- package/src/components/cv-tooltip/index.js +0 -6
- package/src/components/cv-ui-shell/_cv-side-nav-link-text.vue +0 -13
- package/src/components/cv-ui-shell/cv-content.vue +0 -16
- package/src/components/cv-ui-shell/cv-header-global-action.vue +0 -84
- package/src/components/cv-ui-shell/cv-header-menu-button.vue +0 -80
- package/src/components/cv-ui-shell/cv-header-menu-item.vue +0 -36
- package/src/components/cv-ui-shell/cv-header-name.vue +0 -18
- package/src/components/cv-ui-shell/cv-header-nav.vue +0 -18
- package/src/components/cv-ui-shell/cv-header-panel.vue +0 -72
- package/src/components/cv-ui-shell/cv-header-side-nav-items.vue +0 -21
- package/src/components/cv-ui-shell/cv-header.vue +0 -119
- package/src/components/cv-ui-shell/cv-side-nav-divider.vue +0 -12
- package/src/components/cv-ui-shell/cv-side-nav-icon.vue +0 -16
- package/src/components/cv-ui-shell/cv-side-nav-items.vue +0 -21
- package/src/components/cv-ui-shell/cv-side-nav-link.vue +0 -54
- package/src/components/cv-ui-shell/cv-side-nav-menu-item.vue +0 -30
- package/src/components/cv-ui-shell/cv-side-nav-menu.vue +0 -84
- package/src/components/cv-ui-shell/cv-side-nav.vue +0 -97
- package/src/components/cv-ui-shell/cv-skip-to-content.vue +0 -19
- package/src/components/cv-ui-shell/cv-switcher-item-link.vue +0 -26
- package/src/components/cv-ui-shell/cv-switcher-item.vue +0 -13
- package/src/components/cv-ui-shell/cv-switcher.vue +0 -13
- package/src/components/cv-ui-shell/index.js +0 -45
- package/src/components/cv-wrapper/_cv-wrapper.js +0 -33
- package/src/directives/clickout.js +0 -29
- package/src/index-components-vue.js +0 -5
- package/src/internal/feature-flags.js +0 -22
- package/src/mixins/carbon-prefix-mixin.js +0 -7
- package/src/mixins/check-mixin.js +0 -106
- package/src/mixins/index.js +0 -12
- package/src/mixins/link-mixin.js +0 -23
- package/src/mixins/methods-mixin.js +0 -18
- package/src/mixins/notification-mixin.js +0 -18
- package/src/mixins/radio-mixin.js +0 -36
- package/src/mixins/theme-mixin.js +0 -23
- package/src/mixins/uid-mixin.js +0 -23
- package/src/thumbnails/inline-notification.svg +0 -23
- package/src/thumbnails/skeleton-text.svg +0 -15
- package/src/thumbnails/toast-notification.svg +0 -34
- /package/src/components/{cv-button → CvButton}/consts.js +0 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<th
|
|
3
|
+
:aria-sort="internalOrder"
|
|
4
|
+
:style="skeleton && headingStyle"
|
|
5
|
+
:id="cvId"
|
|
6
|
+
ref="el"
|
|
7
|
+
>
|
|
8
|
+
<button
|
|
9
|
+
type="button"
|
|
10
|
+
v-if="sortable"
|
|
11
|
+
:class="[
|
|
12
|
+
`${carbonPrefix}--table-sort`,
|
|
13
|
+
{
|
|
14
|
+
[`${carbonPrefix}--table-sort--active`]:
|
|
15
|
+
internalOrder === 'descending',
|
|
16
|
+
[`${carbonPrefix}--table-sort--active ${carbonPrefix}--table-sort--ascending`]:
|
|
17
|
+
internalOrder === 'ascending',
|
|
18
|
+
},
|
|
19
|
+
]"
|
|
20
|
+
@click="onSortClick"
|
|
21
|
+
:style="headingStyle"
|
|
22
|
+
>
|
|
23
|
+
<component
|
|
24
|
+
:is="headingLabelTag"
|
|
25
|
+
:class="`${carbonPrefix}--table-header-label`"
|
|
26
|
+
>
|
|
27
|
+
<slot>{{ heading }}</slot>
|
|
28
|
+
</component>
|
|
29
|
+
<ArrowDown16 :class="`${carbonPrefix}--table-sort__icon`" />
|
|
30
|
+
<Arrows16 :class="`${carbonPrefix}--table-sort__icon-unsorted`" />
|
|
31
|
+
</button>
|
|
32
|
+
<component
|
|
33
|
+
v-else
|
|
34
|
+
:is="headingLabelTag"
|
|
35
|
+
:class="`${carbonPrefix}--table-header-label`"
|
|
36
|
+
:style="headingStyle"
|
|
37
|
+
>
|
|
38
|
+
<slot>{{ heading }}</slot>
|
|
39
|
+
</component>
|
|
40
|
+
</th>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script setup>
|
|
44
|
+
import ArrowDown16 from '@carbon/icons-vue/es/arrow--down/16';
|
|
45
|
+
import Arrows16 from '@carbon/icons-vue/es/arrows--vertical/16';
|
|
46
|
+
import CvEmpty from '../CvEmpty/_CvEmpty.vue';
|
|
47
|
+
import { props as propsCvId, useCvId } from '../../use/cvId';
|
|
48
|
+
import { carbonPrefix } from '../../global/settings';
|
|
49
|
+
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
|
50
|
+
import { getBus } from '../../global/component-utils/event-bus';
|
|
51
|
+
import store from './cvDataTableStore';
|
|
52
|
+
|
|
53
|
+
const nextOrder = {
|
|
54
|
+
ascending: 'descending',
|
|
55
|
+
descending: 'none',
|
|
56
|
+
none: 'ascending',
|
|
57
|
+
};
|
|
58
|
+
const props = defineProps({
|
|
59
|
+
dataStyle: Object,
|
|
60
|
+
heading: String,
|
|
61
|
+
name: String,
|
|
62
|
+
sortable: Boolean,
|
|
63
|
+
order: { type: String, default: 'none' },
|
|
64
|
+
skeleton: Boolean,
|
|
65
|
+
headingStyle: Object,
|
|
66
|
+
...propsCvId,
|
|
67
|
+
});
|
|
68
|
+
const cvId = useCvId(props, true);
|
|
69
|
+
const dataOrder = ref(props.order);
|
|
70
|
+
const parent = ref(null);
|
|
71
|
+
watch(
|
|
72
|
+
() => props.order,
|
|
73
|
+
() => {
|
|
74
|
+
if (dataOrder.value !== props.order) {
|
|
75
|
+
dataOrder.value = props.order;
|
|
76
|
+
store.updateHeading(parent, {
|
|
77
|
+
id: cvId.value,
|
|
78
|
+
order: dataOrder.value,
|
|
79
|
+
});
|
|
80
|
+
onSortClick();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
watch(
|
|
85
|
+
() => props.sortable,
|
|
86
|
+
() => {
|
|
87
|
+
store.updateHeading(parent, {
|
|
88
|
+
id: cvId.value,
|
|
89
|
+
sortable: props.sortable,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
let bus = undefined;
|
|
95
|
+
const el = ref(null);
|
|
96
|
+
onMounted(() => {
|
|
97
|
+
const pe = el.value.closest('.cv-data-table');
|
|
98
|
+
parent.value = pe?.getAttribute('id');
|
|
99
|
+
if (parent.value) bus = getBus(parent);
|
|
100
|
+
else console.warn('data table not found');
|
|
101
|
+
|
|
102
|
+
const exists = store.findHeading(parent, cvId);
|
|
103
|
+
if (exists)
|
|
104
|
+
console.error(
|
|
105
|
+
`CvDataTable: Duplicate ID specified for CvDataTableHeading, may cause issues. {id: ${cvId.value}, name: ${props.name}`
|
|
106
|
+
);
|
|
107
|
+
else
|
|
108
|
+
store.updateHeading(parent, {
|
|
109
|
+
id: cvId.value,
|
|
110
|
+
name: props.name,
|
|
111
|
+
order: dataOrder.value,
|
|
112
|
+
sortable: props.sortable,
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
onBeforeUnmount(() => {
|
|
117
|
+
store.removeHeading(parent, cvId);
|
|
118
|
+
});
|
|
119
|
+
function onSortClick() {
|
|
120
|
+
bus?.emit('cv:sort', {
|
|
121
|
+
heading: { id: cvId.value, name: props.name },
|
|
122
|
+
value: nextOrder[internalOrder.value],
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
const internalOrder = computed(() => {
|
|
126
|
+
if (!props.sortable) {
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
const heading = store.findHeading(parent, cvId);
|
|
130
|
+
if (heading?.order !== 'ascending' && heading?.order !== 'descending') {
|
|
131
|
+
return 'none';
|
|
132
|
+
} else {
|
|
133
|
+
return heading?.order;
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
const headingLabelTag = computed(() => {
|
|
138
|
+
// no tag if non-blank skeleton
|
|
139
|
+
return props.skeleton && props.heading && props.heading.length > 0
|
|
140
|
+
? CvEmpty
|
|
141
|
+
: 'span';
|
|
142
|
+
});
|
|
143
|
+
</script>
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<tbody
|
|
3
|
+
v-if="dataSomeExpandingRows"
|
|
4
|
+
class="cv-data-table-row cv-data-table-row--expandable"
|
|
5
|
+
:id="cvId"
|
|
6
|
+
>
|
|
7
|
+
<cv-data-table-row-inner
|
|
8
|
+
ref="row"
|
|
9
|
+
:rowId="cvId"
|
|
10
|
+
v-bind="$attrs"
|
|
11
|
+
:expanding-row="dataExpandable"
|
|
12
|
+
@expanded-change="onExpandedChange"
|
|
13
|
+
@checked-change="onCheckedChange"
|
|
14
|
+
:expanded="dataExpanded"
|
|
15
|
+
>
|
|
16
|
+
<slot />
|
|
17
|
+
</cv-data-table-row-inner>
|
|
18
|
+
<tr
|
|
19
|
+
v-if="dataExpandable"
|
|
20
|
+
:class="`${carbonPrefix}--expandable-row ${carbonPrefix}--expandable-row--hidden`"
|
|
21
|
+
data-child-row
|
|
22
|
+
>
|
|
23
|
+
<td colspan="999">
|
|
24
|
+
<div :class="`${carbonPrefix}--child-row-inner-container`">
|
|
25
|
+
<slot name="expandedContent" />
|
|
26
|
+
</div>
|
|
27
|
+
</td>
|
|
28
|
+
</tr>
|
|
29
|
+
</tbody>
|
|
30
|
+
<cv-data-table-row-inner
|
|
31
|
+
v-else
|
|
32
|
+
ref="row"
|
|
33
|
+
v-bind="$attrs"
|
|
34
|
+
class="cv-data-table-row"
|
|
35
|
+
:id="cvId"
|
|
36
|
+
:rowId="cvId"
|
|
37
|
+
@checked-change="onCheckedChange"
|
|
38
|
+
>
|
|
39
|
+
<slot />
|
|
40
|
+
</cv-data-table-row-inner>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script setup>
|
|
44
|
+
import { carbonPrefix } from '../../global/settings';
|
|
45
|
+
import { props as propsCvId, useCvId } from '../../use/cvId';
|
|
46
|
+
import CvDataTableRowInner from './_CvDataTableRowInner.vue';
|
|
47
|
+
import {
|
|
48
|
+
computed,
|
|
49
|
+
onBeforeUnmount,
|
|
50
|
+
onMounted,
|
|
51
|
+
onUpdated,
|
|
52
|
+
ref,
|
|
53
|
+
useAttrs,
|
|
54
|
+
useSlots,
|
|
55
|
+
watch,
|
|
56
|
+
} from 'vue';
|
|
57
|
+
import store from './cvDataTableStore';
|
|
58
|
+
import { getBus } from '../../global/component-utils/event-bus';
|
|
59
|
+
|
|
60
|
+
const props = defineProps({
|
|
61
|
+
expanded: Boolean,
|
|
62
|
+
...propsCvId,
|
|
63
|
+
});
|
|
64
|
+
const cvId = useCvId(props, true);
|
|
65
|
+
|
|
66
|
+
const dataExpandable = ref(false);
|
|
67
|
+
|
|
68
|
+
const attrs = useAttrs();
|
|
69
|
+
const slots = useSlots();
|
|
70
|
+
const row = ref(null);
|
|
71
|
+
const parent = ref(null);
|
|
72
|
+
let bus;
|
|
73
|
+
onMounted(() => {
|
|
74
|
+
const el = row.value?.$el;
|
|
75
|
+
const pe = el?.closest('.cv-data-table');
|
|
76
|
+
parent.value = pe?.getAttribute('id');
|
|
77
|
+
if (parent.value) {
|
|
78
|
+
bus = getBus(parent);
|
|
79
|
+
store.getTable(parent);
|
|
80
|
+
} else console.warn('data table not found');
|
|
81
|
+
|
|
82
|
+
dataExpandable.value = !!slots.expandedContent;
|
|
83
|
+
const exists = store.findRow(parent, cvId);
|
|
84
|
+
if (exists)
|
|
85
|
+
console.error(
|
|
86
|
+
`CvDataTable: Duplicate ID specified for CvDataTableRow, may cause issues. {id: ${cvId.value}, value: ${attrs.value}}`
|
|
87
|
+
);
|
|
88
|
+
else
|
|
89
|
+
store.updateRow(parent, {
|
|
90
|
+
id: cvId.value,
|
|
91
|
+
value: attrs.value,
|
|
92
|
+
expandable: dataExpandable.value,
|
|
93
|
+
isExpanded: props.expanded,
|
|
94
|
+
isChecked: false,
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
onUpdated(() => {
|
|
98
|
+
const curr = dataExpandable.value;
|
|
99
|
+
dataExpandable.value = !!slots.expandedContent;
|
|
100
|
+
if (dataExpandable.value !== curr)
|
|
101
|
+
store.updateRow(parent, {
|
|
102
|
+
id: cvId.value,
|
|
103
|
+
expandable: dataExpandable.value,
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
onBeforeUnmount(() => {
|
|
107
|
+
store.removeRow(parent, cvId);
|
|
108
|
+
});
|
|
109
|
+
const dataExpanded = computed(() => {
|
|
110
|
+
return Boolean(props.expanded || store.isRowExpanded(parent, cvId));
|
|
111
|
+
});
|
|
112
|
+
watch(
|
|
113
|
+
() => props.expanded,
|
|
114
|
+
() => {
|
|
115
|
+
store.updateRow(parent, {
|
|
116
|
+
id: cvId.value,
|
|
117
|
+
isExpanded: props.expanded,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
const dataSomeExpandingRows = computed(() => {
|
|
122
|
+
return store.someExpandingRows(parent);
|
|
123
|
+
});
|
|
124
|
+
function onExpandedChange(val) {
|
|
125
|
+
const row = store.findRow(parent, cvId);
|
|
126
|
+
store.updateRow(parent, {
|
|
127
|
+
id: cvId.value,
|
|
128
|
+
isExpanded: val,
|
|
129
|
+
});
|
|
130
|
+
bus?.emit('cv:expanded-change', row);
|
|
131
|
+
}
|
|
132
|
+
function onCheckedChange(val) {
|
|
133
|
+
store.updateRow(parent, {
|
|
134
|
+
id: cvId.value,
|
|
135
|
+
isChecked: val,
|
|
136
|
+
});
|
|
137
|
+
bus?.emit('cv:check-change', { value: attrs.value, checked: val });
|
|
138
|
+
}
|
|
139
|
+
</script>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<cv-data-table skeleton :data="data" :columns="cols" v-bind="$attrs">
|
|
3
|
+
<template v-if="hasHelperText" v-slot:helper-text>
|
|
4
|
+
<slot name="helper-text" />
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<template v-if="hasBatchActions" v-slot:batch-actions>
|
|
8
|
+
<slot name="batch-actions" />
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<template v-if="hasActions" v-slot:actions>
|
|
12
|
+
<slot name="actions" />
|
|
13
|
+
</template>
|
|
14
|
+
</cv-data-table>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script setup>
|
|
18
|
+
import CvDataTable from './CvDataTable.vue';
|
|
19
|
+
import { computed, onMounted, onUpdated, ref, useSlots } from 'vue';
|
|
20
|
+
|
|
21
|
+
const props = defineProps({
|
|
22
|
+
columns: { type: [Array, Number], default: 5 },
|
|
23
|
+
rows: { type: Number, default: 5 },
|
|
24
|
+
});
|
|
25
|
+
const hasActions = ref(false);
|
|
26
|
+
const hasHelperText = ref(false);
|
|
27
|
+
const hasBatchActions = ref(false);
|
|
28
|
+
const slots = useSlots();
|
|
29
|
+
function checkSlots() {
|
|
30
|
+
// NOTE: slots is not reactive so needs to be managed on updated
|
|
31
|
+
hasBatchActions.value = !!slots['batch-actions'];
|
|
32
|
+
hasHelperText.value = !!slots['helper-text'];
|
|
33
|
+
hasActions.value = !!slots['actions'];
|
|
34
|
+
}
|
|
35
|
+
onMounted(checkSlots);
|
|
36
|
+
onUpdated(checkSlots);
|
|
37
|
+
|
|
38
|
+
const data = computed(() => {
|
|
39
|
+
return [...Array(Math.max(props.rows, 1))].map(() =>
|
|
40
|
+
Array(cols.value.length).fill('')
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
const cols = computed(() => {
|
|
44
|
+
return typeof props.columns !== 'number'
|
|
45
|
+
? props.columns
|
|
46
|
+
: Array(Math.max(props.columns, 1)).fill('');
|
|
47
|
+
});
|
|
48
|
+
</script>
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<tr
|
|
3
|
+
ref="el"
|
|
4
|
+
class="cv-data-table-row-inner"
|
|
5
|
+
:class="{
|
|
6
|
+
[`${carbonPrefix}--parent-row`]: expandingRow,
|
|
7
|
+
[`${carbonPrefix}--expandable-row`]: dataExpanded,
|
|
8
|
+
}"
|
|
9
|
+
>
|
|
10
|
+
<td
|
|
11
|
+
v-if="dataSomeExpandingRows"
|
|
12
|
+
:class="`${carbonPrefix}--table-expand`"
|
|
13
|
+
:data-previous-value="dataExpanded ? 'collapsed' : 'expanded'"
|
|
14
|
+
>
|
|
15
|
+
<button
|
|
16
|
+
v-if="expandingRow"
|
|
17
|
+
:class="`${carbonPrefix}--table-expand__button`"
|
|
18
|
+
@click="toggleExpand"
|
|
19
|
+
type="button"
|
|
20
|
+
:aria-label="dataExpanded ? ariaLabelCollapseRow : ariaLabelExpandRow"
|
|
21
|
+
>
|
|
22
|
+
<ChevronRight16 :class="`${carbonPrefix}--table-expand__svg`" />
|
|
23
|
+
</button>
|
|
24
|
+
<div v-else>{{ expandingRow }}</div>
|
|
25
|
+
</td>
|
|
26
|
+
<td
|
|
27
|
+
v-if="hasBatchActions"
|
|
28
|
+
:class="`${carbonPrefix}--table-column-checkbox`"
|
|
29
|
+
>
|
|
30
|
+
<cv-checkbox
|
|
31
|
+
:form-item="false"
|
|
32
|
+
:value="value"
|
|
33
|
+
:inline="true"
|
|
34
|
+
v-model="dataChecked"
|
|
35
|
+
@change="onChange"
|
|
36
|
+
ref="rowChecked"
|
|
37
|
+
:label="
|
|
38
|
+
ariaLabelForBatchCheckbox || `Select row ${value} for batch action`
|
|
39
|
+
"
|
|
40
|
+
hideLabel
|
|
41
|
+
/>
|
|
42
|
+
</td>
|
|
43
|
+
<slot />
|
|
44
|
+
<td v-if="hasOverflowMenu" :class="`${carbonPrefix}--table-column-menu`">
|
|
45
|
+
<cv-overflow-menu v-bind="overflowMenuOptions">
|
|
46
|
+
<cv-overflow-menu-item
|
|
47
|
+
v-for="(item, index) in overflowMenuButtons"
|
|
48
|
+
:key="`${index}`"
|
|
49
|
+
@click="
|
|
50
|
+
onMenuItemClick({
|
|
51
|
+
rowValue: value,
|
|
52
|
+
menuIndex: index,
|
|
53
|
+
menuLabel: item,
|
|
54
|
+
})
|
|
55
|
+
"
|
|
56
|
+
>{{ item }}</cv-overflow-menu-item
|
|
57
|
+
>
|
|
58
|
+
</cv-overflow-menu>
|
|
59
|
+
</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
<script setup>
|
|
64
|
+
import { carbonPrefix } from '../../global/settings';
|
|
65
|
+
import CvCheckbox from '../CvCheckbox';
|
|
66
|
+
import CvOverflowMenu from '../CvOverflowMenu';
|
|
67
|
+
import CvOverflowMenuItem from '../CvOverflowMenu/CvOverflowMenuItem.vue';
|
|
68
|
+
import ChevronRight16 from '@carbon/icons-vue/es/chevron--right/16';
|
|
69
|
+
import { computed, onMounted, onUpdated, ref, useSlots, watch } from 'vue';
|
|
70
|
+
import store from './cvDataTableStore';
|
|
71
|
+
import { getBus } from '../../global/component-utils/event-bus';
|
|
72
|
+
|
|
73
|
+
const props = defineProps({
|
|
74
|
+
ariaLabelForBatchCheckbox: String,
|
|
75
|
+
checked: Boolean,
|
|
76
|
+
expanded: Boolean,
|
|
77
|
+
expandingRow: Boolean,
|
|
78
|
+
ariaLabelExpandRow: { type: String, default: 'Expand current row' },
|
|
79
|
+
ariaLabelCollapseRow: { type: String, default: 'Collapse current row' },
|
|
80
|
+
overflowMenu: Array,
|
|
81
|
+
value: String,
|
|
82
|
+
rowId: String,
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const dataSomeExpandingRows = computed(() => {
|
|
86
|
+
return store.someExpandingRows(parent);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
const overflowMenuButtons = computed(() => {
|
|
90
|
+
return props.overflowMenu.filter(item => typeof item === 'string');
|
|
91
|
+
});
|
|
92
|
+
const overflowMenuOptions = computed(() => {
|
|
93
|
+
const incomingOptions =
|
|
94
|
+
props.overflowMenu.find(item => typeof item === 'object') || {};
|
|
95
|
+
const defaultOptions = {
|
|
96
|
+
flipMenu: true,
|
|
97
|
+
label: 'Row overflow menu',
|
|
98
|
+
tipPosition: 'left',
|
|
99
|
+
};
|
|
100
|
+
return { ...defaultOptions, ...incomingOptions };
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
const slots = useSlots();
|
|
104
|
+
const hasOverflowMenu = ref(false);
|
|
105
|
+
function checkSlots() {
|
|
106
|
+
// NOTE: this.$slots is not reactive so needs to be managed on updated
|
|
107
|
+
hasOverflowMenu.value = !!(
|
|
108
|
+
(props.overflowMenu && props.overflowMenu.length) ||
|
|
109
|
+
slots['overflow-menu']
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
onMounted(checkSlots);
|
|
113
|
+
onUpdated(checkSlots);
|
|
114
|
+
|
|
115
|
+
const el = ref(null);
|
|
116
|
+
const parent = ref(null);
|
|
117
|
+
let bus;
|
|
118
|
+
onMounted(() => {
|
|
119
|
+
const pe = el.value.closest('.cv-data-table');
|
|
120
|
+
parent.value = pe?.getAttribute('id');
|
|
121
|
+
if (parent.value) {
|
|
122
|
+
store.getTable(parent);
|
|
123
|
+
bus = getBus(parent);
|
|
124
|
+
} else console.warn('data table not found');
|
|
125
|
+
});
|
|
126
|
+
const hasBatchActions = computed(() => {
|
|
127
|
+
return store.hasBatchActions(parent);
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
function onMenuItemClick(val) {
|
|
131
|
+
bus.emit('cv:click', val);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const emit = defineEmits(['expanded-change', 'checked-change']);
|
|
135
|
+
const dataExpanded = ref(props.expanded);
|
|
136
|
+
watch(
|
|
137
|
+
() => props.expanded,
|
|
138
|
+
() => {
|
|
139
|
+
dataExpanded.value = props.expanded;
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
function toggleExpand() {
|
|
143
|
+
dataExpanded.value = !dataExpanded.value;
|
|
144
|
+
emit('expanded-change', dataExpanded.value);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const dataChecked = ref(props.checked);
|
|
148
|
+
function onChange() {
|
|
149
|
+
emit('checked-change', dataChecked.value);
|
|
150
|
+
}
|
|
151
|
+
watch(
|
|
152
|
+
() => props.checked,
|
|
153
|
+
() => {
|
|
154
|
+
dataChecked.value = props.checked;
|
|
155
|
+
emit('checked-change', dataExpanded.value);
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
watch(
|
|
159
|
+
() => store.state[parent.value]?.rows,
|
|
160
|
+
() => {
|
|
161
|
+
const row = store.findRow(parent, props.rowId);
|
|
162
|
+
const isChecked = row?.isChecked;
|
|
163
|
+
if (isChecked !== undefined) {
|
|
164
|
+
dataChecked.value = isChecked;
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{ deep: true }
|
|
168
|
+
);
|
|
169
|
+
</script>
|