@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 @@
|
|
|
1
|
+
export {LogoCPlusPlus} from './LogoCPlusPlus';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
.qp-query-results-table {
|
|
2
|
+
--data-table-border-color: var(--g-color-line-generic);
|
|
3
|
+
|
|
4
|
+
min-width: 0;
|
|
5
|
+
overflow-x: auto;
|
|
6
|
+
|
|
7
|
+
.data-table__table-wrapper {
|
|
8
|
+
display: inline-block;
|
|
9
|
+
min-width: 100%;
|
|
10
|
+
vertical-align: top;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.data-table__th,
|
|
14
|
+
.data-table__td {
|
|
15
|
+
max-width: 700px;
|
|
16
|
+
vertical-align: top;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.data-table__td {
|
|
20
|
+
position: relative;
|
|
21
|
+
white-space: normal;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__header {
|
|
25
|
+
display: inline-block;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&__cell {
|
|
29
|
+
display: block;
|
|
30
|
+
padding-right: var(--g-spacing-5);
|
|
31
|
+
font-family: var(--g-font-family-monospace);
|
|
32
|
+
font-size: var(--g-text-code-2-font-size);
|
|
33
|
+
line-height: var(--g-text-code-2-line-height);
|
|
34
|
+
overflow-wrap: anywhere;
|
|
35
|
+
|
|
36
|
+
&:hover .qp-query-results-table__cell-actions,
|
|
37
|
+
&:focus-within .qp-query-results-table__cell-actions {
|
|
38
|
+
opacity: 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.unipika {
|
|
42
|
+
display: inline;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&__cell-actions {
|
|
47
|
+
position: absolute;
|
|
48
|
+
top: var(--g-spacing-1);
|
|
49
|
+
right: var(--g-spacing-1);
|
|
50
|
+
opacity: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&__show-more {
|
|
54
|
+
display: block;
|
|
55
|
+
margin-top: var(--g-spacing-1);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&__format-error {
|
|
59
|
+
color: var(--g-color-text-danger);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&__error {
|
|
63
|
+
display: block;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import React, {useMemo} from 'react';
|
|
2
|
+
import BaseDataTable, {type Column, type Settings} from '@gravity-ui/react-data-table';
|
|
3
|
+
import {Text, Tooltip} from '@gravity-ui/uikit';
|
|
4
|
+
import cn from 'bem-cn-lite';
|
|
5
|
+
import {DataTable} from '../DataTable';
|
|
6
|
+
import type {EmptyContentVariant} from '../EmptyContent';
|
|
7
|
+
import type {QueryResultColumn, QueryResultFormatterSettings} from '../../types/queryResults';
|
|
8
|
+
import {formatQueryResultType, isQueryResultNumericType} from './helpers/formatQueryResultType';
|
|
9
|
+
import {QueryResultCell} from './internal/QueryResultCell';
|
|
10
|
+
|
|
11
|
+
import '@gravity-ui/unipika/dist/unipika.css';
|
|
12
|
+
import './QueryResultsTable.scss';
|
|
13
|
+
|
|
14
|
+
const block = cn('qp-query-results-table');
|
|
15
|
+
const DEFAULT_MAX_VISIBLE_LINES = 5;
|
|
16
|
+
|
|
17
|
+
export type QueryResultsTableProps<TRow extends Record<string, unknown>> = {
|
|
18
|
+
columns: Array<QueryResultColumn<TRow>>;
|
|
19
|
+
/** Values use the YQL wire representation consumed by @gravity-ui/unipika. */
|
|
20
|
+
rows: TRow[];
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
loaded?: boolean;
|
|
23
|
+
errorContent?: React.ReactNode;
|
|
24
|
+
rowKey?: (row: TRow, index: number) => string | number;
|
|
25
|
+
formatterSettings?: QueryResultFormatterSettings;
|
|
26
|
+
maxVisibleLines?: number;
|
|
27
|
+
emptyVariant?: EmptyContentVariant;
|
|
28
|
+
displayIndices?: boolean;
|
|
29
|
+
stripedRows?: boolean;
|
|
30
|
+
/** Set to false when the surrounding layout does not need a sticky header. */
|
|
31
|
+
stickyHead?: Settings['stickyHead'] | false;
|
|
32
|
+
className?: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export function QueryResultsTable<TRow extends Record<string, unknown>>({
|
|
36
|
+
columns,
|
|
37
|
+
rows,
|
|
38
|
+
loading,
|
|
39
|
+
loaded,
|
|
40
|
+
errorContent,
|
|
41
|
+
rowKey,
|
|
42
|
+
formatterSettings,
|
|
43
|
+
maxVisibleLines = DEFAULT_MAX_VISIBLE_LINES,
|
|
44
|
+
emptyVariant,
|
|
45
|
+
displayIndices = true,
|
|
46
|
+
stripedRows = true,
|
|
47
|
+
stickyHead = BaseDataTable.MOVING,
|
|
48
|
+
className,
|
|
49
|
+
}: QueryResultsTableProps<TRow>) {
|
|
50
|
+
const resolvedStickyHead = stickyHead === false ? undefined : stickyHead;
|
|
51
|
+
const tableColumns = useMemo<Array<Column<TRow>>>(
|
|
52
|
+
() =>
|
|
53
|
+
columns.map((column) => {
|
|
54
|
+
const type = formatQueryResultType(column.type);
|
|
55
|
+
const align =
|
|
56
|
+
column.align ??
|
|
57
|
+
(isQueryResultNumericType(column.type) ? BaseDataTable.LEFT : undefined);
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
name: column.name,
|
|
61
|
+
width: column.width,
|
|
62
|
+
align,
|
|
63
|
+
sortable: false,
|
|
64
|
+
headerTitle: type,
|
|
65
|
+
header: (
|
|
66
|
+
<Tooltip content={type}>
|
|
67
|
+
<span className={block('header')}>{column.header ?? column.name}</span>
|
|
68
|
+
</Tooltip>
|
|
69
|
+
),
|
|
70
|
+
render: ({row, index}) => (
|
|
71
|
+
<QueryResultCell
|
|
72
|
+
row={row}
|
|
73
|
+
value={row[column.name]}
|
|
74
|
+
index={index}
|
|
75
|
+
column={column}
|
|
76
|
+
formatterSettings={formatterSettings}
|
|
77
|
+
maxVisibleLines={maxVisibleLines}
|
|
78
|
+
/>
|
|
79
|
+
),
|
|
80
|
+
};
|
|
81
|
+
}),
|
|
82
|
+
[columns, formatterSettings, maxVisibleLines],
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
if (errorContent) {
|
|
86
|
+
return (
|
|
87
|
+
<Text color="danger" className={block('error', className)}>
|
|
88
|
+
{errorContent}
|
|
89
|
+
</Text>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return (
|
|
94
|
+
<div className={block(null, className)}>
|
|
95
|
+
<DataTable<TRow>
|
|
96
|
+
columns={tableColumns}
|
|
97
|
+
data={rows}
|
|
98
|
+
loading={loading}
|
|
99
|
+
loaded={loaded ?? !loading}
|
|
100
|
+
emptyVariant={emptyVariant}
|
|
101
|
+
rowKey={rowKey}
|
|
102
|
+
settings={{
|
|
103
|
+
displayIndices,
|
|
104
|
+
stripedRows,
|
|
105
|
+
sortable: false,
|
|
106
|
+
stickyHead: resolvedStickyHead,
|
|
107
|
+
syncHeadOnResize: Boolean(resolvedStickyHead),
|
|
108
|
+
}}
|
|
109
|
+
/>
|
|
110
|
+
</div>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type {QueryResultDataType} from '../../../types/queryResults';
|
|
2
|
+
|
|
3
|
+
function isQueryResultDataType(value: unknown): value is QueryResultDataType {
|
|
4
|
+
return Array.isArray(value) && typeof value[0] === 'string';
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function formatParameter(value: unknown): string {
|
|
8
|
+
if (Array.isArray(value)) {
|
|
9
|
+
if (isQueryResultDataType(value)) {
|
|
10
|
+
return formatQueryResultType(value);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return value.map(formatParameter).join(', ');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return String(value);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function formatQueryResultType(type: QueryResultDataType): string {
|
|
20
|
+
const [name, ...params] = type;
|
|
21
|
+
|
|
22
|
+
switch (name) {
|
|
23
|
+
case 'DataType':
|
|
24
|
+
return [params[0], ...params.slice(1)].filter(Boolean).join(', ');
|
|
25
|
+
case 'OptionalType':
|
|
26
|
+
return `Optional<${formatParameter(params[0])}>`;
|
|
27
|
+
case 'TaggedType':
|
|
28
|
+
return `Tagged<${formatParameter(params[0])}, ${formatParameter(params[1])}>`;
|
|
29
|
+
case 'ListType':
|
|
30
|
+
case 'StreamType':
|
|
31
|
+
return `${name.replace('Type', '')}<${formatParameter(params[0])}>`;
|
|
32
|
+
case 'DictType':
|
|
33
|
+
return `Dict<${params.map(formatParameter).join(', ')}>`;
|
|
34
|
+
case 'TupleType':
|
|
35
|
+
return `Tuple<${formatParameter(params[0])}>`;
|
|
36
|
+
case 'StructType':
|
|
37
|
+
return `Struct<${Array.isArray(params[0]) ? params[0].map(formatParameter).join(', ') : ''}>`;
|
|
38
|
+
case 'VariantType':
|
|
39
|
+
return `Variant<${formatParameter(params[0])}>`;
|
|
40
|
+
case 'PgType':
|
|
41
|
+
return `Pg<${formatParameter(params[0])}>`;
|
|
42
|
+
default:
|
|
43
|
+
return params.length ? `${name}<${params.map(formatParameter).join(', ')}>` : name;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const NUMERIC_TYPES = new Set([
|
|
48
|
+
'Double',
|
|
49
|
+
'Float',
|
|
50
|
+
'Int64',
|
|
51
|
+
'Int32',
|
|
52
|
+
'Int16',
|
|
53
|
+
'Int8',
|
|
54
|
+
'Uint64',
|
|
55
|
+
'Uint32',
|
|
56
|
+
'Uint16',
|
|
57
|
+
'Uint8',
|
|
58
|
+
]);
|
|
59
|
+
|
|
60
|
+
export function isQueryResultNumericType(type: QueryResultDataType): boolean {
|
|
61
|
+
const [name, ...params] = type;
|
|
62
|
+
|
|
63
|
+
if (name === 'DataType') {
|
|
64
|
+
return typeof params[0] === 'string' && NUMERIC_TYPES.has(params[0]);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (name === 'OptionalType') {
|
|
68
|
+
return isQueryResultDataType(params[0]) && isQueryResultNumericType(params[0]);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (name === 'TaggedType') {
|
|
72
|
+
return isQueryResultDataType(params[1]) && isQueryResultNumericType(params[1]);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import unipika from '@gravity-ui/unipika';
|
|
2
|
+
import type {QueryResultDataType, QueryResultFormatterSettings} from '../../../types/queryResults';
|
|
3
|
+
|
|
4
|
+
const formatter = unipika();
|
|
5
|
+
|
|
6
|
+
const DEFAULT_FORMATTER_SETTINGS: QueryResultFormatterSettings = {
|
|
7
|
+
escapeWhitespace: false,
|
|
8
|
+
decodeUTF8: false,
|
|
9
|
+
binaryAsHex: true,
|
|
10
|
+
escapeYQLStrings: true,
|
|
11
|
+
omitStructNull: true,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type FormattedQueryResultValue =
|
|
15
|
+
{html: string; text: string; error: false} | {html: ''; text: ''; error: true};
|
|
16
|
+
|
|
17
|
+
export function formatQueryResultValue(
|
|
18
|
+
value: unknown,
|
|
19
|
+
type: QueryResultDataType,
|
|
20
|
+
settings?: QueryResultFormatterSettings,
|
|
21
|
+
): FormattedQueryResultValue {
|
|
22
|
+
const formatterSettings = {...DEFAULT_FORMATTER_SETTINGS, ...settings};
|
|
23
|
+
const input: [unknown, unknown] = [value, type];
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
return {
|
|
27
|
+
html: formatter.formatFromYQL(input, {...formatterSettings, asHTML: true}),
|
|
28
|
+
text: formatter.formatFromYQL(input, {
|
|
29
|
+
...formatterSettings,
|
|
30
|
+
asHTML: false,
|
|
31
|
+
maxStringSize: undefined,
|
|
32
|
+
}),
|
|
33
|
+
error: false,
|
|
34
|
+
};
|
|
35
|
+
} catch {
|
|
36
|
+
return {html: '', text: '', error: true};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React, {useMemo, useState} from 'react';
|
|
2
|
+
import {Button, ClipboardButton} from '@gravity-ui/uikit';
|
|
3
|
+
import cn from 'bem-cn-lite';
|
|
4
|
+
import type {QueryResultColumn, QueryResultFormatterSettings} from '../../../types/queryResults';
|
|
5
|
+
import {formatQueryResultValue} from '../helpers/formatQueryResultValue';
|
|
6
|
+
import i18n from '../i18n';
|
|
7
|
+
|
|
8
|
+
const block = cn('qp-query-results-table');
|
|
9
|
+
|
|
10
|
+
export type QueryResultCellProps<TRow extends Record<string, unknown>> = {
|
|
11
|
+
row: TRow;
|
|
12
|
+
value: unknown;
|
|
13
|
+
index: number;
|
|
14
|
+
column: QueryResultColumn<TRow>;
|
|
15
|
+
formatterSettings?: QueryResultFormatterSettings;
|
|
16
|
+
maxVisibleLines: number;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export function QueryResultCell<TRow extends Record<string, unknown>>({
|
|
20
|
+
row,
|
|
21
|
+
value,
|
|
22
|
+
index,
|
|
23
|
+
column,
|
|
24
|
+
formatterSettings,
|
|
25
|
+
maxVisibleLines,
|
|
26
|
+
}: QueryResultCellProps<TRow>) {
|
|
27
|
+
const [expanded, setExpanded] = useState(false);
|
|
28
|
+
const formatted = useMemo(
|
|
29
|
+
() => formatQueryResultValue(value, column.type, formatterSettings),
|
|
30
|
+
[column.type, formatterSettings, value],
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
if (column.render) {
|
|
34
|
+
return <>{column.render({row, value, index, column})}</>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (formatted.error) {
|
|
38
|
+
return <span className={block('format-error')}>{i18n('alert_format-value-error')}</span>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const lines = formatted.html.split('\n');
|
|
42
|
+
const hasMore = lines.length > maxVisibleLines;
|
|
43
|
+
const html = expanded || !hasMore ? formatted.html : lines.slice(0, maxVisibleLines).join('\n');
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<span className={block('cell')}>
|
|
47
|
+
<span className="unipika" dangerouslySetInnerHTML={{__html: html}} />
|
|
48
|
+
<span className={block('cell-actions')}>
|
|
49
|
+
<ClipboardButton text={formatted.text} view="flat-secondary" size="s" />
|
|
50
|
+
</span>
|
|
51
|
+
{hasMore && (
|
|
52
|
+
<Button
|
|
53
|
+
view="flat"
|
|
54
|
+
size="s"
|
|
55
|
+
className={block('show-more')}
|
|
56
|
+
onClick={() => setExpanded((currentExpanded) => !currentExpanded)}
|
|
57
|
+
>
|
|
58
|
+
{i18n(expanded ? 'action_show-less' : 'action_show-more')}
|
|
59
|
+
</Button>
|
|
60
|
+
)}
|
|
61
|
+
</span>
|
|
62
|
+
);
|
|
63
|
+
}
|
package/src/components/index.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export {DataTable} from './DataTable';
|
|
2
2
|
export type {DataTableProps, Column} from './DataTable';
|
|
3
|
+
export {QueryResultsTable, formatQueryResultType} from './QueryResultsTable';
|
|
4
|
+
export type {QueryResultsTableProps} from './QueryResultsTable';
|
|
3
5
|
export {QueryStatusIcon} from './QueryStatusIcon';
|
|
4
6
|
export {QueryDuration} from './QueryDuration';
|
|
5
7
|
export {LazyList} from './LazyList';
|
|
@@ -55,6 +57,7 @@ export type {
|
|
|
55
57
|
export * from './Dashboard';
|
|
56
58
|
export {Chart} from './Chart';
|
|
57
59
|
export type {ChartAction, ChartProps} from './Chart';
|
|
60
|
+
export {ErrorTree} from './ErrorTree';
|
|
58
61
|
export {
|
|
59
62
|
MonacoLanguage,
|
|
60
63
|
YT_DARK_HC_MONACO_THEME,
|
|
@@ -64,3 +67,5 @@ export {
|
|
|
64
67
|
MONACO_THEME_BY_UI,
|
|
65
68
|
} from './MonacoEditor';
|
|
66
69
|
export type {MonacoThemeName} from './MonacoEditor';
|
|
70
|
+
export * from './AttachmentList';
|
|
71
|
+
export * from './AttachmentListPlaceholder';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const isObjectEqual = (obj1: Record<string, unknown>, obj2: Record<string, unknown>) => {
|
|
2
|
+
const keys1 = Object.keys(obj1);
|
|
3
|
+
const keys2 = Object.keys(obj2);
|
|
4
|
+
|
|
5
|
+
const compareKeys = keys1.length > keys2.length ? keys1 : keys2;
|
|
6
|
+
|
|
7
|
+
for (const key of compareKeys) {
|
|
8
|
+
const v1 = obj1[key];
|
|
9
|
+
const v2 = obj2[key];
|
|
10
|
+
|
|
11
|
+
if (v1 !== v2) return false;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return true;
|
|
15
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {useEffect, useState} from 'react';
|
|
2
|
+
|
|
3
|
+
/** Delays a changing value without duplicating timer lifecycle handling in consumers. */
|
|
4
|
+
export function useDebouncedValue<T>(value: T, delay: number): T {
|
|
5
|
+
const [debouncedValue, setDebouncedValue] = useState(value);
|
|
6
|
+
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
const timeoutId = setTimeout(() => setDebouncedValue(value), delay);
|
|
9
|
+
|
|
10
|
+
return () => clearTimeout(timeoutId);
|
|
11
|
+
}, [delay, value]);
|
|
12
|
+
|
|
13
|
+
return debouncedValue;
|
|
14
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -7,3 +7,6 @@ export type {SavedQuery} from './types/savedQueries';
|
|
|
7
7
|
export * from './types/tutorial';
|
|
8
8
|
export * from './types/navigation';
|
|
9
9
|
export * from './types/pathEditor';
|
|
10
|
+
export * from './types/errorTree';
|
|
11
|
+
export * from './types/queryStatistics';
|
|
12
|
+
export * from './types/queryResults';
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import React, {useState} from 'react';
|
|
2
|
+
import type {Meta, StoryObj} from '@storybook/react';
|
|
3
|
+
import {fn} from 'storybook/test';
|
|
4
|
+
import {Attachments} from './Attachments';
|
|
5
|
+
|
|
6
|
+
type AttachmentsProps = React.ComponentProps<typeof Attachments>;
|
|
7
|
+
type Attachment = NonNullable<AttachmentsProps['attachments']>[number];
|
|
8
|
+
|
|
9
|
+
const attachments: Attachment[] = [
|
|
10
|
+
{id: 'readme', name: 'README.md'},
|
|
11
|
+
{id: 'query', name: 'daily-report.sql'},
|
|
12
|
+
{
|
|
13
|
+
id: 'documentation',
|
|
14
|
+
name: 'Query documentation',
|
|
15
|
+
link: 'https://example.com/docs/query',
|
|
16
|
+
token: 'documentation-token',
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
const deletedAttachments: Attachment[] = [
|
|
21
|
+
{id: 'archive', name: 'archive.csv'},
|
|
22
|
+
{
|
|
23
|
+
id: 'old-dashboard',
|
|
24
|
+
name: 'Old dashboard',
|
|
25
|
+
link: 'https://example.com/dashboards/old',
|
|
26
|
+
token: 'dashboard-token',
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
const tokens: NonNullable<AttachmentsProps['tokens']> = [
|
|
31
|
+
{value: 'documentation-token', title: 'Documentation token'},
|
|
32
|
+
{value: 'dashboard-token', title: 'Dashboard token'},
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
const meta = {
|
|
36
|
+
title: 'Modules/Attachments',
|
|
37
|
+
component: Attachments,
|
|
38
|
+
tags: ['autodocs'],
|
|
39
|
+
parameters: {
|
|
40
|
+
layout: 'padded',
|
|
41
|
+
},
|
|
42
|
+
decorators: [
|
|
43
|
+
(Story) => (
|
|
44
|
+
<div style={{height: 500, width: 322}}>
|
|
45
|
+
<Story />
|
|
46
|
+
</div>
|
|
47
|
+
),
|
|
48
|
+
],
|
|
49
|
+
args: {
|
|
50
|
+
tokens,
|
|
51
|
+
onChange: fn(),
|
|
52
|
+
},
|
|
53
|
+
} satisfies Meta<typeof Attachments>;
|
|
54
|
+
|
|
55
|
+
export default meta;
|
|
56
|
+
type Story = StoryObj<typeof meta>;
|
|
57
|
+
|
|
58
|
+
/** Empty state with content configured through `placeholderProps`. */
|
|
59
|
+
export const Default: Story = {
|
|
60
|
+
args: {
|
|
61
|
+
placeholderProps: {
|
|
62
|
+
title: 'No attachments',
|
|
63
|
+
description: 'Add files or links that should be available to the query.',
|
|
64
|
+
linkForDoc: '#attachments-help',
|
|
65
|
+
linkText: 'About attachments',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/** Initial files and links supplied through the uncontrolled `attachments` API. */
|
|
71
|
+
export const WithAttachments: Story = {
|
|
72
|
+
args: {
|
|
73
|
+
attachments,
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/** Current and deleted collections. Open the Deleted tab to restore an attachment. */
|
|
78
|
+
export const WithDeletedAttachments: Story = {
|
|
79
|
+
args: {
|
|
80
|
+
attachments,
|
|
81
|
+
deletedAttachments,
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const ControlledAttachments = (props: AttachmentsProps) => {
|
|
86
|
+
const [currentAttachments, setCurrentAttachments] = useState(props.attachments ?? []);
|
|
87
|
+
const [currentDeletedAttachments, setCurrentDeletedAttachments] = useState(
|
|
88
|
+
props.deletedAttachments ?? [],
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<Attachments
|
|
93
|
+
{...props}
|
|
94
|
+
attachments={currentAttachments}
|
|
95
|
+
deletedAttachments={currentDeletedAttachments}
|
|
96
|
+
onChange={(payload) => {
|
|
97
|
+
setCurrentAttachments(payload.attachments);
|
|
98
|
+
setCurrentDeletedAttachments(payload.deletedAttachments);
|
|
99
|
+
props.onChange?.(payload);
|
|
100
|
+
}}
|
|
101
|
+
/>
|
|
102
|
+
);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/** Controlled usage: every edit, delete, restore, or addition is applied from `onChange`. */
|
|
106
|
+
export const Controlled: Story = {
|
|
107
|
+
args: {
|
|
108
|
+
attachments,
|
|
109
|
+
deletedAttachments,
|
|
110
|
+
},
|
|
111
|
+
render: (args) => <ControlledAttachments {...args} />,
|
|
112
|
+
};
|