@gravity-ui/querieskit 1.2.0 → 1.3.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/.agents/skills/code-review-checklist/SKILL.md +62 -103
- package/AGENTS.md +12 -0
- package/CHANGELOG.md +17 -0
- package/CODEOWNERS +2 -1
- package/build/cjs/components/AttachmentList/AttachmentList.css +22 -0
- package/build/cjs/components/AttachmentList/AttachmentList.css.map +1 -0
- package/build/cjs/components/AttachmentList/AttachmentList.d.ts +17 -0
- package/build/cjs/components/AttachmentList/AttachmentList.js +75 -0
- package/build/cjs/components/AttachmentList/AttachmentList.js.map +1 -0
- package/build/cjs/components/AttachmentList/AttachmentList.stories.d.ts +93 -0
- package/build/cjs/components/AttachmentList/AttachmentList.stories.js +323 -0
- package/build/cjs/components/AttachmentList/AttachmentList.stories.js.map +1 -0
- package/build/cjs/components/AttachmentList/helpers/getIconByAttachmentName.d.ts +2 -0
- package/build/cjs/components/AttachmentList/helpers/getIconByAttachmentName.js +36 -0
- package/build/cjs/components/AttachmentList/helpers/getIconByAttachmentName.js.map +1 -0
- package/build/cjs/components/AttachmentList/helpers/objectLinkValidator.d.ts +11 -0
- package/build/cjs/components/AttachmentList/helpers/objectLinkValidator.js +30 -0
- package/build/cjs/components/AttachmentList/helpers/objectLinkValidator.js.map +1 -0
- package/build/cjs/components/AttachmentList/helpers/stringRequiredValidator.d.ts +2 -0
- package/build/cjs/components/AttachmentList/helpers/stringRequiredValidator.js +26 -0
- package/build/cjs/components/AttachmentList/helpers/stringRequiredValidator.js.map +1 -0
- package/build/cjs/components/AttachmentList/hooks/useKeyDownFormControl.d.ts +4 -0
- package/build/cjs/components/AttachmentList/hooks/useKeyDownFormControl.js +27 -0
- package/build/cjs/components/AttachmentList/hooks/useKeyDownFormControl.js.map +1 -0
- package/build/cjs/components/AttachmentList/hooks/useLabelRef.d.ts +4 -0
- package/build/cjs/components/AttachmentList/hooks/useLabelRef.js +35 -0
- package/build/cjs/components/AttachmentList/hooks/useLabelRef.js.map +1 -0
- package/build/cjs/components/AttachmentList/i18n/dicts.d.ts +23 -0
- package/build/cjs/components/AttachmentList/i18n/dicts.js +14 -0
- package/build/cjs/components/AttachmentList/i18n/dicts.js.map +1 -0
- package/build/cjs/components/AttachmentList/i18n/en.json +10 -0
- package/build/cjs/components/AttachmentList/i18n/index.d.ts +6 -0
- package/build/cjs/components/AttachmentList/i18n/index.js +11 -0
- package/build/cjs/components/AttachmentList/i18n/index.js.map +1 -0
- package/build/cjs/components/AttachmentList/i18n/ru.json +10 -0
- package/build/cjs/components/AttachmentList/index.d.ts +4 -0
- package/build/cjs/components/AttachmentList/index.js +40 -0
- package/build/cjs/components/AttachmentList/index.js.map +1 -0
- package/build/cjs/components/AttachmentList/internal/AttachmentItem/AttachmentItem.css +18 -0
- package/build/cjs/components/AttachmentList/internal/AttachmentItem/AttachmentItem.css.map +1 -0
- package/build/cjs/components/AttachmentList/internal/AttachmentItem/AttachmentItem.d.ts +16 -0
- package/build/cjs/components/AttachmentList/internal/AttachmentItem/AttachmentItem.js +106 -0
- package/build/cjs/components/AttachmentList/internal/AttachmentItem/AttachmentItem.js.map +1 -0
- package/build/cjs/components/AttachmentList/internal/AttachmentItem/index.d.ts +2 -0
- package/build/cjs/components/AttachmentList/internal/AttachmentItem/index.js +13 -0
- package/build/cjs/components/AttachmentList/internal/AttachmentItem/index.js.map +1 -0
- package/build/cjs/components/AttachmentList/internal/EditAttachmentItem/EditAttachmentItem.d.ts +9 -0
- package/build/cjs/components/AttachmentList/internal/EditAttachmentItem/EditAttachmentItem.js +22 -0
- package/build/cjs/components/AttachmentList/internal/EditAttachmentItem/EditAttachmentItem.js.map +1 -0
- package/build/cjs/components/AttachmentList/internal/EditAttachmentItem/EditLinkItem.css +17 -0
- package/build/cjs/components/AttachmentList/internal/EditAttachmentItem/EditLinkItem.css.map +1 -0
- package/build/cjs/components/AttachmentList/internal/EditAttachmentItem/EditLinkItem.d.ts +24 -0
- package/build/cjs/components/AttachmentList/internal/EditAttachmentItem/EditLinkItem.js +175 -0
- package/build/cjs/components/AttachmentList/internal/EditAttachmentItem/EditLinkItem.js.map +1 -0
- package/build/cjs/components/AttachmentList/internal/EditAttachmentItem/FileEdit.d.ts +12 -0
- package/build/cjs/components/AttachmentList/internal/EditAttachmentItem/FileEdit.js +91 -0
- package/build/cjs/components/AttachmentList/internal/EditAttachmentItem/FileEdit.js.map +1 -0
- package/build/cjs/components/AttachmentList/internal/EditAttachmentItem/index.d.ts +4 -0
- package/build/cjs/components/AttachmentList/internal/EditAttachmentItem/index.js +13 -0
- package/build/cjs/components/AttachmentList/internal/EditAttachmentItem/index.js.map +1 -0
- package/build/cjs/components/AttachmentListPlaceholder/AttachmentListPlaceholder.css +4 -0
- package/build/cjs/components/AttachmentListPlaceholder/AttachmentListPlaceholder.css.map +1 -0
- package/build/cjs/components/AttachmentListPlaceholder/AttachmentListPlaceholder.d.ts +13 -0
- package/build/cjs/components/AttachmentListPlaceholder/AttachmentListPlaceholder.js +75 -0
- package/build/cjs/components/AttachmentListPlaceholder/AttachmentListPlaceholder.js.map +1 -0
- package/build/cjs/components/AttachmentListPlaceholder/AttachmentListPlaceholder.stories.d.ts +29 -0
- package/build/cjs/components/AttachmentListPlaceholder/AttachmentListPlaceholder.stories.js +36 -0
- package/build/cjs/components/AttachmentListPlaceholder/AttachmentListPlaceholder.stories.js.map +1 -0
- package/build/cjs/components/AttachmentListPlaceholder/i18n/dicts.d.ts +17 -0
- package/build/cjs/components/AttachmentListPlaceholder/i18n/dicts.js +14 -0
- package/build/cjs/components/AttachmentListPlaceholder/i18n/dicts.js.map +1 -0
- package/build/cjs/components/AttachmentListPlaceholder/i18n/en.json +7 -0
- package/build/cjs/components/AttachmentListPlaceholder/i18n/index.d.ts +6 -0
- package/build/cjs/components/AttachmentListPlaceholder/i18n/index.js +11 -0
- package/build/cjs/components/AttachmentListPlaceholder/i18n/index.js.map +1 -0
- package/build/cjs/components/AttachmentListPlaceholder/i18n/ru.json +7 -0
- package/build/cjs/components/AttachmentListPlaceholder/index.d.ts +2 -0
- package/build/cjs/components/AttachmentListPlaceholder/index.js +13 -0
- package/build/cjs/components/AttachmentListPlaceholder/index.js.map +1 -0
- package/build/cjs/components/DataTable/DataTable.css +0 -7
- package/build/cjs/components/DataTable/DataTable.css.map +1 -1
- package/build/cjs/components/DataTable/DataTable.js +12 -5
- package/build/cjs/components/DataTable/DataTable.js.map +1 -1
- package/build/cjs/components/ErrorTree/ErrorTree.d.ts +3 -0
- package/build/cjs/components/ErrorTree/ErrorTree.js +35 -0
- package/build/cjs/components/ErrorTree/ErrorTree.js.map +1 -0
- package/build/cjs/components/ErrorTree/ErrorTree.stories.d.ts +8 -0
- package/build/cjs/components/ErrorTree/ErrorTree.stories.js +101 -0
- package/build/cjs/components/ErrorTree/ErrorTree.stories.js.map +1 -0
- package/build/cjs/components/ErrorTree/helpers/formatAttributes.d.ts +2 -0
- package/build/cjs/components/ErrorTree/helpers/formatAttributes.js +16 -0
- package/build/cjs/components/ErrorTree/helpers/formatAttributes.js.map +1 -0
- package/build/cjs/components/ErrorTree/helpers/getIntermediateChain.d.ts +6 -0
- package/build/cjs/components/ErrorTree/helpers/getIntermediateChain.js +22 -0
- package/build/cjs/components/ErrorTree/helpers/getIntermediateChain.js.map +1 -0
- package/build/cjs/components/ErrorTree/i18n/dicts.d.ts +27 -0
- package/build/cjs/components/ErrorTree/i18n/dicts.js +14 -0
- package/build/cjs/components/ErrorTree/i18n/dicts.js.map +1 -0
- package/build/cjs/components/ErrorTree/i18n/en.json +11 -0
- package/build/cjs/components/ErrorTree/i18n/index.d.ts +6 -0
- package/build/cjs/components/ErrorTree/i18n/index.js +11 -0
- package/build/cjs/components/ErrorTree/i18n/index.js.map +1 -0
- package/build/cjs/components/ErrorTree/i18n/ru.json +13 -0
- package/build/cjs/components/ErrorTree/index.d.ts +1 -0
- package/build/cjs/components/ErrorTree/index.js +13 -0
- package/build/cjs/components/ErrorTree/index.js.map +1 -0
- package/build/cjs/components/ErrorTree/internal/ErrorTreeChildren.css +4 -0
- package/build/cjs/components/ErrorTree/internal/ErrorTreeChildren.css.map +1 -0
- package/build/cjs/components/ErrorTree/internal/ErrorTreeChildren.d.ts +10 -0
- package/build/cjs/components/ErrorTree/internal/ErrorTreeChildren.js +32 -0
- package/build/cjs/components/ErrorTree/internal/ErrorTreeChildren.js.map +1 -0
- package/build/cjs/components/ErrorTree/internal/ErrorTreeNode.css +80 -0
- package/build/cjs/components/ErrorTree/internal/ErrorTreeNode.css.map +1 -0
- package/build/cjs/components/ErrorTree/internal/ErrorTreeNode.d.ts +13 -0
- package/build/cjs/components/ErrorTree/internal/ErrorTreeNode.js +274 -0
- package/build/cjs/components/ErrorTree/internal/ErrorTreeNode.js.map +1 -0
- package/build/cjs/components/ErrorTree/internal/IntermediateMessages.css +10 -0
- package/build/cjs/components/ErrorTree/internal/IntermediateMessages.css.map +1 -0
- package/build/cjs/components/ErrorTree/internal/IntermediateMessages.d.ts +9 -0
- package/build/cjs/components/ErrorTree/internal/IntermediateMessages.js +118 -0
- package/build/cjs/components/ErrorTree/internal/IntermediateMessages.js.map +1 -0
- package/build/cjs/components/Icons/LogoCPlusPlus.d.ts +2 -0
- package/build/cjs/components/Icons/LogoCPlusPlus.js +35 -0
- package/build/cjs/components/Icons/LogoCPlusPlus.js.map +1 -0
- package/build/cjs/components/Icons/index.d.ts +1 -0
- package/build/cjs/components/Icons/index.js +13 -0
- package/build/cjs/components/Icons/index.js.map +1 -0
- package/build/cjs/components/QueryResultsTable/QueryResultsTable.css +53 -0
- package/build/cjs/components/QueryResultsTable/QueryResultsTable.css.map +1 -0
- package/build/cjs/components/QueryResultsTable/QueryResultsTable.d.ts +24 -0
- package/build/cjs/components/QueryResultsTable/QueryResultsTable.js +104 -0
- package/build/cjs/components/QueryResultsTable/QueryResultsTable.js.map +1 -0
- package/build/cjs/components/QueryResultsTable/helpers/formatQueryResultType.d.ts +3 -0
- package/build/cjs/components/QueryResultsTable/helpers/formatQueryResultType.js +90 -0
- package/build/cjs/components/QueryResultsTable/helpers/formatQueryResultType.js.map +1 -0
- package/build/cjs/components/QueryResultsTable/helpers/formatQueryResultValue.d.ts +11 -0
- package/build/cjs/components/QueryResultsTable/helpers/formatQueryResultValue.js +40 -0
- package/build/cjs/components/QueryResultsTable/helpers/formatQueryResultValue.js.map +1 -0
- package/build/cjs/components/QueryResultsTable/i18n/dicts.d.ts +13 -0
- package/build/cjs/components/QueryResultsTable/i18n/dicts.js +14 -0
- package/build/cjs/components/QueryResultsTable/i18n/dicts.js.map +1 -0
- package/build/cjs/components/QueryResultsTable/i18n/en.json +5 -0
- package/build/cjs/components/QueryResultsTable/i18n/index.d.ts +6 -0
- package/build/cjs/components/QueryResultsTable/i18n/index.js +11 -0
- package/build/cjs/components/QueryResultsTable/i18n/index.js.map +1 -0
- package/build/cjs/components/QueryResultsTable/i18n/ru.json +5 -0
- package/build/cjs/components/QueryResultsTable/index.d.ts +3 -0
- package/build/cjs/components/QueryResultsTable/index.js +20 -0
- package/build/cjs/components/QueryResultsTable/index.js.map +1 -0
- package/build/cjs/components/QueryResultsTable/internal/QueryResultCell.d.ts +11 -0
- package/build/cjs/components/QueryResultsTable/internal/QueryResultCell.js +79 -0
- package/build/cjs/components/QueryResultsTable/internal/QueryResultCell.js.map +1 -0
- package/build/cjs/components/index.d.ts +5 -0
- package/build/cjs/components/index.js +48 -1
- package/build/cjs/components/index.js.map +1 -1
- package/build/cjs/helpers/createUuid.d.ts +1 -0
- package/build/cjs/helpers/createUuid.js +12 -0
- package/build/cjs/helpers/createUuid.js.map +1 -0
- package/build/cjs/helpers/isObjectEqual.d.ts +1 -0
- package/build/cjs/helpers/isObjectEqual.js +30 -0
- package/build/cjs/helpers/isObjectEqual.js.map +1 -0
- package/build/cjs/helpers/useDebouncedValue.d.ts +2 -0
- package/build/cjs/helpers/useDebouncedValue.js +27 -0
- package/build/cjs/helpers/useDebouncedValue.js.map +1 -0
- package/build/cjs/index.d.ts +3 -0
- package/build/cjs/index.js +33 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/modules/Attachments/Attachments.css +8 -0
- package/build/cjs/modules/Attachments/Attachments.css.map +1 -0
- package/build/cjs/modules/Attachments/Attachments.d.ts +22 -0
- package/build/cjs/modules/Attachments/Attachments.js +381 -0
- package/build/cjs/modules/Attachments/Attachments.js.map +1 -0
- package/build/cjs/modules/Attachments/Attachments.stories.d.ts +41 -0
- package/build/cjs/modules/Attachments/Attachments.stories.js +123 -0
- package/build/cjs/modules/Attachments/Attachments.stories.js.map +1 -0
- package/build/cjs/modules/Attachments/i18n/dicts.d.ts +13 -0
- package/build/cjs/modules/Attachments/i18n/dicts.js +14 -0
- package/build/cjs/modules/Attachments/i18n/dicts.js.map +1 -0
- package/build/cjs/modules/Attachments/i18n/en.json +5 -0
- package/build/cjs/modules/Attachments/i18n/index.d.ts +6 -0
- package/build/cjs/modules/Attachments/i18n/index.js +11 -0
- package/build/cjs/modules/Attachments/i18n/index.js.map +1 -0
- package/build/cjs/modules/Attachments/i18n/ru.json +5 -0
- package/build/cjs/modules/Attachments/index.d.ts +2 -0
- package/build/cjs/modules/Attachments/index.js +13 -0
- package/build/cjs/modules/Attachments/index.js.map +1 -0
- package/build/cjs/modules/NavigationPreview/NavigationPreview.css +7 -1
- package/build/cjs/modules/NavigationPreview/NavigationPreview.css.map +1 -1
- package/build/cjs/modules/NavigationPreview/NavigationPreview.d.ts +2 -2
- package/build/cjs/modules/NavigationPreview/NavigationPreview.js +37 -7
- package/build/cjs/modules/NavigationPreview/NavigationPreview.js.map +1 -1
- package/build/cjs/modules/NavigationPreview/story/NavigationPreview.stories.d.ts +1 -0
- package/build/cjs/modules/NavigationPreview/story/NavigationPreview.stories.js +25 -1
- package/build/cjs/modules/NavigationPreview/story/NavigationPreview.stories.js.map +1 -1
- package/build/cjs/modules/NavigationPreview/story/mockData.d.ts +2 -2
- package/build/cjs/modules/NavigationPreview/story/mockData.js +16 -4
- package/build/cjs/modules/NavigationPreview/story/mockData.js.map +1 -1
- package/build/cjs/modules/QueryStatistics/QueryStatistics.css +4 -0
- package/build/cjs/modules/QueryStatistics/QueryStatistics.css.map +1 -0
- package/build/cjs/modules/QueryStatistics/QueryStatistics.d.ts +4 -0
- package/build/cjs/modules/QueryStatistics/QueryStatistics.js +151 -0
- package/build/cjs/modules/QueryStatistics/QueryStatistics.js.map +1 -0
- package/build/cjs/modules/QueryStatistics/helpers.d.ts +15 -0
- package/build/cjs/modules/QueryStatistics/helpers.js +118 -0
- package/build/cjs/modules/QueryStatistics/helpers.js.map +1 -0
- package/build/cjs/modules/QueryStatistics/i18n/dicts.d.ts +35 -0
- package/build/cjs/modules/QueryStatistics/i18n/dicts.js +14 -0
- package/build/cjs/modules/QueryStatistics/i18n/dicts.js.map +1 -0
- package/build/cjs/modules/QueryStatistics/i18n/en.json +16 -0
- package/build/cjs/modules/QueryStatistics/i18n/index.d.ts +6 -0
- package/build/cjs/modules/QueryStatistics/i18n/index.js +11 -0
- package/build/cjs/modules/QueryStatistics/i18n/index.js.map +1 -0
- package/build/cjs/modules/QueryStatistics/i18n/ru.json +16 -0
- package/build/cjs/modules/QueryStatistics/index.d.ts +2 -0
- package/build/cjs/modules/QueryStatistics/index.js +13 -0
- package/build/cjs/modules/QueryStatistics/index.js.map +1 -0
- package/build/cjs/modules/QueryStatistics/internal/MetricCell.css +36 -0
- package/build/cjs/modules/QueryStatistics/internal/MetricCell.css.map +1 -0
- package/build/cjs/modules/QueryStatistics/internal/MetricCell.d.ts +9 -0
- package/build/cjs/modules/QueryStatistics/internal/MetricCell.js +121 -0
- package/build/cjs/modules/QueryStatistics/internal/MetricCell.js.map +1 -0
- package/build/cjs/modules/QueryStatistics/internal/QueryStatisticsTable.css +21 -0
- package/build/cjs/modules/QueryStatistics/internal/QueryStatisticsTable.css.map +1 -0
- package/build/cjs/modules/QueryStatistics/internal/QueryStatisticsTable.d.ts +20 -0
- package/build/cjs/modules/QueryStatistics/internal/QueryStatisticsTable.js +140 -0
- package/build/cjs/modules/QueryStatistics/internal/QueryStatisticsTable.js.map +1 -0
- package/build/cjs/modules/QueryStatistics/internal/QueryStatisticsToolbar.css +5 -0
- package/build/cjs/modules/QueryStatistics/internal/QueryStatisticsToolbar.css.map +1 -0
- package/build/cjs/modules/QueryStatistics/internal/QueryStatisticsToolbar.d.ts +10 -0
- package/build/cjs/modules/QueryStatistics/internal/QueryStatisticsToolbar.js +55 -0
- package/build/cjs/modules/QueryStatistics/internal/QueryStatisticsToolbar.js.map +1 -0
- package/build/cjs/modules/QueryStatistics/story/QueryStatistics.stories.d.ts +8 -0
- package/build/cjs/modules/QueryStatistics/story/QueryStatistics.stories.js +112 -0
- package/build/cjs/modules/QueryStatistics/story/QueryStatistics.stories.js.map +1 -0
- package/build/cjs/modules/index.d.ts +3 -0
- package/build/cjs/modules/index.js +20 -0
- package/build/cjs/modules/index.js.map +1 -1
- package/build/cjs/types/declarations.d.ts +10 -0
- package/build/cjs/types/errorTree.d.ts +23 -0
- package/build/cjs/types/errorTree.js +6 -0
- package/build/cjs/types/errorTree.js.map +1 -0
- package/build/cjs/types/navigation.d.ts +8 -1
- package/build/cjs/types/navigation.js.map +1 -1
- package/build/cjs/types/queryResults.d.ts +34 -0
- package/build/cjs/types/queryResults.js +6 -0
- package/build/cjs/types/queryResults.js.map +1 -0
- package/build/cjs/types/queryStatistics.d.ts +54 -0
- package/build/cjs/types/queryStatistics.js +6 -0
- package/build/cjs/types/queryStatistics.js.map +1 -0
- package/build/cjs/widgets/QueriesNavigation/QueriesNavigation.stories.js +40 -35
- package/build/cjs/widgets/QueriesNavigation/QueriesNavigation.stories.js.map +1 -1
- package/build/cjs/widgets/QueriesNavigation/i18n/index.d.ts +2 -2
- package/build/cjs/widgets/QueryResults/QueryResults.css +19 -0
- package/build/cjs/widgets/QueryResults/QueryResults.css.map +1 -0
- package/build/cjs/widgets/QueryResults/QueryResults.d.ts +23 -0
- package/build/cjs/widgets/QueryResults/QueryResults.js +119 -0
- package/build/cjs/widgets/QueryResults/QueryResults.js.map +1 -0
- package/build/cjs/widgets/QueryResults/QueryResults.stories.d.ts +19 -0
- package/build/cjs/widgets/QueryResults/QueryResults.stories.js +199 -0
- package/build/cjs/widgets/QueryResults/QueryResults.stories.js.map +1 -0
- package/build/cjs/widgets/QueryResults/i18n/dicts.d.ts +25 -0
- package/build/cjs/widgets/QueryResults/i18n/dicts.js +14 -0
- package/build/cjs/widgets/QueryResults/i18n/dicts.js.map +1 -0
- package/build/cjs/widgets/QueryResults/i18n/en.json +10 -0
- package/build/cjs/widgets/QueryResults/i18n/index.d.ts +6 -0
- package/build/cjs/widgets/QueryResults/i18n/index.js +11 -0
- package/build/cjs/widgets/QueryResults/i18n/index.js.map +1 -0
- package/build/cjs/widgets/QueryResults/i18n/ru.json +12 -0
- package/build/cjs/widgets/QueryResults/index.d.ts +2 -0
- package/build/cjs/widgets/QueryResults/index.js +13 -0
- package/build/cjs/widgets/QueryResults/index.js.map +1 -0
- package/build/cjs/widgets/QueryResults/internal/QueryResultsSchema.d.ts +7 -0
- package/build/cjs/widgets/QueryResults/internal/QueryResultsSchema.js +49 -0
- package/build/cjs/widgets/QueryResults/internal/QueryResultsSchema.js.map +1 -0
- package/build/cjs/widgets/index.d.ts +2 -0
- package/build/cjs/widgets/index.js +7 -0
- package/build/cjs/widgets/index.js.map +1 -1
- package/build/esm/components/AttachmentList/AttachmentList.css +22 -0
- package/build/esm/components/AttachmentList/AttachmentList.css.map +1 -0
- package/build/esm/components/AttachmentList/AttachmentList.d.ts +17 -0
- package/build/esm/components/AttachmentList/AttachmentList.js +67 -0
- package/build/esm/components/AttachmentList/AttachmentList.js.map +1 -0
- package/build/esm/components/AttachmentList/AttachmentList.scss +25 -0
- package/build/esm/components/AttachmentList/AttachmentList.stories.d.ts +93 -0
- package/build/esm/components/AttachmentList/AttachmentList.stories.js +315 -0
- package/build/esm/components/AttachmentList/AttachmentList.stories.js.map +1 -0
- package/build/esm/components/AttachmentList/helpers/getIconByAttachmentName.d.ts +2 -0
- package/build/esm/components/AttachmentList/helpers/getIconByAttachmentName.js +30 -0
- package/build/esm/components/AttachmentList/helpers/getIconByAttachmentName.js.map +1 -0
- package/build/esm/components/AttachmentList/helpers/objectLinkValidator.d.ts +11 -0
- package/build/esm/components/AttachmentList/helpers/objectLinkValidator.js +24 -0
- package/build/esm/components/AttachmentList/helpers/objectLinkValidator.js.map +1 -0
- package/build/esm/components/AttachmentList/helpers/stringRequiredValidator.d.ts +2 -0
- package/build/esm/components/AttachmentList/helpers/stringRequiredValidator.js +19 -0
- package/build/esm/components/AttachmentList/helpers/stringRequiredValidator.js.map +1 -0
- package/build/esm/components/AttachmentList/hooks/useKeyDownFormControl.d.ts +4 -0
- package/build/esm/components/AttachmentList/hooks/useKeyDownFormControl.js +21 -0
- package/build/esm/components/AttachmentList/hooks/useKeyDownFormControl.js.map +1 -0
- package/build/esm/components/AttachmentList/hooks/useLabelRef.d.ts +4 -0
- package/build/esm/components/AttachmentList/hooks/useLabelRef.js +28 -0
- package/build/esm/components/AttachmentList/hooks/useLabelRef.js.map +1 -0
- package/build/esm/components/AttachmentList/i18n/dicts.d.ts +23 -0
- package/build/esm/components/AttachmentList/i18n/dicts.js +7 -0
- package/build/esm/components/AttachmentList/i18n/dicts.js.map +1 -0
- package/build/esm/components/AttachmentList/i18n/en.json +10 -0
- package/build/esm/components/AttachmentList/i18n/index.d.ts +6 -0
- package/build/esm/components/AttachmentList/i18n/index.js +4 -0
- package/build/esm/components/AttachmentList/i18n/index.js.map +1 -0
- package/build/esm/components/AttachmentList/i18n/ru.json +10 -0
- package/build/esm/components/AttachmentList/index.d.ts +4 -0
- package/build/esm/components/AttachmentList/index.js +4 -0
- package/build/esm/components/AttachmentList/index.js.map +1 -0
- package/build/esm/components/AttachmentList/internal/AttachmentItem/AttachmentItem.css +18 -0
- package/build/esm/components/AttachmentList/internal/AttachmentItem/AttachmentItem.css.map +1 -0
- package/build/esm/components/AttachmentList/internal/AttachmentItem/AttachmentItem.d.ts +16 -0
- package/build/esm/components/AttachmentList/internal/AttachmentItem/AttachmentItem.js +98 -0
- package/build/esm/components/AttachmentList/internal/AttachmentItem/AttachmentItem.js.map +1 -0
- package/build/esm/components/AttachmentList/internal/AttachmentItem/AttachmentItem.scss +23 -0
- package/build/esm/components/AttachmentList/internal/AttachmentItem/index.d.ts +2 -0
- package/build/esm/components/AttachmentList/internal/AttachmentItem/index.js +2 -0
- package/build/esm/components/AttachmentList/internal/AttachmentItem/index.js.map +1 -0
- package/build/esm/components/AttachmentList/internal/EditAttachmentItem/EditAttachmentItem.d.ts +9 -0
- package/build/esm/components/AttachmentList/internal/EditAttachmentItem/EditAttachmentItem.js +15 -0
- package/build/esm/components/AttachmentList/internal/EditAttachmentItem/EditAttachmentItem.js.map +1 -0
- package/build/esm/components/AttachmentList/internal/EditAttachmentItem/EditLinkItem.css +17 -0
- package/build/esm/components/AttachmentList/internal/EditAttachmentItem/EditLinkItem.css.map +1 -0
- package/build/esm/components/AttachmentList/internal/EditAttachmentItem/EditLinkItem.d.ts +24 -0
- package/build/esm/components/AttachmentList/internal/EditAttachmentItem/EditLinkItem.js +167 -0
- package/build/esm/components/AttachmentList/internal/EditAttachmentItem/EditLinkItem.js.map +1 -0
- package/build/esm/components/AttachmentList/internal/EditAttachmentItem/EditLinkItem.scss +21 -0
- package/build/esm/components/AttachmentList/internal/EditAttachmentItem/FileEdit.d.ts +12 -0
- package/build/esm/components/AttachmentList/internal/EditAttachmentItem/FileEdit.js +83 -0
- package/build/esm/components/AttachmentList/internal/EditAttachmentItem/FileEdit.js.map +1 -0
- package/build/esm/components/AttachmentList/internal/EditAttachmentItem/index.d.ts +4 -0
- package/build/esm/components/AttachmentList/internal/EditAttachmentItem/index.js +2 -0
- package/build/esm/components/AttachmentList/internal/EditAttachmentItem/index.js.map +1 -0
- package/build/esm/components/AttachmentListPlaceholder/AttachmentListPlaceholder.css +4 -0
- package/build/esm/components/AttachmentListPlaceholder/AttachmentListPlaceholder.css.map +1 -0
- package/build/esm/components/AttachmentListPlaceholder/AttachmentListPlaceholder.d.ts +13 -0
- package/build/esm/components/AttachmentListPlaceholder/AttachmentListPlaceholder.js +68 -0
- package/build/esm/components/AttachmentListPlaceholder/AttachmentListPlaceholder.js.map +1 -0
- package/build/esm/components/AttachmentListPlaceholder/AttachmentListPlaceholder.scss +5 -0
- package/build/esm/components/AttachmentListPlaceholder/AttachmentListPlaceholder.stories.d.ts +29 -0
- package/build/esm/components/AttachmentListPlaceholder/AttachmentListPlaceholder.stories.js +29 -0
- package/build/esm/components/AttachmentListPlaceholder/AttachmentListPlaceholder.stories.js.map +1 -0
- package/build/esm/components/AttachmentListPlaceholder/i18n/dicts.d.ts +17 -0
- package/build/esm/components/AttachmentListPlaceholder/i18n/dicts.js +7 -0
- package/build/esm/components/AttachmentListPlaceholder/i18n/dicts.js.map +1 -0
- package/build/esm/components/AttachmentListPlaceholder/i18n/en.json +7 -0
- package/build/esm/components/AttachmentListPlaceholder/i18n/index.d.ts +6 -0
- package/build/esm/components/AttachmentListPlaceholder/i18n/index.js +4 -0
- package/build/esm/components/AttachmentListPlaceholder/i18n/index.js.map +1 -0
- package/build/esm/components/AttachmentListPlaceholder/i18n/ru.json +7 -0
- package/build/esm/components/AttachmentListPlaceholder/index.d.ts +2 -0
- package/build/esm/components/AttachmentListPlaceholder/index.js +2 -0
- package/build/esm/components/AttachmentListPlaceholder/index.js.map +1 -0
- package/build/esm/components/DataTable/DataTable.css +0 -7
- package/build/esm/components/DataTable/DataTable.css.map +1 -1
- package/build/esm/components/DataTable/DataTable.js +12 -5
- package/build/esm/components/DataTable/DataTable.js.map +1 -1
- package/build/esm/components/DataTable/DataTable.scss +18 -26
- package/build/esm/components/ErrorTree/ErrorTree.d.ts +3 -0
- package/build/esm/components/ErrorTree/ErrorTree.js +28 -0
- package/build/esm/components/ErrorTree/ErrorTree.js.map +1 -0
- package/build/esm/components/ErrorTree/ErrorTree.stories.d.ts +8 -0
- package/build/esm/components/ErrorTree/ErrorTree.stories.js +94 -0
- package/build/esm/components/ErrorTree/ErrorTree.stories.js.map +1 -0
- package/build/esm/components/ErrorTree/helpers/formatAttributes.d.ts +2 -0
- package/build/esm/components/ErrorTree/helpers/formatAttributes.js +10 -0
- package/build/esm/components/ErrorTree/helpers/formatAttributes.js.map +1 -0
- package/build/esm/components/ErrorTree/helpers/getIntermediateChain.d.ts +6 -0
- package/build/esm/components/ErrorTree/helpers/getIntermediateChain.js +16 -0
- package/build/esm/components/ErrorTree/helpers/getIntermediateChain.js.map +1 -0
- package/build/esm/components/ErrorTree/i18n/dicts.d.ts +27 -0
- package/build/esm/components/ErrorTree/i18n/dicts.js +7 -0
- package/build/esm/components/ErrorTree/i18n/dicts.js.map +1 -0
- package/build/esm/components/ErrorTree/i18n/en.json +11 -0
- package/build/esm/components/ErrorTree/i18n/index.d.ts +6 -0
- package/build/esm/components/ErrorTree/i18n/index.js +4 -0
- package/build/esm/components/ErrorTree/i18n/index.js.map +1 -0
- package/build/esm/components/ErrorTree/i18n/ru.json +13 -0
- package/build/esm/components/ErrorTree/index.d.ts +1 -0
- package/build/esm/components/ErrorTree/index.js +2 -0
- package/build/esm/components/ErrorTree/index.js.map +1 -0
- package/build/esm/components/ErrorTree/internal/ErrorTreeChildren.css +4 -0
- package/build/esm/components/ErrorTree/internal/ErrorTreeChildren.css.map +1 -0
- package/build/esm/components/ErrorTree/internal/ErrorTreeChildren.d.ts +10 -0
- package/build/esm/components/ErrorTree/internal/ErrorTreeChildren.js +25 -0
- package/build/esm/components/ErrorTree/internal/ErrorTreeChildren.js.map +1 -0
- package/build/esm/components/ErrorTree/internal/ErrorTreeChildren.scss +5 -0
- package/build/esm/components/ErrorTree/internal/ErrorTreeNode.css +80 -0
- package/build/esm/components/ErrorTree/internal/ErrorTreeNode.css.map +1 -0
- package/build/esm/components/ErrorTree/internal/ErrorTreeNode.d.ts +13 -0
- package/build/esm/components/ErrorTree/internal/ErrorTreeNode.js +266 -0
- package/build/esm/components/ErrorTree/internal/ErrorTreeNode.js.map +1 -0
- package/build/esm/components/ErrorTree/internal/ErrorTreeNode.scss +95 -0
- package/build/esm/components/ErrorTree/internal/IntermediateMessages.css +10 -0
- package/build/esm/components/ErrorTree/internal/IntermediateMessages.css.map +1 -0
- package/build/esm/components/ErrorTree/internal/IntermediateMessages.d.ts +9 -0
- package/build/esm/components/ErrorTree/internal/IntermediateMessages.js +110 -0
- package/build/esm/components/ErrorTree/internal/IntermediateMessages.js.map +1 -0
- package/build/esm/components/ErrorTree/internal/IntermediateMessages.scss +13 -0
- package/build/esm/components/Icons/LogoCPlusPlus.d.ts +2 -0
- package/build/esm/components/Icons/LogoCPlusPlus.js +28 -0
- package/build/esm/components/Icons/LogoCPlusPlus.js.map +1 -0
- package/build/esm/components/Icons/index.d.ts +1 -0
- package/build/esm/components/Icons/index.js +2 -0
- package/build/esm/components/Icons/index.js.map +1 -0
- package/build/esm/components/QueryResultsTable/QueryResultsTable.css +53 -0
- package/build/esm/components/QueryResultsTable/QueryResultsTable.css.map +1 -0
- package/build/esm/components/QueryResultsTable/QueryResultsTable.d.ts +24 -0
- package/build/esm/components/QueryResultsTable/QueryResultsTable.js +96 -0
- package/build/esm/components/QueryResultsTable/QueryResultsTable.js.map +1 -0
- package/build/esm/components/QueryResultsTable/QueryResultsTable.scss +65 -0
- package/build/esm/components/QueryResultsTable/helpers/formatQueryResultType.d.ts +3 -0
- package/build/esm/components/QueryResultsTable/helpers/formatQueryResultType.js +82 -0
- package/build/esm/components/QueryResultsTable/helpers/formatQueryResultType.js.map +1 -0
- package/build/esm/components/QueryResultsTable/helpers/formatQueryResultValue.d.ts +11 -0
- package/build/esm/components/QueryResultsTable/helpers/formatQueryResultValue.js +33 -0
- package/build/esm/components/QueryResultsTable/helpers/formatQueryResultValue.js.map +1 -0
- package/build/esm/components/QueryResultsTable/i18n/dicts.d.ts +13 -0
- package/build/esm/components/QueryResultsTable/i18n/dicts.js +7 -0
- package/build/esm/components/QueryResultsTable/i18n/dicts.js.map +1 -0
- package/build/esm/components/QueryResultsTable/i18n/en.json +5 -0
- package/build/esm/components/QueryResultsTable/i18n/index.d.ts +6 -0
- package/build/esm/components/QueryResultsTable/i18n/index.js +4 -0
- package/build/esm/components/QueryResultsTable/i18n/index.js.map +1 -0
- package/build/esm/components/QueryResultsTable/i18n/ru.json +5 -0
- package/build/esm/components/QueryResultsTable/index.d.ts +3 -0
- package/build/esm/components/QueryResultsTable/index.js +3 -0
- package/build/esm/components/QueryResultsTable/index.js.map +1 -0
- package/build/esm/components/QueryResultsTable/internal/QueryResultCell.d.ts +11 -0
- package/build/esm/components/QueryResultsTable/internal/QueryResultCell.js +71 -0
- package/build/esm/components/QueryResultsTable/internal/QueryResultCell.js.map +1 -0
- package/build/esm/components/index.d.ts +5 -0
- package/build/esm/components/index.js +4 -0
- package/build/esm/components/index.js.map +1 -1
- package/build/esm/helpers/createUuid.d.ts +1 -0
- package/build/esm/helpers/createUuid.js +6 -0
- package/build/esm/helpers/createUuid.js.map +1 -0
- package/build/esm/helpers/isObjectEqual.d.ts +1 -0
- package/build/esm/helpers/isObjectEqual.js +23 -0
- package/build/esm/helpers/isObjectEqual.js.map +1 -0
- package/build/esm/helpers/useDebouncedValue.d.ts +2 -0
- package/build/esm/helpers/useDebouncedValue.js +21 -0
- package/build/esm/helpers/useDebouncedValue.js.map +1 -0
- package/build/esm/index.d.ts +3 -0
- package/build/esm/index.js +3 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/modules/Attachments/Attachments.css +8 -0
- package/build/esm/modules/Attachments/Attachments.css.map +1 -0
- package/build/esm/modules/Attachments/Attachments.d.ts +22 -0
- package/build/esm/modules/Attachments/Attachments.js +373 -0
- package/build/esm/modules/Attachments/Attachments.js.map +1 -0
- package/build/esm/modules/Attachments/Attachments.scss +10 -0
- package/build/esm/modules/Attachments/Attachments.stories.d.ts +41 -0
- package/build/esm/modules/Attachments/Attachments.stories.js +115 -0
- package/build/esm/modules/Attachments/Attachments.stories.js.map +1 -0
- package/build/esm/modules/Attachments/i18n/dicts.d.ts +13 -0
- package/build/esm/modules/Attachments/i18n/dicts.js +7 -0
- package/build/esm/modules/Attachments/i18n/dicts.js.map +1 -0
- package/build/esm/modules/Attachments/i18n/en.json +5 -0
- package/build/esm/modules/Attachments/i18n/index.d.ts +6 -0
- package/build/esm/modules/Attachments/i18n/index.js +4 -0
- package/build/esm/modules/Attachments/i18n/index.js.map +1 -0
- package/build/esm/modules/Attachments/i18n/ru.json +5 -0
- package/build/esm/modules/Attachments/index.d.ts +2 -0
- package/build/esm/modules/Attachments/index.js +2 -0
- package/build/esm/modules/Attachments/index.js.map +1 -0
- package/build/esm/modules/NavigationPreview/NavigationPreview.css +7 -1
- package/build/esm/modules/NavigationPreview/NavigationPreview.css.map +1 -1
- package/build/esm/modules/NavigationPreview/NavigationPreview.d.ts +2 -2
- package/build/esm/modules/NavigationPreview/NavigationPreview.js +38 -8
- package/build/esm/modules/NavigationPreview/NavigationPreview.js.map +1 -1
- package/build/esm/modules/NavigationPreview/NavigationPreview.scss +25 -17
- package/build/esm/modules/NavigationPreview/story/NavigationPreview.stories.d.ts +1 -0
- package/build/esm/modules/NavigationPreview/story/NavigationPreview.stories.js +24 -0
- package/build/esm/modules/NavigationPreview/story/NavigationPreview.stories.js.map +1 -1
- package/build/esm/modules/NavigationPreview/story/mockData.d.ts +2 -2
- package/build/esm/modules/NavigationPreview/story/mockData.js +16 -4
- package/build/esm/modules/NavigationPreview/story/mockData.js.map +1 -1
- package/build/esm/modules/QueryStatistics/QueryStatistics.css +4 -0
- package/build/esm/modules/QueryStatistics/QueryStatistics.css.map +1 -0
- package/build/esm/modules/QueryStatistics/QueryStatistics.d.ts +4 -0
- package/build/esm/modules/QueryStatistics/QueryStatistics.js +143 -0
- package/build/esm/modules/QueryStatistics/QueryStatistics.js.map +1 -0
- package/build/esm/modules/QueryStatistics/QueryStatistics.scss +3 -0
- package/build/esm/modules/QueryStatistics/helpers.d.ts +15 -0
- package/build/esm/modules/QueryStatistics/helpers.js +106 -0
- package/build/esm/modules/QueryStatistics/helpers.js.map +1 -0
- package/build/esm/modules/QueryStatistics/i18n/dicts.d.ts +35 -0
- package/build/esm/modules/QueryStatistics/i18n/dicts.js +7 -0
- package/build/esm/modules/QueryStatistics/i18n/dicts.js.map +1 -0
- package/build/esm/modules/QueryStatistics/i18n/en.json +16 -0
- package/build/esm/modules/QueryStatistics/i18n/index.d.ts +6 -0
- package/build/esm/modules/QueryStatistics/i18n/index.js +4 -0
- package/build/esm/modules/QueryStatistics/i18n/index.js.map +1 -0
- package/build/esm/modules/QueryStatistics/i18n/ru.json +16 -0
- package/build/esm/modules/QueryStatistics/index.d.ts +2 -0
- package/build/esm/modules/QueryStatistics/index.js +2 -0
- package/build/esm/modules/QueryStatistics/index.js.map +1 -0
- package/build/esm/modules/QueryStatistics/internal/MetricCell.css +36 -0
- package/build/esm/modules/QueryStatistics/internal/MetricCell.css.map +1 -0
- package/build/esm/modules/QueryStatistics/internal/MetricCell.d.ts +9 -0
- package/build/esm/modules/QueryStatistics/internal/MetricCell.js +114 -0
- package/build/esm/modules/QueryStatistics/internal/MetricCell.js.map +1 -0
- package/build/esm/modules/QueryStatistics/internal/MetricCell.scss +12 -0
- package/build/esm/modules/QueryStatistics/internal/QueryStatisticsTable.css +21 -0
- package/build/esm/modules/QueryStatistics/internal/QueryStatisticsTable.css.map +1 -0
- package/build/esm/modules/QueryStatistics/internal/QueryStatisticsTable.d.ts +20 -0
- package/build/esm/modules/QueryStatistics/internal/QueryStatisticsTable.js +132 -0
- package/build/esm/modules/QueryStatistics/internal/QueryStatisticsTable.js.map +1 -0
- package/build/esm/modules/QueryStatistics/internal/QueryStatisticsTable.scss +8 -0
- package/build/esm/modules/QueryStatistics/internal/QueryStatisticsToolbar.css +5 -0
- package/build/esm/modules/QueryStatistics/internal/QueryStatisticsToolbar.css.map +1 -0
- package/build/esm/modules/QueryStatistics/internal/QueryStatisticsToolbar.d.ts +10 -0
- package/build/esm/modules/QueryStatistics/internal/QueryStatisticsToolbar.js +48 -0
- package/build/esm/modules/QueryStatistics/internal/QueryStatisticsToolbar.js.map +1 -0
- package/build/esm/modules/QueryStatistics/internal/QueryStatisticsToolbar.scss +1 -0
- package/build/esm/modules/QueryStatistics/story/QueryStatistics.stories.d.ts +8 -0
- package/build/esm/modules/QueryStatistics/story/QueryStatistics.stories.js +105 -0
- package/build/esm/modules/QueryStatistics/story/QueryStatistics.stories.js.map +1 -0
- package/build/esm/modules/index.d.ts +3 -0
- package/build/esm/modules/index.js +2 -0
- package/build/esm/modules/index.js.map +1 -1
- package/build/esm/types/declarations.d.ts +10 -0
- package/build/esm/types/errorTree.d.ts +23 -0
- package/build/esm/types/errorTree.js +2 -0
- package/build/esm/types/errorTree.js.map +1 -0
- package/build/esm/types/navigation.d.ts +8 -1
- package/build/esm/types/navigation.js.map +1 -1
- package/build/esm/types/queryResults.d.ts +34 -0
- package/build/esm/types/queryResults.js +2 -0
- package/build/esm/types/queryResults.js.map +1 -0
- package/build/esm/types/queryStatistics.d.ts +54 -0
- package/build/esm/types/queryStatistics.js +2 -0
- package/build/esm/types/queryStatistics.js.map +1 -0
- package/build/esm/widgets/QueriesNavigation/QueriesNavigation.stories.js +40 -35
- package/build/esm/widgets/QueriesNavigation/QueriesNavigation.stories.js.map +1 -1
- package/build/esm/widgets/QueriesNavigation/i18n/index.d.ts +2 -2
- package/build/esm/widgets/QueryResults/QueryResults.css +19 -0
- package/build/esm/widgets/QueryResults/QueryResults.css.map +1 -0
- package/build/esm/widgets/QueryResults/QueryResults.d.ts +23 -0
- package/build/esm/widgets/QueryResults/QueryResults.js +111 -0
- package/build/esm/widgets/QueryResults/QueryResults.js.map +1 -0
- package/build/esm/widgets/QueryResults/QueryResults.scss +25 -0
- package/build/esm/widgets/QueryResults/QueryResults.stories.d.ts +19 -0
- package/build/esm/widgets/QueryResults/QueryResults.stories.js +191 -0
- package/build/esm/widgets/QueryResults/QueryResults.stories.js.map +1 -0
- package/build/esm/widgets/QueryResults/i18n/dicts.d.ts +25 -0
- package/build/esm/widgets/QueryResults/i18n/dicts.js +7 -0
- package/build/esm/widgets/QueryResults/i18n/dicts.js.map +1 -0
- package/build/esm/widgets/QueryResults/i18n/en.json +10 -0
- package/build/esm/widgets/QueryResults/i18n/index.d.ts +6 -0
- package/build/esm/widgets/QueryResults/i18n/index.js +4 -0
- package/build/esm/widgets/QueryResults/i18n/index.js.map +1 -0
- package/build/esm/widgets/QueryResults/i18n/ru.json +12 -0
- package/build/esm/widgets/QueryResults/index.d.ts +2 -0
- package/build/esm/widgets/QueryResults/index.js +2 -0
- package/build/esm/widgets/QueryResults/index.js.map +1 -0
- package/build/esm/widgets/QueryResults/internal/QueryResultsSchema.d.ts +7 -0
- package/build/esm/widgets/QueryResults/internal/QueryResultsSchema.js +41 -0
- package/build/esm/widgets/QueryResults/internal/QueryResultsSchema.js.map +1 -0
- package/build/esm/widgets/index.d.ts +2 -0
- package/build/esm/widgets/index.js +1 -0
- package/build/esm/widgets/index.js.map +1 -1
- package/package.json +1 -1
- package/plans/styles-rules.md +137 -0
- package/src/components/AttachmentList/AttachmentList.scss +25 -0
- package/src/components/AttachmentList/AttachmentList.stories.tsx +243 -0
- package/src/components/AttachmentList/AttachmentList.tsx +67 -0
- package/src/components/AttachmentList/helpers/getIconByAttachmentName.ts +36 -0
- package/src/components/AttachmentList/helpers/objectLinkValidator.ts +40 -0
- package/src/components/AttachmentList/helpers/stringRequiredValidator.ts +24 -0
- package/src/components/AttachmentList/hooks/useKeyDownFormControl.ts +22 -0
- package/src/components/AttachmentList/hooks/useLabelRef.ts +25 -0
- package/src/components/AttachmentList/i18n/dicts.ts +4 -0
- package/src/components/AttachmentList/i18n/en.json +10 -0
- package/src/components/AttachmentList/i18n/index.ts +5 -0
- package/src/components/AttachmentList/i18n/ru.json +10 -0
- package/src/components/AttachmentList/index.ts +4 -0
- package/src/components/AttachmentList/internal/AttachmentItem/AttachmentItem.scss +23 -0
- package/src/components/AttachmentList/internal/AttachmentItem/AttachmentItem.tsx +75 -0
- package/src/components/AttachmentList/internal/AttachmentItem/index.ts +2 -0
- package/src/components/AttachmentList/internal/EditAttachmentItem/EditAttachmentItem.tsx +21 -0
- package/src/components/AttachmentList/internal/EditAttachmentItem/EditLinkItem.scss +21 -0
- package/src/components/AttachmentList/internal/EditAttachmentItem/EditLinkItem.tsx +194 -0
- package/src/components/AttachmentList/internal/EditAttachmentItem/FileEdit.tsx +92 -0
- package/src/components/AttachmentList/internal/EditAttachmentItem/index.ts +4 -0
- package/src/components/AttachmentListPlaceholder/AttachmentListPlaceholder.scss +5 -0
- package/src/components/AttachmentListPlaceholder/AttachmentListPlaceholder.stories.tsx +30 -0
- package/src/components/AttachmentListPlaceholder/AttachmentListPlaceholder.tsx +72 -0
- package/src/components/AttachmentListPlaceholder/assets/empty-attachments.svg +14 -0
- package/src/components/AttachmentListPlaceholder/i18n/dicts.ts +4 -0
- package/src/components/AttachmentListPlaceholder/i18n/en.json +7 -0
- package/src/components/AttachmentListPlaceholder/i18n/index.ts +5 -0
- package/src/components/AttachmentListPlaceholder/i18n/ru.json +7 -0
- package/src/components/AttachmentListPlaceholder/index.ts +2 -0
- package/src/components/DataTable/DataTable.scss +18 -26
- package/src/components/DataTable/DataTable.tsx +23 -4
- package/src/components/ErrorTree/ErrorTree.stories.tsx +94 -0
- package/src/components/ErrorTree/ErrorTree.tsx +30 -0
- package/src/components/ErrorTree/helpers/formatAttributes.ts +9 -0
- package/src/components/ErrorTree/helpers/getIntermediateChain.ts +21 -0
- package/src/components/ErrorTree/i18n/dicts.ts +4 -0
- package/src/components/ErrorTree/i18n/en.json +11 -0
- package/src/components/ErrorTree/i18n/index.ts +5 -0
- package/src/components/ErrorTree/i18n/ru.json +13 -0
- package/src/components/ErrorTree/index.ts +1 -0
- package/src/components/ErrorTree/internal/ErrorTreeChildren.scss +5 -0
- package/src/components/ErrorTree/internal/ErrorTreeChildren.tsx +25 -0
- package/src/components/ErrorTree/internal/ErrorTreeNode.scss +95 -0
- package/src/components/ErrorTree/internal/ErrorTreeNode.tsx +178 -0
- package/src/components/ErrorTree/internal/IntermediateMessages.scss +13 -0
- package/src/components/ErrorTree/internal/IntermediateMessages.tsx +127 -0
- package/src/components/Icons/LogoCPlusPlus.tsx +34 -0
- package/src/components/Icons/index.ts +1 -0
- package/src/components/QueryResultsTable/QueryResultsTable.scss +65 -0
- package/src/components/QueryResultsTable/QueryResultsTable.tsx +112 -0
- package/src/components/QueryResultsTable/helpers/formatQueryResultType.ts +76 -0
- package/src/components/QueryResultsTable/helpers/formatQueryResultValue.ts +38 -0
- package/src/components/QueryResultsTable/i18n/dicts.ts +4 -0
- package/src/components/QueryResultsTable/i18n/en.json +5 -0
- package/src/components/QueryResultsTable/i18n/index.ts +4 -0
- package/src/components/QueryResultsTable/i18n/ru.json +5 -0
- package/src/components/QueryResultsTable/index.ts +3 -0
- package/src/components/QueryResultsTable/internal/QueryResultCell.tsx +63 -0
- package/src/components/index.ts +5 -0
- package/src/helpers/createUuid.ts +3 -0
- package/src/helpers/isObjectEqual.ts +15 -0
- package/src/helpers/useDebouncedValue.ts +14 -0
- package/src/index.ts +3 -0
- package/src/modules/Attachments/Attachments.scss +10 -0
- package/src/modules/Attachments/Attachments.stories.tsx +112 -0
- package/src/modules/Attachments/Attachments.tsx +336 -0
- package/src/modules/Attachments/i18n/dicts.ts +4 -0
- package/src/modules/Attachments/i18n/en.json +5 -0
- package/src/modules/Attachments/i18n/index.ts +5 -0
- package/src/modules/Attachments/i18n/ru.json +5 -0
- package/src/modules/Attachments/index.ts +2 -0
- package/src/modules/NavigationPreview/NavigationPreview.scss +25 -17
- package/src/modules/NavigationPreview/NavigationPreview.tsx +62 -17
- package/src/modules/NavigationPreview/story/NavigationPreview.stories.tsx +26 -1
- package/src/modules/NavigationPreview/story/mockData.ts +10 -5
- package/src/modules/QueryStatistics/QueryStatistics.scss +3 -0
- package/src/modules/QueryStatistics/QueryStatistics.tsx +125 -0
- package/src/modules/QueryStatistics/helpers.ts +96 -0
- package/src/modules/QueryStatistics/i18n/dicts.ts +4 -0
- package/src/modules/QueryStatistics/i18n/en.json +16 -0
- package/src/modules/QueryStatistics/i18n/index.ts +4 -0
- package/src/modules/QueryStatistics/i18n/ru.json +16 -0
- package/src/modules/QueryStatistics/index.ts +13 -0
- package/src/modules/QueryStatistics/internal/MetricCell.scss +12 -0
- package/src/modules/QueryStatistics/internal/MetricCell.tsx +99 -0
- package/src/modules/QueryStatistics/internal/QueryStatisticsTable.scss +8 -0
- package/src/modules/QueryStatistics/internal/QueryStatisticsTable.tsx +135 -0
- package/src/modules/QueryStatistics/internal/QueryStatisticsToolbar.scss +1 -0
- package/src/modules/QueryStatistics/internal/QueryStatisticsToolbar.tsx +61 -0
- package/src/modules/QueryStatistics/story/QueryStatistics.stories.tsx +71 -0
- package/src/modules/index.ts +14 -0
- package/src/types/declarations.d.ts +10 -0
- package/src/types/errorTree.ts +30 -0
- package/src/types/navigation.ts +11 -1
- package/src/types/queryResults.ts +48 -0
- package/src/types/queryStatistics.ts +67 -0
- package/src/widgets/QueriesNavigation/QueriesNavigation.stories.tsx +42 -33
- package/src/widgets/QueryResults/QueryResults.scss +25 -0
- package/src/widgets/QueryResults/QueryResults.stories.tsx +155 -0
- package/src/widgets/QueryResults/QueryResults.tsx +121 -0
- package/src/widgets/QueryResults/i18n/dicts.ts +4 -0
- package/src/widgets/QueryResults/i18n/en.json +10 -0
- package/src/widgets/QueryResults/i18n/index.ts +4 -0
- package/src/widgets/QueryResults/i18n/ru.json +12 -0
- package/src/widgets/QueryResults/index.ts +2 -0
- package/src/widgets/QueryResults/internal/QueryResultsSchema.tsx +41 -0
- package/src/widgets/index.ts +2 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import React, {useMemo, useRef, useState} from 'react';
|
|
2
|
+
import {Button, Flex, Icon, Tab, TabList, TabPanel, TabProvider, Text} from '@gravity-ui/uikit';
|
|
3
|
+
import {AttachmentList, AttachmentListPlaceholder, EditAttachmentItem} from '../../components';
|
|
4
|
+
import {createUuid} from '../../helpers/createUuid';
|
|
5
|
+
import {isObjectEqual} from '../../helpers/isObjectEqual';
|
|
6
|
+
import {Plus} from '@gravity-ui/icons';
|
|
7
|
+
import type {
|
|
8
|
+
AttachmentItemProps,
|
|
9
|
+
AttachmentListPlaceholderProps,
|
|
10
|
+
AttachmentListProps,
|
|
11
|
+
EditLinkValues,
|
|
12
|
+
} from '../../components';
|
|
13
|
+
import cn from 'bem-cn-lite';
|
|
14
|
+
|
|
15
|
+
import i18n from './i18n';
|
|
16
|
+
|
|
17
|
+
import './Attachments.scss';
|
|
18
|
+
|
|
19
|
+
type TabVariants = 'Current' | 'Deleted';
|
|
20
|
+
|
|
21
|
+
export type AttachItem = AttachmentItemProps['attachment'] & {token?: string; isNew?: boolean};
|
|
22
|
+
|
|
23
|
+
export type AttachmentsProps = {
|
|
24
|
+
tokens?: {value: string; title: string}[];
|
|
25
|
+
placeholderProps?: Omit<AttachmentListPlaceholderProps, 'onAddFile' | 'onAddLink'>;
|
|
26
|
+
attachmentListProps?: Pick<AttachmentListProps, 'className'>;
|
|
27
|
+
attachments?: AttachItem[];
|
|
28
|
+
deletedAttachments?: AttachItem[];
|
|
29
|
+
onChange?: (payload: {attachments: AttachItem[]; deletedAttachments: AttachItem[]}) => void;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const block = cn('qp-attachments');
|
|
33
|
+
|
|
34
|
+
export const Attachments = ({
|
|
35
|
+
tokens,
|
|
36
|
+
placeholderProps,
|
|
37
|
+
attachmentListProps,
|
|
38
|
+
onChange,
|
|
39
|
+
attachments: customerAttachments,
|
|
40
|
+
deletedAttachments: customerDeletedAttachments,
|
|
41
|
+
}: AttachmentsProps) => {
|
|
42
|
+
const [currentTab, setCurrentTab] = useState<'Current' | 'Deleted'>('Current');
|
|
43
|
+
|
|
44
|
+
const [innerAttachList, setInnerAttachList] = useState<AttachItem[]>(customerAttachments ?? []);
|
|
45
|
+
const [innerDeletedAttachList, setInnerDeletedAttachList] = useState<AttachItem[]>(
|
|
46
|
+
customerDeletedAttachments ?? [],
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
const [editingIds, setEditingIds] = useState<string[]>([]);
|
|
50
|
+
const [wasAddedIds, setWasAddedIds] = useState<string[]>([]);
|
|
51
|
+
const [wasEdited, setWasEditedIds] = useState<string[]>([]);
|
|
52
|
+
|
|
53
|
+
const attachList = customerAttachments ?? innerAttachList;
|
|
54
|
+
const deletedAttachList = customerDeletedAttachments ?? innerDeletedAttachList;
|
|
55
|
+
|
|
56
|
+
const attachCount = useMemo(() => attachList.filter((a) => !a.isNew).length, [attachList]);
|
|
57
|
+
|
|
58
|
+
const defaultAttachList = useRef(attachList);
|
|
59
|
+
|
|
60
|
+
const getDefaultValuesForLink = (linkId: string) => {
|
|
61
|
+
const currentLink = attachList.find((a) => a.id === linkId);
|
|
62
|
+
return {
|
|
63
|
+
name: currentLink?.name ?? '',
|
|
64
|
+
link: currentLink?.link ?? '',
|
|
65
|
+
token: currentLink?.token ?? '',
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const runAfterAttachAdded = (attachId: string, newAttach: AttachItem) => {
|
|
70
|
+
const editedAttach = defaultAttachList.current.find((a) => a.id === attachId);
|
|
71
|
+
|
|
72
|
+
if (!editedAttach) return;
|
|
73
|
+
|
|
74
|
+
if (isObjectEqual(editedAttach, newAttach)) {
|
|
75
|
+
setWasEditedIds(wasEdited.filter((id) => id !== attachId));
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
setWasEditedIds([...wasEdited, attachId]);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const handleAddEmptyFile = () => {
|
|
83
|
+
const id = createUuid();
|
|
84
|
+
|
|
85
|
+
const patchAttachList = [
|
|
86
|
+
...attachList.filter((a) => !a.isNew),
|
|
87
|
+
{id, name: '', isNew: true},
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
setInnerAttachList(patchAttachList);
|
|
91
|
+
setWasAddedIds([...wasAddedIds, id]);
|
|
92
|
+
setEditingIds([...editingIds, id]);
|
|
93
|
+
|
|
94
|
+
onChange?.({
|
|
95
|
+
attachments: patchAttachList,
|
|
96
|
+
deletedAttachments: deletedAttachList,
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const handleAddEmptyLink = () => {
|
|
101
|
+
const id = createUuid();
|
|
102
|
+
|
|
103
|
+
const patchAttachList = [
|
|
104
|
+
...attachList.filter((a) => !a.isNew),
|
|
105
|
+
{id, name: '', token: '', link: '', isNew: true},
|
|
106
|
+
];
|
|
107
|
+
|
|
108
|
+
setInnerAttachList(patchAttachList);
|
|
109
|
+
setWasAddedIds([...wasAddedIds, id]);
|
|
110
|
+
setEditingIds([...editingIds, id]);
|
|
111
|
+
|
|
112
|
+
onChange?.({
|
|
113
|
+
attachments: patchAttachList,
|
|
114
|
+
deletedAttachments: deletedAttachList,
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
const handleAcceptFile = (fileId: string, fileName: string) => {
|
|
119
|
+
const patchedFile = attachList.find((a) => a.id === fileId);
|
|
120
|
+
if (!patchedFile) return;
|
|
121
|
+
|
|
122
|
+
const patchEditingIds = editingIds.filter((id) => id !== fileId);
|
|
123
|
+
const patchAttachList = attachList.map((attach) => {
|
|
124
|
+
if (attach.id === fileId) return {id: fileId, name: fileName};
|
|
125
|
+
return attach;
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
setEditingIds(patchEditingIds);
|
|
129
|
+
setInnerAttachList(patchAttachList);
|
|
130
|
+
|
|
131
|
+
onChange?.({
|
|
132
|
+
attachments: patchAttachList,
|
|
133
|
+
deletedAttachments: deletedAttachList,
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
runAfterAttachAdded(fileId, {id: fileId, name: fileName});
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const handleAcceptLink = (linkId: string, link: EditLinkValues) => {
|
|
140
|
+
const patchedLink = attachList.find((a) => a.id === linkId);
|
|
141
|
+
if (!patchedLink) return;
|
|
142
|
+
|
|
143
|
+
const patchEditingIds = editingIds.filter((id) => id !== linkId);
|
|
144
|
+
const patchAttachList = attachList.map((attach) => {
|
|
145
|
+
if (attach.id === linkId) return {id: linkId, ...link};
|
|
146
|
+
return attach;
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
setEditingIds(patchEditingIds);
|
|
150
|
+
setInnerAttachList(patchAttachList);
|
|
151
|
+
|
|
152
|
+
onChange?.({
|
|
153
|
+
attachments: patchAttachList,
|
|
154
|
+
deletedAttachments: deletedAttachList,
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
runAfterAttachAdded(linkId, {id: linkId, ...link});
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const handleCancelEdit = (fileId: string) => {
|
|
161
|
+
const patchEditingIds = editingIds.filter((id) => id !== fileId);
|
|
162
|
+
const patchAttachList = attachList.filter((a) => !a.isNew);
|
|
163
|
+
|
|
164
|
+
const wasItNewAttach = attachList.some((a) => a.isNew);
|
|
165
|
+
if (wasItNewAttach) {
|
|
166
|
+
setWasAddedIds(wasAddedIds.filter((id) => id !== fileId));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
setInnerAttachList(patchAttachList);
|
|
170
|
+
setEditingIds(patchEditingIds);
|
|
171
|
+
|
|
172
|
+
onChange?.({
|
|
173
|
+
attachments: patchAttachList,
|
|
174
|
+
deletedAttachments: deletedAttachList,
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
const handleEdit = (editAttachId: string) => {
|
|
179
|
+
const patchEditingIds = [...editingIds, editAttachId];
|
|
180
|
+
|
|
181
|
+
setEditingIds(patchEditingIds);
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
const handleDelete = (attachId: string) => {
|
|
185
|
+
const deletedAttachmen = attachList.find((a) => a.id === attachId);
|
|
186
|
+
|
|
187
|
+
if (!deletedAttachmen) return;
|
|
188
|
+
|
|
189
|
+
const patchAttachList = attachList.filter((a) => a.id !== attachId);
|
|
190
|
+
const patchDeletedAttachList = [...deletedAttachList, deletedAttachmen];
|
|
191
|
+
|
|
192
|
+
setInnerAttachList(patchAttachList);
|
|
193
|
+
setInnerDeletedAttachList(patchDeletedAttachList);
|
|
194
|
+
|
|
195
|
+
onChange?.({
|
|
196
|
+
attachments: patchAttachList,
|
|
197
|
+
deletedAttachments: patchDeletedAttachList,
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
const handleDeleteAll = () => {
|
|
202
|
+
const patchAttachList: never[] = [];
|
|
203
|
+
const patchDeletedAttachList = [
|
|
204
|
+
...deletedAttachList,
|
|
205
|
+
...attachList.filter((a) => !a.isNew),
|
|
206
|
+
];
|
|
207
|
+
|
|
208
|
+
setInnerAttachList(patchAttachList);
|
|
209
|
+
setInnerDeletedAttachList(patchDeletedAttachList);
|
|
210
|
+
|
|
211
|
+
onChange?.({
|
|
212
|
+
attachments: patchAttachList,
|
|
213
|
+
deletedAttachments: patchDeletedAttachList,
|
|
214
|
+
});
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
const handleRevertDelete = (attachId: string) => {
|
|
218
|
+
const revertAttach = deletedAttachList.find((a) => a.id === attachId);
|
|
219
|
+
|
|
220
|
+
if (!revertAttach) return;
|
|
221
|
+
|
|
222
|
+
const patchAttachList = [...attachList, revertAttach];
|
|
223
|
+
const patchDeletedAttachList = deletedAttachList.filter((a) => a.id !== attachId);
|
|
224
|
+
|
|
225
|
+
setInnerAttachList(patchAttachList);
|
|
226
|
+
setInnerDeletedAttachList(patchDeletedAttachList);
|
|
227
|
+
|
|
228
|
+
onChange?.({
|
|
229
|
+
attachments: patchAttachList,
|
|
230
|
+
deletedAttachments: patchDeletedAttachList,
|
|
231
|
+
});
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
return (
|
|
235
|
+
<Flex className={block()} direction="column" width="100%" height="100%">
|
|
236
|
+
<TabProvider value={currentTab} onUpdate={(tab) => setCurrentTab(tab as TabVariants)}>
|
|
237
|
+
<TabList>
|
|
238
|
+
<Tab className={block('tab')} value="Current">
|
|
239
|
+
<Text variant="body-1">Current</Text>
|
|
240
|
+
<Text color="hint" variant="body-1">
|
|
241
|
+
{attachCount}
|
|
242
|
+
</Text>
|
|
243
|
+
</Tab>
|
|
244
|
+
<Tab className={block('tab')} value="Deleted">
|
|
245
|
+
<Text variant="body-1">Deleted</Text>
|
|
246
|
+
<Text color="hint" variant="body-1">
|
|
247
|
+
{deletedAttachList.length}
|
|
248
|
+
</Text>
|
|
249
|
+
</Tab>
|
|
250
|
+
</TabList>
|
|
251
|
+
|
|
252
|
+
<TabPanel className={block('panel')} value="Current">
|
|
253
|
+
<Flex spacing={{pt: 3}} direction="column" width="100%" height="100%">
|
|
254
|
+
{attachList.length ? (
|
|
255
|
+
<AttachmentList
|
|
256
|
+
{...attachmentListProps}
|
|
257
|
+
attachments={attachList}
|
|
258
|
+
wasAddedIds={wasAddedIds}
|
|
259
|
+
wasEditedIds={wasEdited}
|
|
260
|
+
editingIds={editingIds}
|
|
261
|
+
onEdit={(attach) => handleEdit(attach.id)}
|
|
262
|
+
onDelete={(attach) => handleDelete(attach.id)}
|
|
263
|
+
renderEditForm={(attach) => {
|
|
264
|
+
const isLink = typeof attach.link === 'string';
|
|
265
|
+
|
|
266
|
+
if (isLink) {
|
|
267
|
+
const defaultLinkValues = getDefaultValuesForLink(
|
|
268
|
+
attach.id,
|
|
269
|
+
);
|
|
270
|
+
|
|
271
|
+
return (
|
|
272
|
+
<EditAttachmentItem
|
|
273
|
+
type="link"
|
|
274
|
+
onAccept={(link) =>
|
|
275
|
+
handleAcceptLink(attach.id, link)
|
|
276
|
+
}
|
|
277
|
+
defaultValues={defaultLinkValues}
|
|
278
|
+
tokens={tokens}
|
|
279
|
+
onCancel={() => handleCancelEdit(attach.id)}
|
|
280
|
+
/>
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
return (
|
|
285
|
+
<EditAttachmentItem
|
|
286
|
+
type="file"
|
|
287
|
+
defaultFileName={attach.name}
|
|
288
|
+
onAccept={(pathName) =>
|
|
289
|
+
handleAcceptFile(attach.id, pathName)
|
|
290
|
+
}
|
|
291
|
+
onCancel={() => handleCancelEdit(attach.id)}
|
|
292
|
+
/>
|
|
293
|
+
);
|
|
294
|
+
}}
|
|
295
|
+
/>
|
|
296
|
+
) : (
|
|
297
|
+
<AttachmentListPlaceholder
|
|
298
|
+
onAddFile={handleAddEmptyFile}
|
|
299
|
+
onAddLink={handleAddEmptyLink}
|
|
300
|
+
{...placeholderProps}
|
|
301
|
+
/>
|
|
302
|
+
)}
|
|
303
|
+
{Boolean(attachList.length) && (
|
|
304
|
+
<Flex gap={2}>
|
|
305
|
+
<Button onClick={handleAddEmptyFile}>
|
|
306
|
+
<Icon data={Plus} />
|
|
307
|
+
{i18n('action_add-file')}
|
|
308
|
+
</Button>
|
|
309
|
+
|
|
310
|
+
<Button view="outlined" onClick={handleAddEmptyLink}>
|
|
311
|
+
<Icon data={Plus} />
|
|
312
|
+
{i18n('action_add-link')}
|
|
313
|
+
</Button>
|
|
314
|
+
|
|
315
|
+
<Button view="flat" onClick={handleDeleteAll}>
|
|
316
|
+
{i18n('action_remove-all')}
|
|
317
|
+
</Button>
|
|
318
|
+
</Flex>
|
|
319
|
+
)}
|
|
320
|
+
</Flex>
|
|
321
|
+
</TabPanel>
|
|
322
|
+
|
|
323
|
+
<TabPanel className={block('panel')} value="Deleted">
|
|
324
|
+
<Flex spacing={{pt: 3}} width="100%" height="100%">
|
|
325
|
+
<AttachmentList
|
|
326
|
+
{...attachmentListProps}
|
|
327
|
+
isDeleted
|
|
328
|
+
attachments={deletedAttachList}
|
|
329
|
+
onRevert={(attach) => handleRevertDelete(attach.id)}
|
|
330
|
+
/>
|
|
331
|
+
</Flex>
|
|
332
|
+
</TabPanel>
|
|
333
|
+
</TabProvider>
|
|
334
|
+
</Flex>
|
|
335
|
+
);
|
|
336
|
+
};
|
|
@@ -1,24 +1,32 @@
|
|
|
1
1
|
.qp-navigation-preview {
|
|
2
|
-
|
|
2
|
+
--data-table-border-color: var(--g-color-line-generic);
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
min-width: 0;
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
&__error {
|
|
7
|
+
display: block;
|
|
8
|
+
}
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
&__table {
|
|
11
|
+
overflow-x: auto;
|
|
12
|
+
}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
.data-table__row,
|
|
15
|
+
.data-table__head-row {
|
|
16
|
+
height: 40px;
|
|
17
|
+
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
.data-table__box_sticky-head_moving .data-table__head-row {
|
|
20
|
+
height: auto;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.data-table__sticky_head .data-table__head-row {
|
|
24
|
+
height: 40px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.data-table__th,
|
|
28
|
+
.data-table__td {
|
|
29
|
+
border-width: 0 0 1px;
|
|
30
|
+
vertical-align: middle;
|
|
31
|
+
}
|
|
24
32
|
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import React, {useMemo} from 'react';
|
|
2
2
|
import {Flex, Text} from '@gravity-ui/uikit';
|
|
3
3
|
import cn from 'bem-cn-lite';
|
|
4
|
-
import {type Column, DataTable, FieldsSearchToolbar} from '../../components';
|
|
4
|
+
import {type Column, DataTable, FieldsSearchToolbar, QueryResultsTable} from '../../components';
|
|
5
5
|
import {useVisibleColumns} from '../../helpers/useVisibleColumns';
|
|
6
|
-
import type {
|
|
6
|
+
import type {
|
|
7
|
+
NavigationPreviewColumn,
|
|
8
|
+
NavigationPreviewConfig,
|
|
9
|
+
NavigationPreviewFormatterConfig,
|
|
10
|
+
NavigationPreviewRow,
|
|
11
|
+
} from '../../types/navigation';
|
|
12
|
+
import type {QueryResultColumn} from '../../types/queryResults';
|
|
7
13
|
import {buildPreviewColumns} from './helpers/buildPreviewColumns';
|
|
8
14
|
import {filterPreviewRows} from './helpers/filterPreviewRows';
|
|
9
15
|
import i18n from './i18n';
|
|
@@ -12,7 +18,7 @@ import './NavigationPreview.scss';
|
|
|
12
18
|
const block = cn('qp-navigation-preview');
|
|
13
19
|
|
|
14
20
|
export type NavigationPreviewViewConfig<TRow extends NavigationPreviewRow = NavigationPreviewRow> =
|
|
15
|
-
{
|
|
21
|
+
NavigationPreviewFormatterConfig & {
|
|
16
22
|
tableColumns?: Array<Column<TRow>>;
|
|
17
23
|
extraColumns?: Array<Column<TRow>>;
|
|
18
24
|
};
|
|
@@ -31,6 +37,16 @@ export type NavigationPreviewProps<TRow extends NavigationPreviewRow = Navigatio
|
|
|
31
37
|
className?: string;
|
|
32
38
|
};
|
|
33
39
|
|
|
40
|
+
function getColumnName<TRow extends NavigationPreviewRow>(column: NavigationPreviewColumn<TRow>) {
|
|
41
|
+
return typeof column === 'string' ? column : column.name;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function isQueryResultColumn<TRow extends NavigationPreviewRow>(
|
|
45
|
+
column: NavigationPreviewColumn<TRow>,
|
|
46
|
+
): column is QueryResultColumn<TRow> {
|
|
47
|
+
return typeof column !== 'string';
|
|
48
|
+
}
|
|
49
|
+
|
|
34
50
|
export function NavigationPreview<TRow extends NavigationPreviewRow = NavigationPreviewRow>({
|
|
35
51
|
data,
|
|
36
52
|
view,
|
|
@@ -45,18 +61,29 @@ export function NavigationPreview<TRow extends NavigationPreviewRow = Navigation
|
|
|
45
61
|
className,
|
|
46
62
|
}: NavigationPreviewProps<TRow>) {
|
|
47
63
|
const {columns, rows, loading, loaded, errorContent} = data;
|
|
48
|
-
const {tableColumns, extraColumns} = view ?? {};
|
|
64
|
+
const {tableColumns, extraColumns, formatterSettings, maxVisibleLines} = view ?? {};
|
|
65
|
+
const columnNames = useMemo(() => columns.map(getColumnName), [columns]);
|
|
49
66
|
|
|
50
|
-
const [activeVisibleColumns, handleVisibleColumnsChange] = useVisibleColumns(
|
|
67
|
+
const [activeVisibleColumns, handleVisibleColumnsChange] = useVisibleColumns(columnNames, {
|
|
51
68
|
value: visibleColumns,
|
|
52
69
|
onChange: onVisibleColumnsChange,
|
|
53
70
|
defaultValue: defaultVisibleColumns,
|
|
54
71
|
});
|
|
55
72
|
|
|
56
|
-
const
|
|
57
|
-
() => columns.filter((column) => activeVisibleColumns.includes(column)),
|
|
73
|
+
const displayedColumns = useMemo(
|
|
74
|
+
() => columns.filter((column) => activeVisibleColumns.includes(getColumnName(column))),
|
|
58
75
|
[columns, activeVisibleColumns],
|
|
59
76
|
);
|
|
77
|
+
const displayedColumnNames = useMemo(
|
|
78
|
+
() => displayedColumns.map(getColumnName),
|
|
79
|
+
[displayedColumns],
|
|
80
|
+
);
|
|
81
|
+
const typedColumns = useMemo(
|
|
82
|
+
() => displayedColumns.filter(isQueryResultColumn),
|
|
83
|
+
[displayedColumns],
|
|
84
|
+
);
|
|
85
|
+
const canUseQueryResultsTable =
|
|
86
|
+
!tableColumns && !extraColumns?.length && typedColumns.length === displayedColumns.length;
|
|
60
87
|
|
|
61
88
|
const resolvedColumns = useMemo(() => {
|
|
62
89
|
if (tableColumns) {
|
|
@@ -66,7 +93,11 @@ export function NavigationPreview<TRow extends NavigationPreviewRow = Navigation
|
|
|
66
93
|
}, [tableColumns, extraColumns, displayedColumnNames]);
|
|
67
94
|
|
|
68
95
|
const fieldsOptions = useMemo(
|
|
69
|
-
() =>
|
|
96
|
+
() =>
|
|
97
|
+
columns.map((column) => ({
|
|
98
|
+
id: getColumnName(column),
|
|
99
|
+
title: typeof column === 'string' ? column : (column.header ?? column.name),
|
|
100
|
+
})),
|
|
70
101
|
[columns],
|
|
71
102
|
);
|
|
72
103
|
|
|
@@ -96,15 +127,29 @@ export function NavigationPreview<TRow extends NavigationPreviewRow = Navigation
|
|
|
96
127
|
hideFieldsSelector={hideFieldsSelector}
|
|
97
128
|
/>
|
|
98
129
|
)}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
130
|
+
{canUseQueryResultsTable ? (
|
|
131
|
+
<QueryResultsTable<TRow>
|
|
132
|
+
columns={typedColumns}
|
|
133
|
+
rows={filteredRows}
|
|
134
|
+
loading={loading}
|
|
135
|
+
loaded={loaded}
|
|
136
|
+
formatterSettings={formatterSettings}
|
|
137
|
+
maxVisibleLines={maxVisibleLines}
|
|
138
|
+
emptyVariant={search ? 'nothing-found' : 'no-data'}
|
|
139
|
+
displayIndices={false}
|
|
140
|
+
className={block('table')}
|
|
141
|
+
/>
|
|
142
|
+
) : (
|
|
143
|
+
<DataTable<TRow>
|
|
144
|
+
columns={resolvedColumns}
|
|
145
|
+
data={filteredRows}
|
|
146
|
+
loading={loading}
|
|
147
|
+
loaded={loaded}
|
|
148
|
+
emptyVariant={search ? 'nothing-found' : 'no-data'}
|
|
149
|
+
settings={{displayIndices: false}}
|
|
150
|
+
className={block('table')}
|
|
151
|
+
/>
|
|
152
|
+
)}
|
|
108
153
|
</Flex>
|
|
109
154
|
);
|
|
110
155
|
}
|
|
@@ -3,7 +3,7 @@ import type {Meta, StoryObj} from '@storybook/react';
|
|
|
3
3
|
import {Icon, Label} from '@gravity-ui/uikit';
|
|
4
4
|
import LockIcon from '@gravity-ui/icons/svgs/lock.svg';
|
|
5
5
|
import {NavigationPreview} from '..';
|
|
6
|
-
import type {NavigationPreviewRow} from '../../../types/navigation';
|
|
6
|
+
import type {NavigationPreviewColumn, NavigationPreviewRow} from '../../../types/navigation';
|
|
7
7
|
import {PREVIEW_COLUMNS, PREVIEW_ROWS} from './mockData';
|
|
8
8
|
|
|
9
9
|
const meta: Meta<typeof NavigationPreview> = {
|
|
@@ -68,6 +68,31 @@ export const Error: Story = {
|
|
|
68
68
|
},
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
+
const TYPED_COLUMNS: Array<NavigationPreviewColumn<NavigationPreviewRow>> = [
|
|
72
|
+
{name: 'id', type: ['DataType', 'Uint64']},
|
|
73
|
+
{name: 'tags', type: ['ListType', ['DataType', 'Utf8']]},
|
|
74
|
+
{
|
|
75
|
+
name: 'details',
|
|
76
|
+
type: [
|
|
77
|
+
'StructType',
|
|
78
|
+
[
|
|
79
|
+
['name', ['DataType', 'Utf8']],
|
|
80
|
+
['score', ['DataType', 'Double']],
|
|
81
|
+
],
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
];
|
|
85
|
+
|
|
86
|
+
const TYPED_ROWS: NavigationPreviewRow[] = [
|
|
87
|
+
{id: 1, tags: ['primary', 'preview'], details: ['Result', 42.5]},
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
export const TypedValues: Story = {
|
|
91
|
+
args: {
|
|
92
|
+
data: {columns: TYPED_COLUMNS, rows: TYPED_ROWS, loaded: true},
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
|
|
71
96
|
type CustomRow = NavigationPreviewRow & {lock?: string};
|
|
72
97
|
|
|
73
98
|
const CUSTOM_ROWS: CustomRow[] = PREVIEW_ROWS.map((row, index) => ({
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import type {NavigationPreviewRow} from '../../../types/navigation';
|
|
1
|
+
import type {NavigationPreviewColumn, NavigationPreviewRow} from '../../../types/navigation';
|
|
2
2
|
|
|
3
|
-
export const PREVIEW_COLUMNS = [
|
|
3
|
+
export const PREVIEW_COLUMNS: Array<NavigationPreviewColumn<NavigationPreviewRow>> = [
|
|
4
|
+
{name: 'id', type: ['DataType', 'Int32']},
|
|
5
|
+
{name: 'created_at', type: ['DataType', 'Utf8']},
|
|
6
|
+
{name: 'title', type: ['DataType', 'Utf8']},
|
|
7
|
+
{name: 'status', type: ['DataType', 'Utf8']},
|
|
8
|
+
];
|
|
4
9
|
|
|
5
10
|
export const PREVIEW_ROWS: NavigationPreviewRow[] = [
|
|
6
|
-
{id:
|
|
7
|
-
{id:
|
|
8
|
-
{id:
|
|
11
|
+
{id: 1, created_at: '2024-01-01T10:00:00Z', title: 'First row', status: 'active'},
|
|
12
|
+
{id: 2, created_at: '2024-01-02T11:30:00Z', title: 'Second row', status: 'active'},
|
|
13
|
+
{id: 3, created_at: '2024-01-03T09:15:00Z', title: 'Third row', status: 'archived'},
|
|
9
14
|
];
|