@gravity-ui/querieskit 1.2.0 → 1.3.1
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/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/HistoryLayout/HistoryLayout.d.ts +1 -1
- package/build/cjs/modules/HistoryLayout/HistoryLayout.js +1 -1
- package/build/cjs/modules/HistoryLayout/HistoryLayout.js.map +1 -1
- 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/RowsList/RowsList.css +4 -0
- package/build/cjs/modules/RowsList/RowsList.css.map +1 -1
- 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/queryList.d.ts +1 -1
- package/build/cjs/types/queryList.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/QueriesHistory/QueriesHistory.js +1 -2
- package/build/cjs/widgets/QueriesHistory/QueriesHistory.js.map +1 -1
- package/build/cjs/widgets/QueriesHistory/QueriesHistory.stories.d.ts +1 -0
- package/build/cjs/widgets/QueriesHistory/QueriesHistory.stories.js +82 -1
- package/build/cjs/widgets/QueriesHistory/QueriesHistory.stories.js.map +1 -1
- 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/SavedQueries/SavedQueries.stories.js.map +1 -1
- 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/HistoryLayout/HistoryLayout.d.ts +1 -1
- package/build/esm/modules/HistoryLayout/HistoryLayout.js +1 -1
- package/build/esm/modules/HistoryLayout/HistoryLayout.js.map +1 -1
- 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/RowsList/RowsList.css +4 -0
- package/build/esm/modules/RowsList/RowsList.css.map +1 -1
- package/build/esm/modules/RowsList/RowsList.scss +3 -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/queryList.d.ts +1 -1
- package/build/esm/types/queryList.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/QueriesHistory/QueriesHistory.js +1 -2
- package/build/esm/widgets/QueriesHistory/QueriesHistory.js.map +1 -1
- package/build/esm/widgets/QueriesHistory/QueriesHistory.stories.d.ts +1 -0
- package/build/esm/widgets/QueriesHistory/QueriesHistory.stories.js +81 -0
- package/build/esm/widgets/QueriesHistory/QueriesHistory.stories.js.map +1 -1
- 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/SavedQueries/SavedQueries.stories.js.map +1 -1
- 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 +29 -2
- package/.agents/skills/code-review-checklist/SKILL.md +0 -135
- package/.agents/skills/github-pr-review/SKILL.md +0 -24
- package/.agents/skills/gravity-ui/SKILL.md +0 -175
- package/.agents/skills/gravity-ui/references/icons.md +0 -60
- package/.agents/skills/gravity-ui/references/layout.md +0 -366
- package/.agents/skills/gravity-ui/references/package-routing.md +0 -424
- package/.agents/skills/gravity-ui/references/theming.md +0 -309
- package/.agents/skills/gravity-ui/rules/hallucination-traps.md +0 -361
- package/.agents/skills/gravity-ui/scripts/icon-image-search.sh +0 -63
- package/.eslintignore +0 -3
- package/.github/workflows/ci.yml +0 -25
- package/.github/workflows/main-preview.yml +0 -31
- package/.github/workflows/pr-preview-build.yml +0 -13
- package/.github/workflows/pr-preview-deploy.yml +0 -22
- package/.github/workflows/pr-title.yml +0 -27
- package/.github/workflows/release.yml +0 -20
- package/.nvmrc +0 -1
- package/.prettierrc.js +0 -1
- package/.storybook/main.ts +0 -31
- package/.storybook/preview.tsx +0 -43
- package/.storybook/redefinition.css +0 -3
- package/.storybook/tsconfig.json +0 -9
- package/.stylelintrc +0 -9
- package/AGENTS.md +0 -117
- package/CHANGELOG.md +0 -86
- package/CODEOWNERS +0 -1
- package/CONTRIBUTING.md +0 -31
- package/NOTICES.md +0 -8
- package/app-builder.config.ts +0 -9
- package/commitlint.config.cjs +0 -6
- package/eslint.config.mjs +0 -53
- package/plans/i18n-rules.md +0 -116
- package/plans/navigation-architecture.md +0 -262
- package/plans/queries-history-structure.md +0 -143
- package/plans/queries-navigation-architecture-review.md +0 -217
- package/skills-lock.json +0 -11
- package/src/components/AddChartButton/AddChartButton.scss +0 -12
- package/src/components/AddChartButton/AddChartButton.stories.tsx +0 -34
- package/src/components/AddChartButton/AddChartButton.tsx +0 -139
- package/src/components/AddChartButton/index.ts +0 -6
- package/src/components/Breadcrumbs/Breadcrumbs.scss +0 -25
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +0 -114
- package/src/components/Breadcrumbs/helpers/parsePathSegments.ts +0 -16
- package/src/components/Breadcrumbs/i18n/dicts.ts +0 -4
- package/src/components/Breadcrumbs/i18n/en.json +0 -4
- package/src/components/Breadcrumbs/i18n/index.ts +0 -5
- package/src/components/Breadcrumbs/i18n/ru.json +0 -4
- package/src/components/Breadcrumbs/index.ts +0 -2
- package/src/components/Chart/Chart.scss +0 -40
- package/src/components/Chart/Chart.stories.tsx +0 -75
- package/src/components/Chart/Chart.tsx +0 -120
- package/src/components/Chart/i18n/dicts.ts +0 -4
- package/src/components/Chart/i18n/en.json +0 -6
- package/src/components/Chart/i18n/index.ts +0 -5
- package/src/components/Chart/i18n/ru.json +0 -6
- package/src/components/Chart/index.ts +0 -2
- package/src/components/ChartEditorForm/ChartEditorForm.scss +0 -20
- package/src/components/ChartEditorForm/ChartEditorForm.stories.tsx +0 -88
- package/src/components/ChartEditorForm/ChartEditorForm.tsx +0 -120
- package/src/components/ChartEditorForm/helpers/resolveLabels.ts +0 -17
- package/src/components/ChartEditorForm/i18n/dicts.ts +0 -4
- package/src/components/ChartEditorForm/i18n/en.json +0 -12
- package/src/components/ChartEditorForm/i18n/index.ts +0 -5
- package/src/components/ChartEditorForm/i18n/ru.json +0 -12
- package/src/components/ChartEditorForm/index.ts +0 -7
- package/src/components/ChartEditorForm/internal/Field.tsx +0 -11
- package/src/components/ChartEditorForm/types.ts +0 -44
- package/src/components/ClusterRow/ClusterRow.tsx +0 -34
- package/src/components/ClusterRow/index.ts +0 -2
- package/src/components/Dashboard/Dashboard.scss +0 -4
- package/src/components/Dashboard/Dashboard.stories.scss +0 -18
- package/src/components/Dashboard/Dashboard.stories.tsx +0 -248
- package/src/components/Dashboard/Dashboard.tsx +0 -51
- package/src/components/Dashboard/helpers/createDefaultLayout.ts +0 -43
- package/src/components/Dashboard/hooks/useDashboardConfig.ts +0 -63
- package/src/components/Dashboard/index.ts +0 -2
- package/src/components/Dashboard/internal/DashPlate.scss +0 -23
- package/src/components/Dashboard/internal/DashPlate.tsx +0 -35
- package/src/components/Dashboard/internal/DashboardProvider.tsx +0 -37
- package/src/components/Dashboard/types.ts +0 -21
- package/src/components/DataTable/DataTable.scss +0 -35
- package/src/components/DataTable/DataTable.stories.tsx +0 -65
- package/src/components/DataTable/DataTable.tsx +0 -81
- package/src/components/DataTable/index.ts +0 -1
- package/src/components/EditableRowTitle/EditableRowTitle.tsx +0 -67
- package/src/components/EditableRowTitle/index.ts +0 -2
- package/src/components/EmptyContent/EmptyContent.scss +0 -3
- package/src/components/EmptyContent/EmptyContent.tsx +0 -57
- package/src/components/EmptyContent/i18n/dicts.ts +0 -4
- package/src/components/EmptyContent/i18n/en.json +0 -7
- package/src/components/EmptyContent/i18n/index.ts +0 -5
- package/src/components/EmptyContent/i18n/ru.json +0 -7
- package/src/components/EmptyContent/index.ts +0 -1
- package/src/components/FieldsSearchToolbar/FieldsSearchToolbar.tsx +0 -48
- package/src/components/FieldsSearchToolbar/index.ts +0 -2
- package/src/components/FieldsSelector/FieldsSelector.scss +0 -18
- package/src/components/FieldsSelector/FieldsSelector.stories.tsx +0 -48
- package/src/components/FieldsSelector/FieldsSelector.tsx +0 -92
- package/src/components/FieldsSelector/i18n/dicts.ts +0 -4
- package/src/components/FieldsSelector/i18n/en.json +0 -3
- package/src/components/FieldsSelector/i18n/index.ts +0 -5
- package/src/components/FieldsSelector/i18n/ru.json +0 -3
- package/src/components/FieldsSelector/index.ts +0 -2
- package/src/components/HistoryFilter/HistoryFilter.scss +0 -5
- package/src/components/HistoryFilter/HistoryFilter.stories.tsx +0 -69
- package/src/components/HistoryFilter/HistoryFilter.tsx +0 -64
- package/src/components/HistoryFilter/i18n/dicts.ts +0 -4
- package/src/components/HistoryFilter/i18n/en.json +0 -4
- package/src/components/HistoryFilter/i18n/index.ts +0 -5
- package/src/components/HistoryFilter/i18n/ru.json +0 -4
- package/src/components/HistoryFilter/index.ts +0 -1
- package/src/components/HistoryGroupHeader/HistoryGroupHeader.scss +0 -7
- package/src/components/HistoryGroupHeader/HistoryGroupHeader.tsx +0 -18
- package/src/components/HistoryGroupHeader/index.ts +0 -1
- package/src/components/HistoryPrivateIcon/HistoryPrivateIcon.scss +0 -7
- package/src/components/HistoryPrivateIcon/HistoryPrivateIcon.tsx +0 -22
- package/src/components/HistoryPrivateIcon/index.ts +0 -1
- package/src/components/LazyList/LazyList.scss +0 -13
- package/src/components/LazyList/LazyList.tsx +0 -97
- package/src/components/LazyList/index.ts +0 -2
- package/src/components/ListSpinner/ListSpinner.scss +0 -3
- package/src/components/ListSpinner/ListSpinner.tsx +0 -18
- package/src/components/ListSpinner/index.ts +0 -2
- package/src/components/MonacoEditor/MonacoEditor.tsx +0 -112
- package/src/components/MonacoEditor/MonacoEditorThemes.tsx +0 -73
- package/src/components/MonacoEditor/index.ts +0 -11
- package/src/components/MonacoEditor/monaco-yql-languages/_.contribution.ts +0 -193
- package/src/components/MonacoEditor/monaco-yql-languages/clickhouse/clickhouse.contribution.ts +0 -14
- package/src/components/MonacoEditor/monaco-yql-languages/clickhouse/clickhouse.keywords.ts +0 -146
- package/src/components/MonacoEditor/monaco-yql-languages/clickhouse/clickhouse.ts +0 -217
- package/src/components/MonacoEditor/monaco-yql-languages/constants.ts +0 -6
- package/src/components/MonacoEditor/monaco-yql-languages/fillers/monaco-editor-core.ts +0 -3
- package/src/components/MonacoEditor/monaco-yql-languages/index.ts +0 -1
- package/src/components/MonacoEditor/monaco-yql-languages/monaco.contribution.ts +0 -5
- package/src/components/MonacoEditor/monaco-yql-languages/s-expressions/s-expressions.contribution.ts +0 -14
- package/src/components/MonacoEditor/monaco-yql-languages/s-expressions/s-expressions.keywords.ts +0 -97
- package/src/components/MonacoEditor/monaco-yql-languages/s-expressions/s-expressions.ts +0 -170
- package/src/components/MonacoEditor/monaco-yql-languages/themes/themes.contribution.ts +0 -35
- package/src/components/MonacoEditor/monaco-yql-languages/yql/yql.contribution.ts +0 -14
- package/src/components/MonacoEditor/monaco-yql-languages/yql/yql.keywords.ts +0 -13
- package/src/components/MonacoEditor/monaco-yql-languages/yql/yql.ts +0 -178
- package/src/components/MonacoEditor/monaco-yql-languages/yql_ansi/yql_ansi.contribution.ts +0 -14
- package/src/components/MonacoEditor/monaco-yql-languages/yql_ansi/yql_ansi.keywords.ts +0 -45
- package/src/components/MonacoEditor/monaco-yql-languages/yql_ansi/yql_ansi.ts +0 -142
- package/src/components/NavigationActionButtons/NavigationActionButtons.tsx +0 -46
- package/src/components/NavigationActionButtons/index.ts +0 -2
- package/src/components/NavigationItemRow/NavigationItemRow.tsx +0 -28
- package/src/components/NavigationItemRow/index.ts +0 -2
- package/src/components/PathEditor/PathEditor.scss +0 -41
- package/src/components/PathEditor/PathEditor.stories.helpers.ts +0 -118
- package/src/components/PathEditor/PathEditor.stories.tsx +0 -57
- package/src/components/PathEditor/PathEditor.tsx +0 -380
- package/src/components/PathEditor/helpers/suggestions.ts +0 -40
- package/src/components/PathEditor/i18n/dicts.ts +0 -4
- package/src/components/PathEditor/i18n/en.json +0 -4
- package/src/components/PathEditor/i18n/index.ts +0 -5
- package/src/components/PathEditor/i18n/ru.json +0 -4
- package/src/components/PathEditor/index.ts +0 -2
- package/src/components/QueryDuration/QueryDuration.scss +0 -6
- package/src/components/QueryDuration/QueryDuration.stories.tsx +0 -40
- package/src/components/QueryDuration/QueryDuration.tsx +0 -21
- package/src/components/QueryDuration/index.ts +0 -1
- package/src/components/QueryDuration/useQueryDuration.ts +0 -34
- package/src/components/QueryStatusIcon/QueryStatusIcon.scss +0 -17
- package/src/components/QueryStatusIcon/QueryStatusIcon.stories.tsx +0 -50
- package/src/components/QueryStatusIcon/QueryStatusIcon.tsx +0 -37
- package/src/components/QueryStatusIcon/index.ts +0 -1
- package/src/components/RowActionsMenu/RowActionsMenu.tsx +0 -47
- package/src/components/RowActionsMenu/index.ts +0 -2
- package/src/components/RowLink/RowLink.scss +0 -8
- package/src/components/RowLink/RowLink.tsx +0 -23
- package/src/components/RowLink/index.ts +0 -2
- package/src/components/SearchRowLayout/SearchRowLayout.scss +0 -18
- package/src/components/SearchRowLayout/SearchRowLayout.tsx +0 -45
- package/src/components/SearchRowLayout/helpers/fitQueryToVisibleLines.ts +0 -10
- package/src/components/SearchRowLayout/helpers/monacoConfig.ts +0 -25
- package/src/components/SearchRowLayout/index.ts +0 -2
- package/src/components/SearchWithButtons/SearchWithButtons.scss +0 -10
- package/src/components/SearchWithButtons/SearchWithButtons.stories.tsx +0 -107
- package/src/components/SearchWithButtons/SearchWithButtons.tsx +0 -56
- package/src/components/SearchWithButtons/index.ts +0 -2
- package/src/components/SimpleForm/CheckboxGroupField.tsx +0 -53
- package/src/components/SimpleForm/RangeDatePickerField.tsx +0 -50
- package/src/components/SimpleForm/SelectField.tsx +0 -24
- package/src/components/SimpleForm/SimpleForm.stories.tsx +0 -115
- package/src/components/SimpleForm/SimpleForm.tsx +0 -65
- package/src/components/SimpleForm/SwitchField.tsx +0 -23
- package/src/components/SimpleForm/helpers/controlsRegistry.ts +0 -24
- package/src/components/SimpleForm/helpers/getInitialValues.ts +0 -10
- package/src/components/SimpleForm/helpers/index.ts +0 -2
- package/src/components/SimpleForm/index.ts +0 -7
- package/src/components/SkeletonRows/SkeletonRows.tsx +0 -24
- package/src/components/SkeletonRows/index.ts +0 -2
- package/src/components/index.ts +0 -66
- package/src/constants/query.ts +0 -10
- package/src/constants/row.ts +0 -2
- package/src/helpers/buildColumnsFromKeys.ts +0 -17
- package/src/helpers/getDefaultNavigationIcon.ts +0 -33
- package/src/helpers/getListKey.ts +0 -12
- package/src/helpers/getParentPath.ts +0 -10
- package/src/helpers/isEmptyValue.ts +0 -2
- package/src/helpers/isFieldVisible.ts +0 -20
- package/src/helpers/time.ts +0 -29
- package/src/helpers/useLoadMoreSentinel.ts +0 -31
- package/src/helpers/useToggle.ts +0 -11
- package/src/helpers/useVisibleColumns.ts +0 -26
- package/src/i18n/index.ts +0 -26
- package/src/index.ts +0 -9
- package/src/modules/ChartEditor/ChartEditor.scss +0 -12
- package/src/modules/ChartEditor/ChartEditor.tsx +0 -116
- package/src/modules/ChartEditor/i18n/dicts.ts +0 -4
- package/src/modules/ChartEditor/i18n/en.json +0 -3
- package/src/modules/ChartEditor/i18n/index.ts +0 -5
- package/src/modules/ChartEditor/i18n/ru.json +0 -3
- package/src/modules/ChartEditor/index.ts +0 -2
- package/src/modules/ChartEditor/story/ChartEditor.stories.tsx +0 -186
- package/src/modules/ChartEditor/story/mockData.ts +0 -222
- package/src/modules/ChartEditor/types.ts +0 -18
- package/src/modules/ClustersList/ClustersList.scss +0 -11
- package/src/modules/ClustersList/ClustersList.tsx +0 -49
- package/src/modules/ClustersList/index.ts +0 -2
- package/src/modules/HistoryComparisonActions/HistoryComparisonActions.scss +0 -4
- package/src/modules/HistoryComparisonActions/HistoryComparisonActions.tsx +0 -42
- package/src/modules/HistoryComparisonActions/index.ts +0 -2
- package/src/modules/HistoryHeader/HistoryHeader.stories.tsx +0 -47
- package/src/modules/HistoryHeader/HistoryHeader.tsx +0 -58
- package/src/modules/HistoryHeader/index.ts +0 -1
- package/src/modules/HistoryHeader/internal/FullSearchToggleButton.tsx +0 -16
- package/src/modules/HistoryLayout/HistoryLayout.scss +0 -7
- package/src/modules/HistoryLayout/HistoryLayout.tsx +0 -43
- package/src/modules/HistoryLayout/index.ts +0 -2
- package/src/modules/HistoryRow/HistoryRow.scss +0 -32
- package/src/modules/HistoryRow/HistoryRow.stories.tsx +0 -91
- package/src/modules/HistoryRow/HistoryRow.tsx +0 -77
- package/src/modules/HistoryRow/index.ts +0 -1
- package/src/modules/HistorySearchRow/HistorySearchRow.scss +0 -13
- package/src/modules/HistorySearchRow/HistorySearchRow.stories.tsx +0 -52
- package/src/modules/HistorySearchRow/HistorySearchRow.tsx +0 -62
- package/src/modules/HistorySearchRow/helpers/resolveMonacoLanguage.ts +0 -19
- package/src/modules/HistorySearchRow/index.ts +0 -1
- package/src/modules/NavigationDetail/NavigationDetail.scss +0 -13
- package/src/modules/NavigationDetail/NavigationDetail.tsx +0 -121
- package/src/modules/NavigationDetail/helpers/getInitialTab.ts +0 -9
- package/src/modules/NavigationDetail/helpers/getVisibleTabs.ts +0 -5
- package/src/modules/NavigationDetail/index.ts +0 -2
- package/src/modules/NavigationDetail/internal/NavigationDetailTabs.tsx +0 -32
- package/src/modules/NavigationHeader/NavigationHeader.stories.tsx +0 -118
- package/src/modules/NavigationHeader/NavigationHeader.tsx +0 -33
- package/src/modules/NavigationHeader/index.ts +0 -2
- package/src/modules/NavigationItemsList/NavigationItemsList.scss +0 -65
- package/src/modules/NavigationItemsList/NavigationItemsList.tsx +0 -92
- package/src/modules/NavigationItemsList/index.ts +0 -2
- package/src/modules/NavigationItemsList/internal/NavigationItemsListEmptyState.tsx +0 -45
- package/src/modules/NavigationItemsList/internal/NavigationItemsListHeader.scss +0 -6
- package/src/modules/NavigationItemsList/internal/NavigationItemsListHeader.tsx +0 -54
- package/src/modules/NavigationItemsList/internal/useParentRow.ts +0 -23
- package/src/modules/NavigationMeta/NavigationMeta.scss +0 -25
- package/src/modules/NavigationMeta/NavigationMeta.tsx +0 -81
- package/src/modules/NavigationMeta/helpers/buildMetaGroups.tsx +0 -27
- package/src/modules/NavigationMeta/i18n/dicts.ts +0 -4
- package/src/modules/NavigationMeta/i18n/en.json +0 -4
- package/src/modules/NavigationMeta/i18n/index.ts +0 -5
- package/src/modules/NavigationMeta/i18n/ru.json +0 -4
- package/src/modules/NavigationMeta/index.ts +0 -3
- package/src/modules/NavigationMeta/story/NavigationMeta.stories.tsx +0 -80
- package/src/modules/NavigationMeta/story/mockData.ts +0 -22
- package/src/modules/NavigationPreview/NavigationPreview.scss +0 -24
- package/src/modules/NavigationPreview/NavigationPreview.tsx +0 -110
- package/src/modules/NavigationPreview/helpers/buildPreviewColumns.tsx +0 -11
- package/src/modules/NavigationPreview/helpers/filterPreviewRows.ts +0 -29
- package/src/modules/NavigationPreview/i18n/dicts.ts +0 -4
- package/src/modules/NavigationPreview/i18n/en.json +0 -3
- package/src/modules/NavigationPreview/i18n/index.ts +0 -5
- package/src/modules/NavigationPreview/i18n/ru.json +0 -3
- package/src/modules/NavigationPreview/index.ts +0 -4
- package/src/modules/NavigationPreview/story/NavigationPreview.stories.tsx +0 -98
- package/src/modules/NavigationPreview/story/mockData.ts +0 -9
- package/src/modules/NavigationSchema/NavigationSchema.scss +0 -24
- package/src/modules/NavigationSchema/NavigationSchema.tsx +0 -118
- package/src/modules/NavigationSchema/helpers/buildSchemaColumns.tsx +0 -54
- package/src/modules/NavigationSchema/helpers/filterSchema.ts +0 -18
- package/src/modules/NavigationSchema/i18n/dicts.ts +0 -4
- package/src/modules/NavigationSchema/i18n/en.json +0 -9
- package/src/modules/NavigationSchema/i18n/index.ts +0 -5
- package/src/modules/NavigationSchema/i18n/ru.json +0 -9
- package/src/modules/NavigationSchema/index.ts +0 -4
- package/src/modules/NavigationSchema/story/NavigationSchema.stories.tsx +0 -112
- package/src/modules/NavigationSchema/story/mockData.ts +0 -9
- package/src/modules/NavigationView/NavigationView.scss +0 -44
- package/src/modules/NavigationView/NavigationView.tsx +0 -60
- package/src/modules/NavigationView/helpers/buildViewColumns.tsx +0 -11
- package/src/modules/NavigationView/i18n/dicts.ts +0 -4
- package/src/modules/NavigationView/i18n/en.json +0 -3
- package/src/modules/NavigationView/i18n/index.ts +0 -5
- package/src/modules/NavigationView/i18n/ru.json +0 -3
- package/src/modules/NavigationView/index.ts +0 -3
- package/src/modules/NavigationView/internal/NavigationViewSectionItem.tsx +0 -70
- package/src/modules/NavigationView/story/NavigationView.stories.tsx +0 -110
- package/src/modules/NavigationView/story/mockData.ts +0 -35
- package/src/modules/QueriesList/QueriesList.scss +0 -10
- package/src/modules/QueriesList/QueriesList.tsx +0 -98
- package/src/modules/QueriesList/index.ts +0 -2
- package/src/modules/RowsList/RowsList.scss +0 -5
- package/src/modules/RowsList/RowsList.tsx +0 -96
- package/src/modules/RowsList/helpers/prepareRowData.ts +0 -61
- package/src/modules/RowsList/index.ts +0 -2
- package/src/modules/SavedQueryRow/SavedQueryRow.scss +0 -20
- package/src/modules/SavedQueryRow/SavedQueryRow.tsx +0 -60
- package/src/modules/SavedQueryRow/index.ts +0 -2
- package/src/modules/SavedQuerySearchRow/SavedQuerySearchRow.scss +0 -15
- package/src/modules/SavedQuerySearchRow/SavedQuerySearchRow.tsx +0 -58
- package/src/modules/SavedQuerySearchRow/index.ts +0 -2
- package/src/modules/TutorialRow/TutorialRow.scss +0 -9
- package/src/modules/TutorialRow/TutorialRow.stories.tsx +0 -43
- package/src/modules/TutorialRow/TutorialRow.tsx +0 -25
- package/src/modules/TutorialRow/index.ts +0 -2
- package/src/modules/TutorialSearchRow/TutorialSearchRow.scss +0 -5
- package/src/modules/TutorialSearchRow/TutorialSearchRow.stories.tsx +0 -44
- package/src/modules/TutorialSearchRow/TutorialSearchRow.tsx +0 -33
- package/src/modules/TutorialSearchRow/index.ts +0 -2
- package/src/modules/index.ts +0 -36
- package/src/types/declarations.d.ts +0 -15
- package/src/types/forms.ts +0 -33
- package/src/types/history.ts +0 -12
- package/src/types/navigation.ts +0 -199
- package/src/types/pathEditor.ts +0 -29
- package/src/types/queryList.ts +0 -92
- package/src/types/savedQueries.ts +0 -7
- package/src/types/tutorial.ts +0 -3
- package/src/widgets/DashboardCharts/DashboardCharts.scss +0 -25
- package/src/widgets/DashboardCharts/DashboardCharts.tsx +0 -214
- package/src/widgets/DashboardCharts/helpers/chartTypeIcons.ts +0 -33
- package/src/widgets/DashboardCharts/i18n/dicts.ts +0 -4
- package/src/widgets/DashboardCharts/i18n/en.json +0 -7
- package/src/widgets/DashboardCharts/i18n/index.ts +0 -5
- package/src/widgets/DashboardCharts/i18n/ru.json +0 -7
- package/src/widgets/DashboardCharts/index.ts +0 -2
- package/src/widgets/DashboardCharts/internal/EmptyDashboardPlaceholder.tsx +0 -26
- package/src/widgets/DashboardCharts/story/DashboardCharts.stories.scss +0 -6
- package/src/widgets/DashboardCharts/story/DashboardCharts.stories.tsx +0 -77
- package/src/widgets/DashboardCharts/story/mockData.ts +0 -419
- package/src/widgets/DashboardCharts/types.ts +0 -30
- package/src/widgets/QueriesHistory/QueriesHistory.scss +0 -3
- package/src/widgets/QueriesHistory/QueriesHistory.stories.tsx +0 -276
- package/src/widgets/QueriesHistory/QueriesHistory.tsx +0 -71
- package/src/widgets/QueriesHistory/i18n/dicts.ts +0 -4
- package/src/widgets/QueriesHistory/i18n/en.json +0 -3
- package/src/widgets/QueriesHistory/i18n/index.ts +0 -5
- package/src/widgets/QueriesHistory/i18n/ru.json +0 -3
- package/src/widgets/QueriesHistory/index.ts +0 -2
- package/src/widgets/QueriesHistory/internal/HistoryRowContent.tsx +0 -22
- package/src/widgets/QueriesNavigation/QueriesNavigation.scss +0 -9
- package/src/widgets/QueriesNavigation/QueriesNavigation.stories.tsx +0 -400
- package/src/widgets/QueriesNavigation/QueriesNavigation.tsx +0 -195
- package/src/widgets/QueriesNavigation/helpers/createEmptyDetailConfig.tsx +0 -8
- package/src/widgets/QueriesNavigation/helpers/createNavigationDetailResolver.ts +0 -28
- package/src/widgets/QueriesNavigation/helpers/createTableDetailConfig.tsx +0 -127
- package/src/widgets/QueriesNavigation/i18n/dicts.ts +0 -4
- package/src/widgets/QueriesNavigation/i18n/en.json +0 -10
- package/src/widgets/QueriesNavigation/i18n/index.ts +0 -5
- package/src/widgets/QueriesNavigation/i18n/ru.json +0 -10
- package/src/widgets/QueriesNavigation/index.ts +0 -13
- package/src/widgets/SavedQueries/SavedQueries.scss +0 -3
- package/src/widgets/SavedQueries/SavedQueries.stories.tsx +0 -192
- package/src/widgets/SavedQueries/SavedQueries.tsx +0 -77
- package/src/widgets/SavedQueries/SavedQueryRowContent.tsx +0 -26
- package/src/widgets/SavedQueries/i18n/dicts.ts +0 -4
- package/src/widgets/SavedQueries/i18n/en.json +0 -3
- package/src/widgets/SavedQueries/i18n/index.ts +0 -4
- package/src/widgets/SavedQueries/i18n/ru.json +0 -3
- package/src/widgets/SavedQueries/index.ts +0 -2
- package/src/widgets/TutorialsHistory/TutorialRowContent.tsx +0 -16
- package/src/widgets/TutorialsHistory/TutorialsHistory.scss +0 -3
- package/src/widgets/TutorialsHistory/TutorialsHistory.stories.tsx +0 -135
- package/src/widgets/TutorialsHistory/TutorialsHistory.tsx +0 -63
- package/src/widgets/TutorialsHistory/i18n/dicts.ts +0 -4
- package/src/widgets/TutorialsHistory/i18n/en.json +0 -3
- package/src/widgets/TutorialsHistory/i18n/index.ts +0 -5
- package/src/widgets/TutorialsHistory/i18n/ru.json +0 -3
- package/src/widgets/TutorialsHistory/index.ts +0 -2
- package/src/widgets/index.ts +0 -18
- package/tsconfig.json +0 -20
- package/tsconfig.publish.json +0 -11
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["attachments", "onEdit", "onDelete", "onRevert", "wasAddedIds", "wasEditedIds", "editingIds", "renderEditForm", "className", "isDeleted"];
|
|
4
|
+
import "core-js/modules/es.array.iterator.js";
|
|
5
|
+
import "core-js/modules/es.object.to-string.js";
|
|
6
|
+
import "core-js/modules/es.set.js";
|
|
7
|
+
import "core-js/modules/es.set.difference.v2.js";
|
|
8
|
+
import "core-js/modules/es.set.intersection.v2.js";
|
|
9
|
+
import "core-js/modules/es.set.is-disjoint-from.v2.js";
|
|
10
|
+
import "core-js/modules/es.set.is-subset-of.v2.js";
|
|
11
|
+
import "core-js/modules/es.set.is-superset-of.v2.js";
|
|
12
|
+
import "core-js/modules/es.set.symmetric-difference.v2.js";
|
|
13
|
+
import "core-js/modules/es.set.union.v2.js";
|
|
14
|
+
import "core-js/modules/es.string.iterator.js";
|
|
15
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
|
16
|
+
import React, { useMemo } from 'react';
|
|
17
|
+
import { Flex, List } from '@gravity-ui/uikit';
|
|
18
|
+
import { AttachmentItem } from "./internal/AttachmentItem/AttachmentItem";
|
|
19
|
+
import "./AttachmentList.css";
|
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
+
export var AttachmentList = function AttachmentList(_ref) {
|
|
22
|
+
var attachments = _ref.attachments,
|
|
23
|
+
onEdit = _ref.onEdit,
|
|
24
|
+
onDelete = _ref.onDelete,
|
|
25
|
+
onRevert = _ref.onRevert,
|
|
26
|
+
wasAddedIds = _ref.wasAddedIds,
|
|
27
|
+
wasEditedIds = _ref.wasEditedIds,
|
|
28
|
+
editingIds = _ref.editingIds,
|
|
29
|
+
renderEditForm = _ref.renderEditForm,
|
|
30
|
+
className = _ref.className,
|
|
31
|
+
isDeleted = _ref.isDeleted,
|
|
32
|
+
listProps = _objectWithoutProperties(_ref, _excluded);
|
|
33
|
+
var addedIdsSet = useMemo(function () {
|
|
34
|
+
return new Set(wasAddedIds);
|
|
35
|
+
}, [wasAddedIds]);
|
|
36
|
+
var editedIdsSet = useMemo(function () {
|
|
37
|
+
return new Set(wasEditedIds);
|
|
38
|
+
}, [wasEditedIds]);
|
|
39
|
+
var editingIdsSet = useMemo(function () {
|
|
40
|
+
return new Set(editingIds);
|
|
41
|
+
}, [editingIds]);
|
|
42
|
+
return /*#__PURE__*/_jsx(Flex, {
|
|
43
|
+
className: className,
|
|
44
|
+
width: "100%",
|
|
45
|
+
height: "100%",
|
|
46
|
+
children: /*#__PURE__*/_jsx(List, _objectSpread({
|
|
47
|
+
filterable: false,
|
|
48
|
+
virtualized: false,
|
|
49
|
+
items: attachments,
|
|
50
|
+
renderItem: function renderItem(attachment) {
|
|
51
|
+
if (editingIdsSet.has(attachment.id)) {
|
|
52
|
+
return renderEditForm === null || renderEditForm === void 0 ? void 0 : renderEditForm(attachment);
|
|
53
|
+
}
|
|
54
|
+
return /*#__PURE__*/_jsx(AttachmentItem, {
|
|
55
|
+
attachment: attachment,
|
|
56
|
+
wasAdded: addedIdsSet.has(attachment.id),
|
|
57
|
+
wasEdited: editedIdsSet.has(attachment.id),
|
|
58
|
+
onEdit: onEdit,
|
|
59
|
+
onRevert: onRevert,
|
|
60
|
+
onDelete: onDelete,
|
|
61
|
+
isDeleted: isDeleted
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}, listProps))
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
// #sourceMappingURL=AttachmentList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useMemo","Flex","List","AttachmentItem","jsx","_jsx","AttachmentList","_ref","attachments","onEdit","onDelete","onRevert","wasAddedIds","wasEditedIds","editingIds","renderEditForm","className","isDeleted","listProps","_objectWithoutProperties","_excluded","addedIdsSet","Set","editedIdsSet","editingIdsSet","width","height","children","_objectSpread","filterable","virtualized","items","renderItem","attachment","has","id","wasAdded","wasEdited"],"sources":["AttachmentList.tsx"],"sourcesContent":["import React, {ReactNode, useMemo} from 'react';\nimport {Flex, List, ListProps} from '@gravity-ui/uikit';\nimport {AttachmentItem, AttachmentItemProps} from './internal/AttachmentItem/AttachmentItem';\nimport './AttachmentList.scss';\n\nexport type AttachmentListProps = Omit<ListProps, 'items' | 'selectedItemIndex' | 'virtualized'> & {\n attachments: AttachmentItemProps['attachment'][];\n className?: string;\n onDelete?: (attachment: AttachmentItemProps['attachment']) => void;\n onEdit?: (attachment: AttachmentItemProps['attachment']) => void;\n onRevert?: (attachment: AttachmentItemProps['attachment']) => void;\n\n renderEditForm?: (attachment: AttachmentItemProps['attachment']) => ReactNode;\n\n wasAddedIds?: string[];\n wasEditedIds?: string[];\n\n editingIds?: string[];\n\n isDeleted?: boolean;\n};\n\nexport const AttachmentList = ({\n attachments,\n onEdit,\n onDelete,\n onRevert,\n wasAddedIds,\n wasEditedIds,\n editingIds,\n renderEditForm,\n className,\n isDeleted,\n ...listProps\n}: AttachmentListProps) => {\n const addedIdsSet = useMemo(() => new Set(wasAddedIds), [wasAddedIds]);\n const editedIdsSet = useMemo(() => new Set(wasEditedIds), [wasEditedIds]);\n const editingIdsSet = useMemo(() => new Set(editingIds), [editingIds]);\n\n return (\n <Flex className={className} width=\"100%\" height=\"100%\">\n <List<AttachmentListProps['attachments'][number]>\n filterable={false}\n virtualized={false}\n items={attachments}\n renderItem={(attachment) => {\n if (editingIdsSet.has(attachment.id)) {\n return renderEditForm?.(attachment);\n }\n\n return (\n <AttachmentItem\n attachment={attachment}\n wasAdded={addedIdsSet.has(attachment.id)}\n wasEdited={editedIdsSet.has(attachment.id)}\n onEdit={onEdit}\n onRevert={onRevert}\n onDelete={onDelete}\n isDeleted={isDeleted}\n />\n );\n }}\n {...listProps}\n />\n </Flex>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,IAAcC,OAAO,QAAO,OAAO;AAC/C,SAAQC,IAAI,EAAEC,IAAI,QAAkB,mBAAmB;AACvD,SAAQC,cAAc;AACtB;AAA+B,SAAAC,GAAA,IAAAC,IAAA;AAmB/B,OAAO,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,IAAA,EAYA;EAAA,IAXvBC,WAAW,GAAAD,IAAA,CAAXC,WAAW;IACXC,MAAM,GAAAF,IAAA,CAANE,MAAM;IACNC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;IACRC,WAAW,GAAAL,IAAA,CAAXK,WAAW;IACXC,YAA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C3C1B,MAAM,EAAEA,MAAO;UACfE,QAAQ,EAAEA,QAAS;UACnBD,QAAQ,EAAEA,QAAS;UACnBO,SAAS,EAAEA;QAAU,CACxB,CAAC;MAEV;IAAE,GACEC,SAAS,CAChB;EAAC,CACA,CAAC;AAEf,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.qp-attachment-list {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
min-width: 0;
|
|
5
|
+
margin: 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
list-style: none;
|
|
8
|
+
|
|
9
|
+
&__item {
|
|
10
|
+
min-width: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&__button {
|
|
14
|
+
--g-button-padding: var(--g-spacing-2);
|
|
15
|
+
|
|
16
|
+
min-width: 0;
|
|
17
|
+
justify-content: flex-start;
|
|
18
|
+
text-align: start;
|
|
19
|
+
|
|
20
|
+
&_active {
|
|
21
|
+
--g-button-background-color: var(--g-color-base-selection);
|
|
22
|
+
--g-button-background-color-hover: var(--g-color-base-selection-hover);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { StoryObj } from '@storybook/react';
|
|
3
|
+
import { type AttachmentListProps } from './AttachmentList';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: ({ attachments, onEdit, onDelete, onRevert, wasAddedIds, wasEditedIds, editingIds, renderEditForm, className, isDeleted, ...listProps }: AttachmentListProps) => React.JSX.Element;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
12
|
+
className?: string | undefined;
|
|
13
|
+
qa?: string | undefined;
|
|
14
|
+
autoFocus?: boolean | undefined;
|
|
15
|
+
id?: string | undefined;
|
|
16
|
+
role?: React.AriaRole | undefined;
|
|
17
|
+
filter?: string | undefined;
|
|
18
|
+
loading?: boolean | undefined;
|
|
19
|
+
size?: import("@gravity-ui/uikit").TextInputSize | undefined;
|
|
20
|
+
sortable?: boolean | undefined;
|
|
21
|
+
itemHeight?: number | ((item: {
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
}, itemIndex: number) => number) | undefined;
|
|
24
|
+
renderItem?: ((item: {
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
}, isItemActive: boolean, itemIndex: number) => React.ReactNode) | undefined;
|
|
27
|
+
onLoadMore?: (() => void) | undefined;
|
|
28
|
+
onItemClick?: ((item: {
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
}, index: number, fromKeyboard?: boolean, event?: React.MouseEvent<HTMLDivElement, MouseEvent> | React.KeyboardEvent<HTMLElement>) => void) | undefined;
|
|
31
|
+
filterable?: boolean | undefined;
|
|
32
|
+
itemClassName?: string | undefined;
|
|
33
|
+
itemsClassName?: string | undefined;
|
|
34
|
+
filterClassName?: string | undefined;
|
|
35
|
+
emptyPlaceholder?: React.ReactNode;
|
|
36
|
+
filterPlaceholder?: string | undefined;
|
|
37
|
+
activeItemIndex?: number | undefined;
|
|
38
|
+
itemKey?: ((item: {
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
}) => string) | undefined;
|
|
41
|
+
itemsHeight?: number | ((items: unknown[]) => number) | undefined;
|
|
42
|
+
deactivateOnLeave?: boolean | undefined;
|
|
43
|
+
sortHandleAlign?: import("@gravity-ui/uikit").ListSortHandleAlign | undefined;
|
|
44
|
+
filterItem?: ((filter: string) => (item: {
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
}) => boolean) | undefined;
|
|
47
|
+
onFilterUpdate?: ((filter: string) => void) | undefined;
|
|
48
|
+
onFilterEnd?: (({ items }: {
|
|
49
|
+
items: {
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
}[];
|
|
52
|
+
}) => void) | undefined;
|
|
53
|
+
onSortEnd?: ((params: import("@gravity-ui/uikit").ListSortParams) => void) | undefined;
|
|
54
|
+
onChangeActive?: ((index?: number) => void) | undefined;
|
|
55
|
+
onScrollToItem?: ((node: HTMLElement) => boolean) | undefined;
|
|
56
|
+
attachments: import(".").AttachmentItemProps["attachment"][];
|
|
57
|
+
onDelete?: ((attachment: import(".").AttachmentItemProps["attachment"]) => void) | undefined;
|
|
58
|
+
onEdit?: ((attachment: import(".").AttachmentItemProps["attachment"]) => void) | undefined;
|
|
59
|
+
onRevert?: ((attachment: import(".").AttachmentItemProps["attachment"]) => void) | undefined;
|
|
60
|
+
renderEditForm?: ((attachment: import(".").AttachmentItemProps["attachment"]) => React.ReactNode) | undefined;
|
|
61
|
+
wasAddedIds?: string[] | undefined;
|
|
62
|
+
wasEditedIds?: string[] | undefined;
|
|
63
|
+
editingIds?: string[] | undefined;
|
|
64
|
+
isDeleted?: boolean | undefined;
|
|
65
|
+
}>) => React.JSX.Element)[];
|
|
66
|
+
args: {
|
|
67
|
+
attachments: {
|
|
68
|
+
id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
link?: string;
|
|
71
|
+
}[];
|
|
72
|
+
onDelete: import("@vitest/spy").Mock<(...args: any[]) => any>;
|
|
73
|
+
onEdit: import("@vitest/spy").Mock<(...args: any[]) => any>;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export default meta;
|
|
77
|
+
type Story = StoryObj<typeof meta>;
|
|
78
|
+
/** Attachments with supported extensions use their corresponding icons. Row actions appear on hover. */
|
|
79
|
+
export declare const Default: Story;
|
|
80
|
+
/** `wasAddedIds` and `wasEditedIds` highlight attachments with their current change state. */
|
|
81
|
+
export declare const ChangeStates: Story;
|
|
82
|
+
/** The inherited List filtering API can be enabled when a consumer needs local attachment search. */
|
|
83
|
+
export declare const Filterable: Story;
|
|
84
|
+
/** Hover a row: edit toggles its edited state and delete removes it from the list. */
|
|
85
|
+
export declare const InteractiveActions: Story;
|
|
86
|
+
/** Hover a row and click edit to replace it with a consumer-provided rename form. */
|
|
87
|
+
export declare const CustomEditForm: Story;
|
|
88
|
+
/** Drag attachments by the handle to reorder them using the inherited List sorting API. */
|
|
89
|
+
export declare const Sortable: Story;
|
|
90
|
+
/** Consumer-provided content is displayed when the attachment array is empty. */
|
|
91
|
+
export declare const Empty: Story;
|
|
92
|
+
/** The inherited loading state can be used while the attachment collection is being fetched. */
|
|
93
|
+
export declare const Loading: Story;
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
+
import "core-js/modules/es.array.concat.js";
|
|
5
|
+
import "core-js/modules/es.array.filter.js";
|
|
6
|
+
import "core-js/modules/es.array.includes.js";
|
|
7
|
+
import "core-js/modules/es.array.map.js";
|
|
8
|
+
import "core-js/modules/es.array.splice.js";
|
|
9
|
+
import "core-js/modules/es.function.name.js";
|
|
10
|
+
import "core-js/modules/es.iterator.constructor.js";
|
|
11
|
+
import "core-js/modules/es.iterator.filter.js";
|
|
12
|
+
import "core-js/modules/es.iterator.map.js";
|
|
13
|
+
import "core-js/modules/es.object.to-string.js";
|
|
14
|
+
import "core-js/modules/es.string.includes.js";
|
|
15
|
+
import "core-js/modules/es.string.link.js";
|
|
16
|
+
import React, { useState } from 'react';
|
|
17
|
+
import { Text } from '@gravity-ui/uikit';
|
|
18
|
+
import { EditAttachmentItem } from "./internal/EditAttachmentItem";
|
|
19
|
+
import { fn } from 'storybook/test';
|
|
20
|
+
import { AttachmentList } from "./AttachmentList";
|
|
21
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
+
var attachments = [{
|
|
23
|
+
id: 'readme',
|
|
24
|
+
name: 'README'
|
|
25
|
+
}, {
|
|
26
|
+
id: 'javascript',
|
|
27
|
+
name: 'index.js'
|
|
28
|
+
}, {
|
|
29
|
+
id: 'python',
|
|
30
|
+
name: 'main.py'
|
|
31
|
+
}, {
|
|
32
|
+
id: 'csv',
|
|
33
|
+
name: 'sales.csv'
|
|
34
|
+
}, {
|
|
35
|
+
id: 'link-image',
|
|
36
|
+
name: 'https://home/tutorial',
|
|
37
|
+
link: 'https://home/tutorial'
|
|
38
|
+
}, {
|
|
39
|
+
id: 'excel',
|
|
40
|
+
name: 'forecast.xlsx'
|
|
41
|
+
}, {
|
|
42
|
+
id: 'cpp',
|
|
43
|
+
name: 'processor.cpp'
|
|
44
|
+
}, {
|
|
45
|
+
id: 'ql',
|
|
46
|
+
name: 'analytics.ql'
|
|
47
|
+
}, {
|
|
48
|
+
id: 'yql',
|
|
49
|
+
name: 'events.yql'
|
|
50
|
+
}, {
|
|
51
|
+
id: 'sql',
|
|
52
|
+
name: 'report.sql'
|
|
53
|
+
}, {
|
|
54
|
+
id: 'link',
|
|
55
|
+
name: 'link to file.cpp',
|
|
56
|
+
link: 'link/to/file.cpp'
|
|
57
|
+
}];
|
|
58
|
+
var meta = {
|
|
59
|
+
title: 'Components/AttachmentList',
|
|
60
|
+
component: AttachmentList,
|
|
61
|
+
tags: ['autodocs'],
|
|
62
|
+
parameters: {
|
|
63
|
+
layout: 'padded'
|
|
64
|
+
},
|
|
65
|
+
decorators: [function (Story) {
|
|
66
|
+
return /*#__PURE__*/_jsx("div", {
|
|
67
|
+
style: {
|
|
68
|
+
width: 360,
|
|
69
|
+
height: 360
|
|
70
|
+
},
|
|
71
|
+
children: /*#__PURE__*/_jsx(Story, {})
|
|
72
|
+
});
|
|
73
|
+
}],
|
|
74
|
+
args: {
|
|
75
|
+
attachments: attachments,
|
|
76
|
+
onDelete: fn(),
|
|
77
|
+
onEdit: fn()
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
export default meta;
|
|
81
|
+
/** Attachments with supported extensions use their corresponding icons. Row actions appear on hover. */
|
|
82
|
+
export var Default = {};
|
|
83
|
+
|
|
84
|
+
/** `wasAddedIds` and `wasEditedIds` highlight attachments with their current change state. */
|
|
85
|
+
export var ChangeStates = {
|
|
86
|
+
args: {
|
|
87
|
+
wasAddedIds: ['javascript', 'csv'],
|
|
88
|
+
wasEditedIds: ['python', 'sql']
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/** The inherited List filtering API can be enabled when a consumer needs local attachment search. */
|
|
93
|
+
export var Filterable = {
|
|
94
|
+
args: {
|
|
95
|
+
filterable: true,
|
|
96
|
+
filterPlaceholder: 'Filter by attachment name',
|
|
97
|
+
filterItem: function filterItem(filter) {
|
|
98
|
+
return function (attachment) {
|
|
99
|
+
return attachment.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase());
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
var InteractiveAttachmentList = function InteractiveAttachmentList(props) {
|
|
105
|
+
var _useState = useState(props.attachments),
|
|
106
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
107
|
+
currentAttachments = _useState2[0],
|
|
108
|
+
setCurrentAttachments = _useState2[1];
|
|
109
|
+
var _useState3 = useState([]),
|
|
110
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
111
|
+
editedIds = _useState4[0],
|
|
112
|
+
setEditedIds = _useState4[1];
|
|
113
|
+
return /*#__PURE__*/_jsx(AttachmentList, _objectSpread(_objectSpread({}, props), {}, {
|
|
114
|
+
attachments: currentAttachments,
|
|
115
|
+
wasEditedIds: editedIds,
|
|
116
|
+
onDelete: function onDelete(attachment) {
|
|
117
|
+
var _props$onDelete;
|
|
118
|
+
(_props$onDelete = props.onDelete) === null || _props$onDelete === void 0 || _props$onDelete.call(props, attachment);
|
|
119
|
+
setCurrentAttachments(function (current) {
|
|
120
|
+
return current.filter(function (item) {
|
|
121
|
+
return item.id !== attachment.id;
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
setEditedIds(function (current) {
|
|
125
|
+
return current.filter(function (id) {
|
|
126
|
+
return id !== attachment.id;
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
},
|
|
130
|
+
onEdit: function onEdit(attachment) {
|
|
131
|
+
var _props$onEdit;
|
|
132
|
+
(_props$onEdit = props.onEdit) === null || _props$onEdit === void 0 || _props$onEdit.call(props, attachment);
|
|
133
|
+
setEditedIds(function (current) {
|
|
134
|
+
return current.includes(attachment.id) ? current.filter(function (id) {
|
|
135
|
+
return id !== attachment.id;
|
|
136
|
+
}) : [].concat(_toConsumableArray(current), [attachment.id]);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}));
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
/** Hover a row: edit toggles its edited state and delete removes it from the list. */
|
|
143
|
+
export var InteractiveActions = {
|
|
144
|
+
render: function render(args) {
|
|
145
|
+
return /*#__PURE__*/_jsx(InteractiveAttachmentList, _objectSpread({}, args));
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
var EditableAttachmentList = function EditableAttachmentList(props) {
|
|
149
|
+
var _useState5 = useState(props.attachments),
|
|
150
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
151
|
+
currentAttachments = _useState6[0],
|
|
152
|
+
setCurrentAttachments = _useState6[1];
|
|
153
|
+
var _useState7 = useState(),
|
|
154
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
155
|
+
editingId = _useState8[0],
|
|
156
|
+
setEditingId = _useState8[1];
|
|
157
|
+
var _useState9 = useState(''),
|
|
158
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
159
|
+
draftName = _useState0[0],
|
|
160
|
+
setDraftName = _useState0[1];
|
|
161
|
+
var _useState1 = useState({
|
|
162
|
+
link: '',
|
|
163
|
+
token: '',
|
|
164
|
+
name: ''
|
|
165
|
+
}),
|
|
166
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
167
|
+
draftLink = _useState10[0],
|
|
168
|
+
setDraftLink = _useState10[1];
|
|
169
|
+
var handleAcceptDraft = function handleAcceptDraft() {
|
|
170
|
+
setCurrentAttachments(function (prevState) {
|
|
171
|
+
return prevState.map(function (attach) {
|
|
172
|
+
if (attach.id === editingId && attach.link === undefined) {
|
|
173
|
+
return _objectSpread(_objectSpread({}, attach), {}, {
|
|
174
|
+
name: draftName
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
if (attach.id === editingId && typeof attach.link === 'string') {
|
|
178
|
+
return _objectSpread(_objectSpread({}, attach), {}, {
|
|
179
|
+
name: draftLink.name,
|
|
180
|
+
link: draftLink.link
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
return attach;
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
setDraftName('');
|
|
187
|
+
setEditingId('');
|
|
188
|
+
};
|
|
189
|
+
return /*#__PURE__*/_jsx(AttachmentList, _objectSpread(_objectSpread({}, props), {}, {
|
|
190
|
+
attachments: currentAttachments,
|
|
191
|
+
editingIds: editingId ? [editingId] : [],
|
|
192
|
+
onDelete: function onDelete(attach) {
|
|
193
|
+
return setCurrentAttachments(function (list) {
|
|
194
|
+
return list.filter(function (l) {
|
|
195
|
+
return l.id !== attach.id;
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
},
|
|
199
|
+
onEdit: function onEdit(attachment) {
|
|
200
|
+
var _props$onEdit2;
|
|
201
|
+
(_props$onEdit2 = props.onEdit) === null || _props$onEdit2 === void 0 || _props$onEdit2.call(props, attachment);
|
|
202
|
+
setEditingId(attachment.id);
|
|
203
|
+
setDraftName(attachment.name);
|
|
204
|
+
if (typeof attachment.link === 'string') {
|
|
205
|
+
setDraftLink(_objectSpread(_objectSpread({}, draftLink), {}, {
|
|
206
|
+
name: attachment.name,
|
|
207
|
+
link: attachment.link
|
|
208
|
+
}));
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
renderEditForm: function renderEditForm(attachment) {
|
|
212
|
+
var isLink = typeof attachment.link === 'string';
|
|
213
|
+
if (isLink) {
|
|
214
|
+
return /*#__PURE__*/_jsx(EditAttachmentItem, {
|
|
215
|
+
onCancel: function onCancel() {
|
|
216
|
+
return setEditingId('');
|
|
217
|
+
},
|
|
218
|
+
onAccept: handleAcceptDraft,
|
|
219
|
+
values: draftLink,
|
|
220
|
+
onChange: setDraftLink,
|
|
221
|
+
tokens: [{
|
|
222
|
+
value: 'default_database_logs',
|
|
223
|
+
title: 'default_database_logs'
|
|
224
|
+
}, {
|
|
225
|
+
value: 'default_yt',
|
|
226
|
+
title: 'default_yt'
|
|
227
|
+
}, {
|
|
228
|
+
value: 'default_yql',
|
|
229
|
+
title: 'default_yql'
|
|
230
|
+
}, {
|
|
231
|
+
value: 'default_long_token_title',
|
|
232
|
+
title: 'default_long_token_title'
|
|
233
|
+
}],
|
|
234
|
+
type: 'link'
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
return /*#__PURE__*/_jsx(EditAttachmentItem, {
|
|
238
|
+
fileName: draftName,
|
|
239
|
+
onChangeFileName: setDraftName,
|
|
240
|
+
onCancel: function onCancel() {
|
|
241
|
+
return setEditingId('');
|
|
242
|
+
},
|
|
243
|
+
onAccept: handleAcceptDraft,
|
|
244
|
+
type: 'file'
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
}));
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
/** Hover a row and click edit to replace it with a consumer-provided rename form. */
|
|
251
|
+
export var CustomEditForm = {
|
|
252
|
+
render: function render(args) {
|
|
253
|
+
return /*#__PURE__*/_jsx(EditableAttachmentList, _objectSpread({}, args));
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
var SortableAttachmentList = function SortableAttachmentList(props) {
|
|
257
|
+
var _useState11 = useState(props.attachments),
|
|
258
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
259
|
+
orderedAttachments = _useState12[0],
|
|
260
|
+
setOrderedAttachments = _useState12[1];
|
|
261
|
+
return /*#__PURE__*/_jsx(AttachmentList, _objectSpread(_objectSpread({}, props), {}, {
|
|
262
|
+
attachments: orderedAttachments,
|
|
263
|
+
onSortEnd: function onSortEnd(_ref) {
|
|
264
|
+
var _props$onSortEnd;
|
|
265
|
+
var oldIndex = _ref.oldIndex,
|
|
266
|
+
newIndex = _ref.newIndex;
|
|
267
|
+
(_props$onSortEnd = props.onSortEnd) === null || _props$onSortEnd === void 0 || _props$onSortEnd.call(props, {
|
|
268
|
+
oldIndex: oldIndex,
|
|
269
|
+
newIndex: newIndex
|
|
270
|
+
});
|
|
271
|
+
setOrderedAttachments(function (current) {
|
|
272
|
+
var next = _toConsumableArray(current);
|
|
273
|
+
var _next$splice = next.splice(oldIndex, 1),
|
|
274
|
+
_next$splice2 = _slicedToArray(_next$splice, 1),
|
|
275
|
+
movedAttachment = _next$splice2[0];
|
|
276
|
+
if (movedAttachment) {
|
|
277
|
+
next.splice(newIndex, 0, movedAttachment);
|
|
278
|
+
}
|
|
279
|
+
return next;
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
}));
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
/** Drag attachments by the handle to reorder them using the inherited List sorting API. */
|
|
286
|
+
export var Sortable = {
|
|
287
|
+
args: {
|
|
288
|
+
sortable: true,
|
|
289
|
+
sortHandleAlign: 'left',
|
|
290
|
+
onSortEnd: fn()
|
|
291
|
+
},
|
|
292
|
+
render: function render(args) {
|
|
293
|
+
return /*#__PURE__*/_jsx(SortableAttachmentList, _objectSpread({}, args));
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
/** Consumer-provided content is displayed when the attachment array is empty. */
|
|
298
|
+
export var Empty = {
|
|
299
|
+
args: {
|
|
300
|
+
attachments: [],
|
|
301
|
+
emptyPlaceholder: /*#__PURE__*/_jsx(Text, {
|
|
302
|
+
color: "secondary",
|
|
303
|
+
children: "No attachments yet"
|
|
304
|
+
})
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
/** The inherited loading state can be used while the attachment collection is being fetched. */
|
|
309
|
+
export var Loading = {
|
|
310
|
+
args: {
|
|
311
|
+
attachments: [],
|
|
312
|
+
loading: true
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
// #sourceMappingURL=AttachmentList.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","Text","EditAttachmentItem","fn","AttachmentList","jsx","_jsx","attachments","id","name","link","meta","title","component","tags","parameters","layout","decorators","Story","style","width","height","children","args","onDelete","onEdit","Default","ChangeStates","wasAddedIds","wasEditedIds","Filterable","filterable","filterPlaceholder","filterItem","filter","attachment","toLocaleLowerCase","includes","InteractiveAttachmentList","props","_useState","_useState2","_slicedToArray","currentAttachments","setCurrentAttachments","_useState3","_useState4","editedIds","setEditedIds","_objectSpread","_props$onDelete","call","current","item","_props$onEdit","concat","_toConsumableArray","InteractiveActions","render","EditableAttachmentList","_useState5","_useState6","_useState7","_useState8","editingId","setEditingId","_useState9","_useState0","draftName","setDraftName","_useState1","token","_useState10","draftLink","setDraftLink","handleAcceptDraft","prevState","map","attach","undefined","editingIds","list","l","_props$onEdit2","renderEditForm","isLink","onCancel","onAccept","values","onChange","tokens","value","type","fileName","onChangeFileName","CustomEditForm","SortableAttachmentList","_useState11","_useState12","orderedAttachments","setOrderedAttachments","onSortEnd","_ref","_props$onSortEnd","oldIndex","newIndex","next","_next$splice","splice","_next$splice2","movedAttachment","Sortable","sortable","sortHandleAlign","Empty","emptyPlaceholder","color","Loading","loading"],"sources":["AttachmentList.stories.tsx"],"sourcesContent":["import React, {useState} from 'react';\nimport type {Meta, StoryObj} from '@storybook/react';\nimport {Text} from '@gravity-ui/uikit';\nimport {EditAttachmentItem, EditLinkValues} from './internal/EditAttachmentItem';\nimport {fn} from 'storybook/test';\n\nimport {AttachmentList, type AttachmentListProps} from './AttachmentList';\n\nconst attachments: AttachmentListProps['attachments'] = [\n {id: 'readme', name: 'README'},\n {id: 'javascript', name: 'index.js'},\n {id: 'python', name: 'main.py'},\n {id: 'csv', name: 'sales.csv'},\n {id: 'link-image', name: 'https://home/tutorial', link: 'https://home/tutorial'},\n {id: 'excel', name: 'forecast.xlsx'},\n {id: 'cpp', name: 'processor.cpp'},\n {id: 'ql', name: 'analytics.ql'},\n {id: 'yql', name: 'events.yql'},\n {id: 'sql', name: 'report.sql'},\n {id: 'link', name: 'link to file.cpp', link: 'link/to/file.cpp'},\n];\n\nconst meta = {\n title: 'Components/AttachmentList',\n component: AttachmentList,\n tags: ['autodocs'],\n parameters: {\n layout: 'padded',\n },\n decorators: [\n (Story) => (\n <div style={{width: 360, height: 360}}>\n <Story />\n </div>\n ),\n ],\n args: {\n attachments,\n onDelete: fn(),\n onEdit: fn(),\n },\n} satisfies Meta<typeof AttachmentList>;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\n/** Attachments with supported extensions use their corresponding icons. Row actions appear on hover. */\nexport const Default: Story = {};\n\n/** `wasAddedIds` and `wasEditedIds` highlight attachments with their current change state. */\nexport const ChangeStates: Story = {\n args: {\n wasAddedIds: ['javascript', 'csv'],\n wasEditedIds: ['python', 'sql'],\n },\n};\n\n/** The inherited List filtering API can be enabled when a consumer needs local attachment search. */\nexport const Filterable: Story = {\n args: {\n filterable: true,\n filterPlaceholder: 'Filter by attachment name',\n filterItem: (filter) => (attachment) =>\n (attachment as AttachmentListProps['attachments'][number]).name\n .toLocaleLowerCase()\n .includes(filter.toLocaleLowerCase()),\n },\n};\n\nconst InteractiveAttachmentList = (props: AttachmentListProps) => {\n const [currentAttachments, setCurrentAttachments] = useState(props.attachments);\n const [editedIds, setEditedIds] = useState<string[]>([]);\n\n return (\n <AttachmentList\n {...props}\n attachments={currentAttachments}\n wasEditedIds={editedIds}\n onDelete={(attachment) => {\n props.onDelete?.(attachment);\n setCurrentAttachments((current) =>\n current.filter((item) => item.id !== attachment.id),\n );\n setEditedIds((current) => current.filter((id) => id !== attachment.id));\n }}\n onEdit={(attachment) => {\n props.onEdit?.(attachment);\n setEditedIds((current) =>\n current.includes(attachment.id)\n ? current.filter((id) => id !== attachment.id)\n : [...current, attachment.id],\n );\n }}\n />\n );\n};\n\n/** Hover a row: edit toggles its edited state and delete removes it from the list. */\nexport const InteractiveActions: Story = {\n render: (args) => <InteractiveAttachmentList {...args} />,\n};\n\nconst EditableAttachmentList = (props: AttachmentListProps) => {\n const [currentAttachments, setCurrentAttachments] = useState(props.attachments);\n const [editingId, setEditingId] = useState<string>();\n const [draftName, setDraftName] = useState('');\n const [draftLink, setDraftLink] = useState<EditLinkValues>({\n link: '',\n token: '',\n name: '',\n });\n\n const handleAcceptDraft = () => {\n setCurrentAttachments((prevState) => {\n return prevState.map((attach) => {\n if (attach.id === editingId && attach.link === undefined) {\n return {\n ...attach,\n name: draftName,\n };\n }\n if (attach.id === editingId && typeof attach.link === 'string') {\n return {\n ...attach,\n name: draftLink.name,\n link: draftLink.link,\n };\n }\n return attach;\n });\n });\n setDraftName('');\n setEditingId('');\n };\n\n return (\n <AttachmentList\n {...props}\n attachments={currentAttachments}\n editingIds={editingId ? [editingId] : []}\n onDelete={(attach) =>\n setCurrentAttachments((list) => list.filter((l) => l.id !== attach.id))\n }\n onEdit={(attachment) => {\n props.onEdit?.(attachment);\n setEditingId(attachment.id);\n setDraftName(attachment.name);\n if (typeof attachment.link === 'string') {\n setDraftLink({...draftLink, name: attachment.name, link: attachment.link});\n }\n }}\n renderEditForm={(attachment) => {\n const isLink = typeof attachment.link === 'string';\n\n if (isLink) {\n return (\n <EditAttachmentItem\n onCancel={() => setEditingId('')}\n onAccept={handleAcceptDraft}\n values={draftLink}\n onChange={setDraftLink}\n tokens={[\n {value: 'default_database_logs', title: 'default_database_logs'},\n {value: 'default_yt', title: 'default_yt'},\n {value: 'default_yql', title: 'default_yql'},\n {\n value: 'default_long_token_title',\n title: 'default_long_token_title',\n },\n ]}\n type={'link'}\n />\n );\n }\n\n return (\n <EditAttachmentItem\n fileName={draftName}\n onChangeFileName={setDraftName}\n onCancel={() => setEditingId('')}\n onAccept={handleAcceptDraft}\n type={'file'}\n />\n );\n }}\n />\n );\n};\n\n/** Hover a row and click edit to replace it with a consumer-provided rename form. */\nexport const CustomEditForm: Story = {\n render: (args) => <EditableAttachmentList {...args} />,\n};\n\nconst SortableAttachmentList = (props: AttachmentListProps) => {\n const [orderedAttachments, setOrderedAttachments] = useState(props.attachments);\n\n return (\n <AttachmentList\n {...props}\n attachments={orderedAttachments}\n onSortEnd={({oldIndex, newIndex}) => {\n props.onSortEnd?.({oldIndex, newIndex});\n setOrderedAttachments((current) => {\n const next = [...current];\n const [movedAttachment] = next.splice(oldIndex, 1);\n\n if (movedAttachment) {\n next.splice(newIndex, 0, movedAttachment);\n }\n\n return next;\n });\n }}\n />\n );\n};\n\n/** Drag attachments by the handle to reorder them using the inherited List sorting API. */\nexport const Sortable: Story = {\n args: {\n sortable: true,\n sortHandleAlign: 'left',\n onSortEnd: fn(),\n },\n render: (args) => <SortableAttachmentList {...args} />,\n};\n\n/** Consumer-provided content is displayed when the attachment array is empty. */\nexport const Empty: Story = {\n args: {\n attachments: [],\n emptyPlaceholder: <Text color=\"secondary\">No attachments yet</Text>,\n },\n};\n\n/** The inherited loading state can be used while the attachment collection is being fetched. */\nexport const Loading: Story = {\n args: {\n attachments: [],\n loading: true,\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,IAAGC,QAAQ,QAAO,OAAO;AAErC,SAAQC,IAAI,QAAO,mBAAmB;AACtC,SAAQC,kBAAkB;AAC1B,SAAQC,EAAE,QAAO,gBAAgB;AAEjC,SAAQC,cAAc;AAAoD,SAAAC,GAAA,IAAAC,IAAA;AAE1E,IAAMC,WAA+C,GAAG,CACpD;EAACC,EAAE,EAAE,QAAQ;EAAEC,IAAI,EAAE;AAAQ,CAAC,EAC9B;EAACD,EAAE,EAAE,YAAY;EAAEC,IAAI,EAAE;AAAU,CAAC,EACpC;EAACD,EAAE,EAAE,QAAQ;EAAEC,IAAI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CAAC;;AAED;AACA,OAAO,IAAM+F,OAAc,GAAG;EAC1B9F,IAAI,EAAE;IACFhB,WAAW,EAAE,EAAE;IACf+G,OAAO,EAAE;EACb;AACJ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const getAttachmentExtension: (attachmentName: string) => "unknown" | "yql" | "js" | "ql" | "sql" | "py" | "csv" | "xls" | "xlsx" | "cpp";
|
|
2
|
+
export declare const getAttachmentIcon: (attachmentName: string) => (() => import("react").JSX.Element) | ((props: import("react").SVGProps<SVGSVGElement>) => React.JSX.Element) | ((props: import("react").SVGProps<SVGSVGElement>) => React.JSX.Element) | ((props: import("react").SVGProps<SVGSVGElement>) => React.JSX.Element) | ((props: import("react").SVGProps<SVGSVGElement>) => React.JSX.Element) | ((props: import("react").SVGProps<SVGSVGElement>) => React.JSX.Element) | ((props: import("react").SVGProps<SVGSVGElement>) => React.JSX.Element);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import "core-js/modules/es.array.last-index-of.js";
|
|
2
|
+
import "core-js/modules/es.array.slice.js";
|
|
3
|
+
import { AbbrQl, AbbrSql, FileCode, LayoutList, LogoNodejs, LogoPython } from '@gravity-ui/icons';
|
|
4
|
+
import { LogoCPlusPlus } from "../../Icons";
|
|
5
|
+
var iconMatcher = {
|
|
6
|
+
js: LogoNodejs,
|
|
7
|
+
ql: AbbrQl,
|
|
8
|
+
sql: AbbrSql,
|
|
9
|
+
yql: AbbrSql,
|
|
10
|
+
py: LogoPython,
|
|
11
|
+
csv: LayoutList,
|
|
12
|
+
xls: LayoutList,
|
|
13
|
+
xlsx: LayoutList,
|
|
14
|
+
cpp: LogoCPlusPlus,
|
|
15
|
+
unknown: FileCode
|
|
16
|
+
};
|
|
17
|
+
export var getAttachmentExtension = function getAttachmentExtension(attachmentName) {
|
|
18
|
+
var name = attachmentName.split('/').pop();
|
|
19
|
+
if (name === undefined) return 'unknown';
|
|
20
|
+
var index = name === null || name === void 0 ? void 0 : name.lastIndexOf('.');
|
|
21
|
+
if (index === undefined) return 'unknown';
|
|
22
|
+
var extension = index > 0 ? name.slice(index + 1) : '';
|
|
23
|
+
if (extension in iconMatcher) return extension;
|
|
24
|
+
return 'unknown';
|
|
25
|
+
};
|
|
26
|
+
export var getAttachmentIcon = function getAttachmentIcon(attachmentName) {
|
|
27
|
+
var extension = getAttachmentExtension(attachmentName);
|
|
28
|
+
return iconMatcher[extension];
|
|
29
|
+
};
|
|
30
|
+
// #sourceMappingURL=getIconByAttachmentName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AbbrQl","AbbrSql","FileCode","LayoutList","LogoNodejs","LogoPython","LogoCPlusPlus","iconMatcher","js","ql","sql","yql","py","csv","xls","xlsx","cpp","unknown","getAttachmentExtension","attachmentName","name","split","pop","undefined","index","lastIndexOf","extension","slice","getAttachmentIcon"],"sources":["getIconByAttachmentName.ts"],"sourcesContent":["import {AbbrQl, AbbrSql, FileCode, LayoutList, LogoNodejs, LogoPython} from '@gravity-ui/icons';\nimport {LogoCPlusPlus} from '../../Icons';\n\nconst iconMatcher = {\n js: LogoNodejs,\n ql: AbbrQl,\n sql: AbbrSql,\n yql: AbbrSql,\n py: LogoPython,\n csv: LayoutList,\n xls: LayoutList,\n xlsx: LayoutList,\n cpp: LogoCPlusPlus,\n unknown: FileCode,\n} as const;\n\nexport const getAttachmentExtension = (attachmentName: string) => {\n const name = attachmentName.split('/').pop();\n\n if (name === undefined) return 'unknown';\n\n const index = name?.lastIndexOf('.');\n\n if (index === undefined) return 'unknown';\n\n const extension = index > 0 ? name.slice(index + 1) : '';\n\n if (extension in iconMatcher) return extension as keyof typeof iconMatcher;\n\n return 'unknown';\n};\n\nexport const getAttachmentIcon = (attachmentName: string) => {\n const extension = getAttachmentExtension(attachmentName);\n return iconMatcher[extension];\n};\n"],"mappings":";;AAAA,SAAQA,MAAM,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,UAAU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ator = (values: Record<string, unknown>, isTokenRequired?: boolean) => EditLinkErrors | null;
|
|
7
|
+
export declare const objectLinkValidator: (values: Record<string, unknown>, isTokenRequired?: boolean) => Partial<Partial<{
|
|
8
|
+
link: string;
|
|
9
|
+
token: string;
|
|
10
|
+
name: string;
|
|
11
|
+
}>> | null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "core-js/modules/es.function.name.js";
|
|
2
|
+
import "core-js/modules/es.object.keys.js";
|
|
3
|
+
import "core-js/modules/es.string.link.js";
|
|
4
|
+
import { stringRequiredValidator } from "./stringRequiredValidator";
|
|
5
|
+
export var objectLinkValidator = function objectLinkValidator(values, isTokenRequired) {
|
|
6
|
+
var patchErrors = {};
|
|
7
|
+
var linkError = stringRequiredValidator(values.link);
|
|
8
|
+
if (linkError) {
|
|
9
|
+
patchErrors['link'] = linkError;
|
|
10
|
+
}
|
|
11
|
+
var tokenError = isTokenRequired ? stringRequiredValidator(values.token) : null;
|
|
12
|
+
if (tokenError) {
|
|
13
|
+
patchErrors['token'] = tokenError;
|
|
14
|
+
}
|
|
15
|
+
var nameError = stringRequiredValidator(values.name);
|
|
16
|
+
if (nameError) {
|
|
17
|
+
patchErrors['name'] = nameError;
|
|
18
|
+
}
|
|
19
|
+
if (Object.keys(patchErrors).length === 0) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return patchErrors;
|
|
23
|
+
};
|
|
24
|
+
// #sourceMappingURL=objectLinkValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["stringRequiredValidator","objectLinkValidator","values","isTokenRequired","patchErrors","linkError","link","tokenError","token","nameError","name","Object","keys","length"],"sources":["objectLinkValidator.ts"],"sourcesContent":["import {stringRequiredValidator} from './stringRequiredValidator';\n\nexport type EditLinkErrors = Partial<{\n link: string;\n token: string;\n name: string;\n}>;\n\nexport type ObjectLinkValidator = (\n values: Record<string, unknown>,\n isTokenRequired?: boolean,\n) => EditLinkErrors | null;\n\nexport const objectLinkValidator = (values: Record<string, unknown>, isTokenRequired?: boolean) => {\n const patchErrors: Partial<EditLinkErrors> = {};\n\n const linkError = stringRequiredValidator(values.link);\n\n if (linkError) {\n patchErrors['link'] = linkError;\n }\n\n const tokenError = isTokenRequired ? stringRequiredValidator(values.token) : null;\n\n if (tokenError) {\n patchErrors['token'] = tokenError;\n }\n\n const nameError = stringRequiredValidator(values.name);\n\n if (nameError) {\n patchErrors['name'] = nameError;\n }\n\n if (Object.keys(patchErrors).length === 0) {\n return null;\n }\n\n return patchErrors;\n};\n"],"mappings":";;;AAAA,SAAQA,uBAAuB;AAa/B,OAAO,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIC,MAA+B,EAAEC,eAAyB,EAAK;EAC/F,IAAMC,WAAoC,GAAG,CAAC,CAAC;EAE/C,IAAMC,SAAS,GAAGL,uBAAuB,CAACE,MAAM,CAACI,IAAI,CAAC;EAEtD,IAAID,SAAS,EAAE;IACXD,WAAW,CAAC,MAAM,CAAC,GAAGC,SAAS;EACnC;EAEA,IAAME,UAAU,GAAGJ,eAAe,GAAGH,uBAAuB,CAACE,MAAM,CAACM,KAAK,CAAC,GAAG,IAAI;EAEjF,IAAID,UAAU,EAAE;IACZH,WAAW,CAAC,OAAO,CAAC,GAAGG,UAAU;EACrC;EAEA,IAAME,SAAS,GAAGT,uBAAuB,CAACE,MAAM,CAACQ,IAAI,CAAC;EAEtD,IAAID,SAAS,EAAE;IACXL,WAAW,CAAC,MAAM,CAAC,GAAGK,SAAS;EACnC;EAEA,IAAIE,MAAM,CAACC,IAAI,CAACR,WAAW,CAAC,CAACS,MAAM,KAAK,CAAC,EAAE;IACvC,OAAO,IAAI;EACf;EAEA,OAAOT,WAAW;AACtB,CAAC","ignoreList":[]}
|