@ytsaurus/components 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +129 -148
- package/README.ru.md +165 -0
- package/build/esm/api/navigation/helpers/getTableTypeByAttributes.js +1 -1
- package/build/esm/api/navigation/helpers/getTableTypeByAttributes.js.map +1 -1
- package/build/esm/api/navigation/loadFolderByPath.js +1 -1
- package/build/esm/api/navigation/loadFolderByPath.js.map +1 -1
- package/build/esm/api/navigation/loadNodeByPath.js +1 -1
- package/build/esm/api/navigation/loadNodeByPath.js.map +1 -1
- package/build/esm/api/navigation/loadTableAttributesByPath.d.ts +2 -2
- package/build/esm/api/navigation/loadTableAttributesByPath.d.ts.map +1 -1
- package/build/esm/api/navigation/loadTableAttributesByPath.js +1 -1
- package/build/esm/api/navigation/loadTableAttributesByPath.js.map +1 -1
- package/build/esm/api/navigation/table.d.ts +0 -30
- package/build/esm/api/navigation/table.d.ts.map +1 -1
- package/build/esm/api/navigation/table.js +0 -46
- package/build/esm/api/navigation/table.js.map +1 -1
- package/build/esm/components/ClipboardButton/ClipboardButton.d.ts +1 -1
- package/build/esm/components/ClipboardButton/ClipboardButton.stories.d.ts +22 -0
- package/build/esm/components/ClipboardButton/ClipboardButton.stories.d.ts.map +1 -0
- package/build/esm/components/ClipboardButton/ClipboardButton.stories.js +20 -0
- package/build/esm/components/ClipboardButton/ClipboardButton.stories.js.map +1 -0
- package/build/esm/components/ClipboardButton/__tests__/ClipboardButton.visual.test.js +31 -0
- package/build/esm/components/ClipboardButton/__tests__/ClipboardButton.visual.test.js.map +1 -0
- package/build/esm/components/ColumnCell/ColumnCell.d.ts +7 -5
- package/build/esm/components/ColumnCell/ColumnCell.d.ts.map +1 -1
- package/build/esm/components/ColumnCell/ColumnCell.js +25 -21
- package/build/esm/components/ColumnCell/ColumnCell.js.map +1 -1
- package/build/esm/components/ColumnCell/ColumnCell.stories.d.ts +64 -0
- package/build/esm/components/ColumnCell/ColumnCell.stories.d.ts.map +1 -0
- package/build/esm/components/ColumnCell/ColumnCell.stories.js +83 -0
- package/build/esm/components/ColumnCell/ColumnCell.stories.js.map +1 -0
- package/build/esm/components/ColumnCell/__tests__/ColumnCell.visual.test.js +158 -0
- package/build/esm/components/ColumnCell/__tests__/ColumnCell.visual.test.js.map +1 -0
- package/build/esm/components/ColumnCell/columnCellStorySetup.d.ts +23 -0
- package/build/esm/components/ColumnCell/columnCellStorySetup.d.ts.map +1 -0
- package/build/esm/components/ColumnCell/columnCellStorySetup.js +41 -0
- package/build/esm/components/ColumnCell/columnCellStorySetup.js.map +1 -0
- package/build/esm/components/DataTableYT/DataTableYT.css +1 -1
- package/build/esm/components/DataTableYT/DataTableYT.css.map +1 -1
- package/build/esm/components/DataTableYT/DataTableYT.scss +1 -1
- package/build/esm/components/DataTableYT/DataTableYT.stories.d.ts +60 -0
- package/build/esm/components/DataTableYT/DataTableYT.stories.d.ts.map +1 -0
- package/build/esm/components/DataTableYT/DataTableYT.stories.js +106 -0
- package/build/esm/components/DataTableYT/DataTableYT.stories.js.map +1 -0
- package/build/esm/components/DataTableYT/__tests__/DataTableYT.visual.test.js +101 -0
- package/build/esm/components/DataTableYT/__tests__/DataTableYT.visual.test.js.map +1 -0
- package/build/esm/components/DataTableYT/dataTableYTStorySetup.d.ts +28 -0
- package/build/esm/components/DataTableYT/dataTableYTStorySetup.d.ts.map +1 -0
- package/build/esm/components/DataTableYT/dataTableYTStorySetup.js +56 -0
- package/build/esm/components/DataTableYT/dataTableYTStorySetup.js.map +1 -0
- package/build/esm/components/Hotkey/Hotkey.stories.d.ts +48 -0
- package/build/esm/components/Hotkey/Hotkey.stories.d.ts.map +1 -0
- package/build/esm/components/Hotkey/Hotkey.stories.js +81 -0
- package/build/esm/components/Hotkey/Hotkey.stories.js.map +1 -0
- package/build/esm/components/Label/Label.css +16 -16
- package/build/esm/components/Label/Label.css.map +1 -1
- package/build/esm/components/Label/Label.d.ts +3 -3
- package/build/esm/components/Label/Label.d.ts.map +1 -1
- package/build/esm/components/Label/Label.js +1 -0
- package/build/esm/components/Label/Label.js.map +1 -1
- package/build/esm/components/Label/Label.scss +26 -11
- package/build/esm/components/Label/Label.stories.d.ts +40 -0
- package/build/esm/components/Label/Label.stories.d.ts.map +1 -0
- package/build/esm/components/Label/Label.stories.js +62 -0
- package/build/esm/components/Label/Label.stories.js.map +1 -0
- package/build/esm/components/Label/LabelOnOff.d.ts +1 -1
- package/build/esm/components/Label/LabelOnOff.d.ts.map +1 -1
- package/build/esm/components/Label/LabelOnOff.js +3 -2
- package/build/esm/components/Label/LabelOnOff.js.map +1 -1
- package/build/esm/components/Label/__tests__/Label.visual.test.js +301 -0
- package/build/esm/components/Label/__tests__/Label.visual.test.js.map +1 -0
- package/build/esm/components/Label/i18n/dicts.d.ts +12 -0
- package/build/esm/components/Label/i18n/dicts.d.ts.map +1 -0
- package/build/esm/components/Label/i18n/dicts.js +7 -0
- package/build/esm/components/Label/i18n/dicts.js.map +1 -0
- package/build/esm/components/Label/i18n/en.json +4 -0
- package/build/esm/components/Label/i18n/index.d.ts +7 -0
- package/build/esm/components/Label/i18n/index.d.ts.map +1 -0
- package/build/esm/components/Label/i18n/index.js +4 -0
- package/build/esm/components/Label/i18n/index.js.map +1 -0
- package/build/esm/components/Label/i18n/ru.json +4 -0
- package/build/esm/components/MetaTable/MetaTable.css +6 -1
- package/build/esm/components/MetaTable/MetaTable.css.map +1 -1
- package/build/esm/components/MetaTable/MetaTable.d.ts.map +1 -1
- package/build/esm/components/MetaTable/MetaTable.js +1 -1
- package/build/esm/components/MetaTable/MetaTable.js.map +1 -1
- package/build/esm/components/MetaTable/MetaTable.scss +6 -1
- package/build/esm/components/MetaTable/MetaTable.stories.d.ts +9 -0
- package/build/esm/components/MetaTable/MetaTable.stories.d.ts.map +1 -0
- package/build/esm/components/MetaTable/MetaTable.stories.js +29 -0
- package/build/esm/components/MetaTable/MetaTable.stories.js.map +1 -0
- package/build/esm/components/MetaTable/__tests__/MetaTable.visual.test.js +48 -0
- package/build/esm/components/MetaTable/__tests__/MetaTable.visual.test.js.map +1 -0
- package/build/esm/components/MetaTable/metaTableStorySetup.d.ts +8 -0
- package/build/esm/components/MetaTable/metaTableStorySetup.d.ts.map +1 -0
- package/build/esm/components/MetaTable/metaTableStorySetup.js +134 -0
- package/build/esm/components/MetaTable/metaTableStorySetup.js.map +1 -0
- package/build/esm/components/MetaTable/presets/erasure-replication.js +1 -1
- package/build/esm/components/MetaTable/presets/erasure-replication.js.map +1 -1
- package/build/esm/components/MetaTable/presets/helpers/commonFields.d.ts +2 -2
- package/build/esm/components/MetaTable/presets/helpers/commonFields.d.ts.map +1 -1
- package/build/esm/components/MetaTable/presets/helpers/commonFields.js.map +1 -1
- package/build/esm/components/MetaTable/presets/i18n/dicts.d.ts +18 -0
- package/build/esm/components/MetaTable/presets/i18n/dicts.d.ts.map +1 -0
- package/build/esm/components/MetaTable/presets/i18n/dicts.js +7 -0
- package/build/esm/components/MetaTable/presets/i18n/dicts.js.map +1 -0
- package/build/esm/components/MetaTable/presets/i18n/en.json +5 -5
- package/build/esm/components/MetaTable/presets/i18n/index.d.ts +2 -2
- package/build/esm/components/MetaTable/presets/i18n/index.d.ts.map +1 -1
- package/build/esm/components/MetaTable/presets/i18n/index.js +2 -6
- package/build/esm/components/MetaTable/presets/i18n/index.js.map +1 -1
- package/build/esm/components/MetaTable/presets/i18n/ru.json +5 -5
- package/build/esm/components/MetaTable/presets/main.d.ts +2 -2
- package/build/esm/components/MetaTable/presets/main.d.ts.map +1 -1
- package/build/esm/components/MetaTable/presets/main.js.map +1 -1
- package/build/esm/components/MetaTable/presets/presets.d.ts +3 -3
- package/build/esm/components/MetaTable/presets/presets.d.ts.map +1 -1
- package/build/esm/components/MetaTable/presets/presets.js +1 -1
- package/build/esm/components/MetaTable/presets/presets.js.map +1 -1
- package/build/esm/components/MetaTable/presets/size.d.ts.map +1 -1
- package/build/esm/components/MetaTable/presets/size.js +5 -6
- package/build/esm/components/MetaTable/presets/size.js.map +1 -1
- package/build/esm/components/MetaTable/presets/ttl.d.ts +2 -2
- package/build/esm/components/MetaTable/presets/ttl.d.ts.map +1 -1
- package/build/esm/components/MetaTable/presets/ttl.js +10 -5
- package/build/esm/components/MetaTable/presets/ttl.js.map +1 -1
- package/build/esm/components/MetaTable/templates/RowsCount/RowsCount.css +1 -1
- package/build/esm/components/MetaTable/templates/RowsCount/RowsCount.css.map +1 -1
- package/build/esm/components/MetaTable/templates/RowsCount/RowsCount.js +3 -2
- package/build/esm/components/MetaTable/templates/RowsCount/RowsCount.js.map +1 -1
- package/build/esm/components/MetaTable/templates/RowsCount/RowsCount.scss +1 -1
- package/build/esm/components/MetaTable/templates/Template.d.ts +1 -1
- package/build/esm/components/MetaTable/templates/Template.d.ts.map +1 -1
- package/build/esm/components/MetaTable/templates/Template.js +8 -8
- package/build/esm/components/MetaTable/templates/Template.js.map +1 -1
- package/build/esm/components/MetaTable/templates/TemplateTime.d.ts.map +1 -1
- package/build/esm/components/MetaTable/templates/TemplateTime.js +1 -1
- package/build/esm/components/MetaTable/templates/TemplateTime.js.map +1 -1
- package/build/esm/components/NoContent/NoContent.stories.d.ts +44 -0
- package/build/esm/components/NoContent/NoContent.stories.d.ts.map +1 -0
- package/build/esm/components/NoContent/NoContent.stories.js +42 -0
- package/build/esm/components/NoContent/NoContent.stories.js.map +1 -0
- package/build/esm/components/NoContent/__tests__/NoContent.visual.test.js +90 -0
- package/build/esm/components/NoContent/__tests__/NoContent.visual.test.js.map +1 -0
- package/build/esm/components/SchemaDataType/DataType/DataType.css +2 -2
- package/build/esm/components/SchemaDataType/DataType/DataType.css.map +1 -1
- package/build/esm/components/SchemaDataType/DataType/DataType.scss +2 -2
- package/build/esm/components/SchemaDataType/DataType/DataType.stories.d.ts +9 -0
- package/build/esm/components/SchemaDataType/DataType/DataType.stories.d.ts.map +1 -0
- package/build/esm/components/SchemaDataType/DataType/DataType.stories.js +28 -0
- package/build/esm/components/SchemaDataType/DataType/DataType.stories.js.map +1 -0
- package/build/esm/components/SchemaDataType/DataType/__tests__/DataType.visual.test.js +51 -0
- package/build/esm/components/SchemaDataType/DataType/__tests__/DataType.visual.test.js.map +1 -0
- package/build/esm/components/SchemaDataType/DataType/dataTypeStorySetup.d.ts +9 -0
- package/build/esm/components/SchemaDataType/DataType/dataTypeStorySetup.d.ts.map +1 -0
- package/build/esm/components/SchemaDataType/DataType/dataTypeStorySetup.js +77 -0
- package/build/esm/components/SchemaDataType/DataType/dataTypeStorySetup.js.map +1 -0
- package/build/esm/components/SchemaDataType/SchemaDataType.d.ts.map +1 -1
- package/build/esm/components/SchemaDataType/SchemaDataType.js +2 -1
- package/build/esm/components/SchemaDataType/SchemaDataType.js.map +1 -1
- package/build/esm/components/SchemaDataType/i18n/dicts.d.ts +10 -0
- package/build/esm/components/SchemaDataType/i18n/dicts.d.ts.map +1 -0
- package/build/esm/components/SchemaDataType/i18n/dicts.js +7 -0
- package/build/esm/components/SchemaDataType/i18n/dicts.js.map +1 -0
- package/build/esm/components/SchemaDataType/i18n/en.json +3 -0
- package/build/esm/components/SchemaDataType/i18n/index.d.ts +7 -0
- package/build/esm/components/SchemaDataType/i18n/index.d.ts.map +1 -0
- package/build/esm/components/SchemaDataType/i18n/index.js +4 -0
- package/build/esm/components/SchemaDataType/i18n/index.js.map +1 -0
- package/build/esm/components/SchemaDataType/i18n/ru.json +3 -0
- package/build/esm/components/Text/Text.css +8 -8
- package/build/esm/components/Text/Text.css.map +1 -1
- package/build/esm/components/Text/Text.scss +8 -8
- package/build/esm/components/Text/Text.stories.d.ts +37 -0
- package/build/esm/components/Text/Text.stories.d.ts.map +1 -0
- package/build/esm/components/Text/Text.stories.js +37 -0
- package/build/esm/components/Text/Text.stories.js.map +1 -0
- package/build/esm/components/Text/__tests__/Text.visual.test.js +89 -0
- package/build/esm/components/Text/__tests__/Text.visual.test.js.map +1 -0
- package/build/esm/components/Text/textStorySetup.d.ts +43 -0
- package/build/esm/components/Text/textStorySetup.d.ts.map +1 -0
- package/build/esm/components/Text/textStorySetup.js +149 -0
- package/build/esm/components/Text/textStorySetup.js.map +1 -0
- package/build/esm/components/Tooltip/Tooltip.stories.d.ts +48 -0
- package/build/esm/components/Tooltip/Tooltip.stories.d.ts.map +1 -0
- package/build/esm/components/Tooltip/Tooltip.stories.js +46 -0
- package/build/esm/components/Tooltip/Tooltip.stories.js.map +1 -0
- package/build/esm/components/Tooltip/__tests__/Tooltip.visual.test.js +64 -0
- package/build/esm/components/Tooltip/__tests__/Tooltip.visual.test.js.map +1 -0
- package/build/esm/components/YqlValue/YqlValue.d.ts +4 -7
- package/build/esm/components/YqlValue/YqlValue.d.ts.map +1 -1
- package/build/esm/components/YqlValue/YqlValue.js +13 -22
- package/build/esm/components/YqlValue/YqlValue.js.map +1 -1
- package/build/esm/components/YqlValue/YqlValue.stories.d.ts +15 -0
- package/build/esm/components/YqlValue/YqlValue.stories.d.ts.map +1 -0
- package/build/esm/components/YqlValue/YqlValue.stories.js +150 -0
- package/build/esm/components/YqlValue/YqlValue.stories.js.map +1 -0
- package/build/esm/components/YqlValue/__tests__/YqlValue.visual.test.js +56 -0
- package/build/esm/components/YqlValue/__tests__/YqlValue.visual.test.js.map +1 -0
- package/build/esm/components/YqlValue/yqlValueStorySetup.d.ts +24 -0
- package/build/esm/components/YqlValue/yqlValueStorySetup.d.ts.map +1 -0
- package/build/esm/components/YqlValue/yqlValueStorySetup.js +81 -0
- package/build/esm/components/YqlValue/yqlValueStorySetup.js.map +1 -0
- package/build/esm/index.d.ts +0 -2
- package/build/esm/index.d.ts.map +1 -1
- package/build/esm/index.js +0 -2
- package/build/esm/index.js.map +1 -1
- package/build/esm/internal/DefaultErrorBoundary/ErrorBoundary.css +2 -4
- package/build/esm/internal/DefaultErrorBoundary/ErrorBoundary.css.map +1 -1
- package/build/esm/internal/DefaultErrorBoundary/ErrorBoundary.scss +2 -2
- package/build/esm/internal/Yson/Yson.d.ts +26 -4
- package/build/esm/internal/Yson/Yson.d.ts.map +1 -1
- package/build/esm/internal/Yson/Yson.js +13 -21
- package/build/esm/internal/Yson/Yson.js.map +1 -1
- package/build/esm/modules/NavigationTable/NavigationTable.d.ts +9 -2
- package/build/esm/modules/NavigationTable/NavigationTable.d.ts.map +1 -1
- package/build/esm/modules/NavigationTable/NavigationTable.js +22 -5
- package/build/esm/modules/NavigationTable/NavigationTable.js.map +1 -1
- package/build/esm/modules/NavigationTable/NavigationTable.stories.d.ts +9 -0
- package/build/esm/modules/NavigationTable/NavigationTable.stories.d.ts.map +1 -0
- package/build/esm/modules/NavigationTable/NavigationTable.stories.js +42 -0
- package/build/esm/modules/NavigationTable/NavigationTable.stories.js.map +1 -0
- package/build/esm/modules/NavigationTable/PreviewTab.d.ts +6 -3
- package/build/esm/modules/NavigationTable/PreviewTab.d.ts.map +1 -1
- package/build/esm/modules/NavigationTable/PreviewTab.js +9 -6
- package/build/esm/modules/NavigationTable/PreviewTab.js.map +1 -1
- package/build/esm/modules/NavigationTable/SchemaTab.d.ts +2 -0
- package/build/esm/modules/NavigationTable/SchemaTab.d.ts.map +1 -1
- package/build/esm/modules/NavigationTable/SchemaTab.js +17 -10
- package/build/esm/modules/NavigationTable/SchemaTab.js.map +1 -1
- package/build/esm/modules/NavigationTable/__tests__/NavigationTable.visual.test.js +117 -0
- package/build/esm/modules/NavigationTable/__tests__/NavigationTable.visual.test.js.map +1 -0
- package/build/esm/modules/NavigationTable/index.d.ts +1 -1
- package/build/esm/modules/NavigationTable/index.d.ts.map +1 -1
- package/build/esm/modules/NavigationTable/index.js.map +1 -1
- package/build/esm/modules/NavigationTable/navigationTableStorySetup.d.ts +19 -0
- package/build/esm/modules/NavigationTable/navigationTableStorySetup.d.ts.map +1 -0
- package/build/esm/modules/NavigationTable/navigationTableStorySetup.js +75 -0
- package/build/esm/modules/NavigationTable/navigationTableStorySetup.js.map +1 -0
- package/build/esm/modules/NavigationTable/prepareColumns.d.ts +6 -1
- package/build/esm/modules/NavigationTable/prepareColumns.d.ts.map +1 -1
- package/build/esm/modules/NavigationTable/prepareColumns.js +9 -5
- package/build/esm/modules/NavigationTable/prepareColumns.js.map +1 -1
- package/build/esm/modules/index.d.ts +1 -1
- package/build/esm/modules/index.d.ts.map +1 -1
- package/build/esm/modules/index.js.map +1 -1
- package/build/esm/types/index.d.ts +1 -0
- package/build/esm/types/index.d.ts.map +1 -1
- package/build/esm/types/index.js.map +1 -1
- package/build/esm/types/interface-helpers-modules.d.ts +13 -0
- package/build/esm/{context/YtComponentsConfigContext.d.ts → types/navigationMeta.d.ts} +8 -34
- package/build/esm/types/navigationMeta.d.ts.map +1 -0
- package/build/esm/types/navigationMeta.js +2 -0
- package/build/esm/types/navigationMeta.js.map +1 -0
- package/build/esm/types/yt-types.d.ts +3 -0
- package/build/esm/types/yt-types.d.ts.map +1 -1
- package/build/esm/types/yt-types.js.map +1 -1
- package/build/esm/utils/hammer/format.d.ts +0 -2
- package/build/esm/utils/hammer/format.d.ts.map +1 -1
- package/build/esm/utils/hammer/format.js +0 -225
- package/build/esm/utils/hammer/format.js.map +1 -1
- package/build/esm/utils/hammer/index.d.ts +2 -2
- package/build/esm/utils/hammer/index.d.ts.map +1 -1
- package/build/esm/utils/hammer/index.js +2 -5
- package/build/esm/utils/hammer/index.js.map +1 -1
- package/build/esm/utils/index.d.ts +3 -2
- package/build/esm/utils/index.d.ts.map +1 -1
- package/build/esm/utils/index.js +3 -2
- package/build/esm/utils/index.js.map +1 -1
- package/build/esm/utils/ypath/index.d.ts +0 -1
- package/build/esm/utils/ypath/index.d.ts.map +1 -1
- package/build/esm/utils/ypath/index.js +0 -1
- package/build/esm/utils/ypath/index.js.map +1 -1
- package/package.json +29 -8
- package/src/styles/mixins.scss +11 -0
- package/build/esm/api/navigation/columns.d.ts +0 -31
- package/build/esm/api/navigation/columns.d.ts.map +0 -1
- package/build/esm/api/navigation/columns.js +0 -256
- package/build/esm/api/navigation/columns.js.map +0 -1
- package/build/esm/context/YtComponentsConfigContext.d.ts.map +0 -1
- package/build/esm/context/YtComponentsConfigContext.js +0 -64
- package/build/esm/context/YtComponentsConfigContext.js.map +0 -1
- package/build/esm/context/index.d.ts +0 -2
- package/build/esm/context/index.d.ts.map +0 -1
- package/build/esm/context/index.js +0 -2
- package/build/esm/context/index.js.map +0 -1
- package/build/esm/utils/ypath/appendInnerErrors.d.ts +0 -3
- package/build/esm/utils/ypath/appendInnerErrors.d.ts.map +0 -1
- package/build/esm/utils/ypath/appendInnerErrors.js +0 -16
- package/build/esm/utils/ypath/appendInnerErrors.js.map +0 -1
- package/build/esm/utils/ypath/ypath-base.d.ts +0 -9
- package/build/esm/utils/ypath/ypath-base.d.ts.map +0 -1
- package/build/esm/utils/ypath/ypath-base.js +0 -49
- package/build/esm/utils/ypath/ypath-base.js.map +0 -1
- package/build/esm/utils/ypath/ypath.d.ts +0 -4
- package/build/esm/utils/ypath/ypath.d.ts.map +0 -1
- package/build/esm/utils/ypath/ypath.js +0 -70
- package/build/esm/utils/ypath/ypath.js.map +0 -1
- package/build/esm/utils/ypath/ypath.spec.d.ts +0 -2
- package/build/esm/utils/ypath/ypath.spec.d.ts.map +0 -1
- package/build/esm/utils/ypath/ypath.spec.js +0 -116
- package/build/esm/utils/ypath/ypath.spec.js.map +0 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/** Default Storybook args; shared with Playwright visual tests. */
|
|
2
|
+
export var textStoryDefaultArgs = {
|
|
3
|
+
children: 'YTsaurus UI text',
|
|
4
|
+
color: undefined,
|
|
5
|
+
bold: false,
|
|
6
|
+
noWrap: false,
|
|
7
|
+
ellipsis: false,
|
|
8
|
+
disabled: false,
|
|
9
|
+
capitalize: false
|
|
10
|
+
};
|
|
11
|
+
export var textStoryFrameStyle = {
|
|
12
|
+
minWidth: 280,
|
|
13
|
+
padding: 12,
|
|
14
|
+
border: '1px dashed var(--g-color-line-generic, #ddd)',
|
|
15
|
+
borderRadius: 8
|
|
16
|
+
};
|
|
17
|
+
/** Stable order for visual regression (light + dark each). */
|
|
18
|
+
export var textVisualStoryCases = [{
|
|
19
|
+
kind: 'yt-text',
|
|
20
|
+
id: 'default',
|
|
21
|
+
props: {
|
|
22
|
+
children: 'YTsaurus UI text'
|
|
23
|
+
}
|
|
24
|
+
}, {
|
|
25
|
+
kind: 'yt-text',
|
|
26
|
+
id: 'color-secondary',
|
|
27
|
+
props: {
|
|
28
|
+
children: 'Secondary tone',
|
|
29
|
+
color: 'secondary'
|
|
30
|
+
}
|
|
31
|
+
}, {
|
|
32
|
+
kind: 'yt-text',
|
|
33
|
+
id: 'color-success',
|
|
34
|
+
props: {
|
|
35
|
+
children: 'Success',
|
|
36
|
+
color: 'success'
|
|
37
|
+
}
|
|
38
|
+
}, {
|
|
39
|
+
kind: 'yt-text',
|
|
40
|
+
id: 'color-info',
|
|
41
|
+
props: {
|
|
42
|
+
children: 'Info',
|
|
43
|
+
color: 'info'
|
|
44
|
+
}
|
|
45
|
+
}, {
|
|
46
|
+
kind: 'yt-text',
|
|
47
|
+
id: 'color-warning',
|
|
48
|
+
props: {
|
|
49
|
+
children: 'Warning',
|
|
50
|
+
color: 'warning'
|
|
51
|
+
}
|
|
52
|
+
}, {
|
|
53
|
+
kind: 'yt-text',
|
|
54
|
+
id: 'color-warning-light',
|
|
55
|
+
props: {
|
|
56
|
+
children: 'Warning light',
|
|
57
|
+
color: 'warning-light'
|
|
58
|
+
}
|
|
59
|
+
}, {
|
|
60
|
+
kind: 'yt-text',
|
|
61
|
+
id: 'color-danger',
|
|
62
|
+
props: {
|
|
63
|
+
children: 'Danger',
|
|
64
|
+
color: 'danger'
|
|
65
|
+
}
|
|
66
|
+
}, {
|
|
67
|
+
kind: 'yt-text',
|
|
68
|
+
id: 'bold',
|
|
69
|
+
props: {
|
|
70
|
+
children: 'Bold text',
|
|
71
|
+
bold: true
|
|
72
|
+
}
|
|
73
|
+
}, {
|
|
74
|
+
kind: 'yt-text',
|
|
75
|
+
id: 'disabled',
|
|
76
|
+
props: {
|
|
77
|
+
children: 'Disabled',
|
|
78
|
+
disabled: true
|
|
79
|
+
}
|
|
80
|
+
}, {
|
|
81
|
+
kind: 'yt-text',
|
|
82
|
+
id: 'secondary-disabled',
|
|
83
|
+
props: {
|
|
84
|
+
children: 'Secondary disabled',
|
|
85
|
+
color: 'secondary',
|
|
86
|
+
disabled: true
|
|
87
|
+
}
|
|
88
|
+
}, {
|
|
89
|
+
kind: 'yt-text',
|
|
90
|
+
id: 'capitalize',
|
|
91
|
+
props: {
|
|
92
|
+
children: 'capitalized words',
|
|
93
|
+
capitalize: true
|
|
94
|
+
}
|
|
95
|
+
}, {
|
|
96
|
+
kind: 'yt-text',
|
|
97
|
+
id: 'ellipsis',
|
|
98
|
+
props: {
|
|
99
|
+
children: 'Very long text that should be truncated with ellipsis in a narrow box',
|
|
100
|
+
ellipsis: true
|
|
101
|
+
},
|
|
102
|
+
wrapperStyle: {
|
|
103
|
+
maxWidth: 140
|
|
104
|
+
}
|
|
105
|
+
}, {
|
|
106
|
+
kind: 'yt-text',
|
|
107
|
+
id: 'no-wrap',
|
|
108
|
+
props: {
|
|
109
|
+
children: 'Single line: noWrap keeps this on one line',
|
|
110
|
+
noWrap: true
|
|
111
|
+
},
|
|
112
|
+
wrapperStyle: {
|
|
113
|
+
maxWidth: 200
|
|
114
|
+
}
|
|
115
|
+
}, {
|
|
116
|
+
kind: 'Secondary',
|
|
117
|
+
id: 'Secondary',
|
|
118
|
+
children: 'Secondary component'
|
|
119
|
+
}, {
|
|
120
|
+
kind: 'Secondary',
|
|
121
|
+
id: 'Secondary-disabled',
|
|
122
|
+
children: 'Secondary disabled',
|
|
123
|
+
disabled: true
|
|
124
|
+
}, {
|
|
125
|
+
kind: 'Bold',
|
|
126
|
+
id: 'Bold',
|
|
127
|
+
children: 'Bold component'
|
|
128
|
+
}, {
|
|
129
|
+
kind: 'SecondaryBold',
|
|
130
|
+
id: 'SecondaryBold',
|
|
131
|
+
children: 'Secondary bold'
|
|
132
|
+
}, {
|
|
133
|
+
kind: 'Warning',
|
|
134
|
+
id: 'Warning',
|
|
135
|
+
children: 'Warning component'
|
|
136
|
+
}, {
|
|
137
|
+
kind: 'WarningLight',
|
|
138
|
+
id: 'WarningLight',
|
|
139
|
+
children: 'Warning light component'
|
|
140
|
+
}, {
|
|
141
|
+
kind: 'NoWrap',
|
|
142
|
+
id: 'NoWrap',
|
|
143
|
+
children: 'NoWrap component: long line should not wrap'
|
|
144
|
+
}, {
|
|
145
|
+
kind: 'Escaped',
|
|
146
|
+
id: 'Escaped',
|
|
147
|
+
text: '{"message":"hello\\nworld","quotes":"\\"nested\\""}'
|
|
148
|
+
}];
|
|
149
|
+
// #sourceMappingURL=textStorySetup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["textStoryDefaultArgs","children","color","undefined","bold","noWrap","ellipsis","disabled","capitalize","textStoryFrameStyle","minWidth","padding","border","borderRadius","textVisualStoryCases","kind","id","props","wrapperStyle","maxWidth","text"],"sources":["textStorySetup.ts"],"sourcesContent":["import type {CSSProperties} from 'react';\n\nimport type {TextProps} from './Text';\n\n/** Default Storybook args; shared with Playwright visual tests. */\nexport const textStoryDefaultArgs: Pick<\n TextProps,\n 'children' | 'color' | 'bold' | 'noWrap' | 'ellipsis' | 'disabled' | 'capitalize'\n> = {\n children: 'YTsaurus UI text',\n color: undefined,\n bold: false,\n noWrap: false,\n ellipsis: false,\n disabled: false,\n capitalize: false,\n};\n\nexport const textStoryFrameStyle: CSSProperties = {\n minWidth: 280,\n padding: 12,\n border: '1px dashed var(--g-color-line-generic, #ddd)',\n borderRadius: 8,\n};\n\nexport type TextVisualCase =\n | {kind: 'yt-text'; id: string; props: TextProps; wrapperStyle?: CSSProperties}\n | {kind: 'Secondary'; id: string; children: string; disabled?: boolean}\n | {kind: 'Bold'; id: string; children: string}\n | {kind: 'SecondaryBold'; id: string; children: string}\n | {kind: 'Warning'; id: string; children: string}\n | {kind: 'WarningLight'; id: string; children: string}\n | {kind: 'NoWrap'; id: string; children: string}\n | {kind: 'Escaped'; id: string; text: string};\n\n/** Stable order for visual regression (light + dark each). */\nexport const textVisualStoryCases: TextVisualCase[] = [\n {kind: 'yt-text', id: 'default', props: {children: 'YTsaurus UI text'}},\n {\n kind: 'yt-text',\n id: 'color-secondary',\n props: {children: 'Secondary tone', color: 'secondary'},\n },\n {kind: 'yt-text', id: 'color-success', props: {children: 'Success', color: 'success'}},\n {kind: 'yt-text', id: 'color-info', props: {children: 'Info', color: 'info'}},\n {kind: 'yt-text', id: 'color-warning', props: {children: 'Warning', color: 'warning'}},\n {\n kind: 'yt-text',\n id: 'color-warning-light',\n props: {children: 'Warning light', color: 'warning-light'},\n },\n {kind: 'yt-text', id: 'color-danger', props: {children: 'Danger', color: 'danger'}},\n {kind: 'yt-text', id: 'bold', props: {children: 'Bold text', bold: true}},\n {kind: 'yt-text', id: 'disabled', props: {children: 'Disabled', disabled: true}},\n {\n kind: 'yt-text',\n id: 'secondary-disabled',\n props: {children: 'Secondary disabled', color: 'secondary', disabled: true},\n },\n {kind: 'yt-text', id: 'capitalize', props: {children: 'capitalized words', capitalize: true}},\n {\n kind: 'yt-text',\n id: 'ellipsis',\n props: {\n children: 'Very long text that should be truncated with ellipsis in a narrow box',\n ellipsis: true,\n },\n wrapperStyle: {maxWidth: 140},\n },\n {\n kind: 'yt-text',\n id: 'no-wrap',\n props: {children: 'Single line: noWrap keeps this on one line', noWrap: true},\n wrapperStyle: {maxWidth: 200},\n },\n {kind: 'Secondary', id: 'Secondary', children: 'Secondary component'},\n {kind: 'Secondary', id: 'Secondary-disabled', children: 'Secondary disabled', disabled: true},\n {kind: 'Bold', id: 'Bold', children: 'Bold component'},\n {kind: 'SecondaryBold', id: 'SecondaryBold', children: 'Secondary bold'},\n {kind: 'Warning', id: 'Warning', children: 'Warning component'},\n {kind: 'WarningLight', id: 'WarningLight', children: 'Warning light component'},\n {kind: 'NoWrap', id: 'NoWrap', children: 'NoWrap component: long line should not wrap'},\n {\n kind: 'Escaped',\n id: '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AAW;EAAEf,QAAQ,EAAE;AAAqB,CAAC,EACrE;EAACc,IAAI,EAAE,WAAW;EAAEC,EAAE,EAAE,oBAAoB;EAAEf,QAAQ,EAAE,oBAAoB;EAAEM,QAAQ,EAAE;AAAI,CAAC,EAC7F;EAACQ,IAAI,EAAE,MAAM;EAAEC,EAAE,EAAE,MAAM;EAAEf,QAAQ,EAAE;AAAgB,CAAC,EACtD;EAACc,IAAI,EAAE,eAAe;EAAEC,EAAE,EAAE,eAAe;EAAEf,QAAQ,EAAE;AAAgB,CAAC,EACxE;EAACc,IAAI,EAAE,SAAS;EAAEC,EAAE,EAAE,SAAS;EAAEf,QAAQ,EAAE;AAAmB,CAAC,EAC/D;EAACc,IAAI,EAAE,cAAc;EAAEC,EAAE,EAAE,cAAc;EAAEf,QAAQ,EAAE;AAAyB,CAAC,EAC/E;EAACc,IAAI,EAAE,QAAQ;EAAEC,EAAE,EAAE,QAAQ;EAAEf,QAAQ,EAAE;AAA6C,CAAC,EACvF;EACIc,IAAI,EAAE,SAAS;EACfC,EAAE,EAAE,SAAS;EACbI,IAAI,EAAE;AACV,CAAC,CACJ","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Tooltip } from './Tooltip';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Tooltip;
|
|
6
|
+
tags: string[];
|
|
7
|
+
args: {
|
|
8
|
+
content: string;
|
|
9
|
+
children: string;
|
|
10
|
+
placement: "right";
|
|
11
|
+
openDelay: number;
|
|
12
|
+
closeDelay: number;
|
|
13
|
+
disabled: false;
|
|
14
|
+
useFlex: false;
|
|
15
|
+
ellipsis: false;
|
|
16
|
+
};
|
|
17
|
+
argTypes: {
|
|
18
|
+
content: {
|
|
19
|
+
control: "text";
|
|
20
|
+
};
|
|
21
|
+
children: {
|
|
22
|
+
control: "text";
|
|
23
|
+
};
|
|
24
|
+
placement: {
|
|
25
|
+
control: "inline-radio";
|
|
26
|
+
options: string[];
|
|
27
|
+
};
|
|
28
|
+
openDelay: {
|
|
29
|
+
control: "number";
|
|
30
|
+
};
|
|
31
|
+
closeDelay: {
|
|
32
|
+
control: "number";
|
|
33
|
+
};
|
|
34
|
+
disabled: {
|
|
35
|
+
control: "boolean";
|
|
36
|
+
};
|
|
37
|
+
useFlex: {
|
|
38
|
+
control: "boolean";
|
|
39
|
+
};
|
|
40
|
+
ellipsis: {
|
|
41
|
+
control: "boolean";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export default meta;
|
|
46
|
+
type Story = StoryObj<typeof meta>;
|
|
47
|
+
export declare const Default: Story;
|
|
48
|
+
//# sourceMappingURL=Tooltip.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/Tooltip.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BsB,CAAC;AAEjC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Tooltip } from './Tooltip';
|
|
2
|
+
var meta = {
|
|
3
|
+
title: 'Components/Tooltip',
|
|
4
|
+
component: Tooltip,
|
|
5
|
+
tags: ['autodocs'],
|
|
6
|
+
args: {
|
|
7
|
+
content: 'Simple text',
|
|
8
|
+
children: 'Hover me',
|
|
9
|
+
placement: 'right',
|
|
10
|
+
openDelay: 400,
|
|
11
|
+
closeDelay: 400,
|
|
12
|
+
disabled: false,
|
|
13
|
+
useFlex: false,
|
|
14
|
+
ellipsis: false
|
|
15
|
+
},
|
|
16
|
+
argTypes: {
|
|
17
|
+
content: {
|
|
18
|
+
control: 'text'
|
|
19
|
+
},
|
|
20
|
+
children: {
|
|
21
|
+
control: 'text'
|
|
22
|
+
},
|
|
23
|
+
placement: {
|
|
24
|
+
control: 'inline-radio',
|
|
25
|
+
options: ['top', 'bottom', 'left', 'right']
|
|
26
|
+
},
|
|
27
|
+
openDelay: {
|
|
28
|
+
control: 'number'
|
|
29
|
+
},
|
|
30
|
+
closeDelay: {
|
|
31
|
+
control: 'number'
|
|
32
|
+
},
|
|
33
|
+
disabled: {
|
|
34
|
+
control: 'boolean'
|
|
35
|
+
},
|
|
36
|
+
useFlex: {
|
|
37
|
+
control: 'boolean'
|
|
38
|
+
},
|
|
39
|
+
ellipsis: {
|
|
40
|
+
control: 'boolean'
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
export default meta;
|
|
45
|
+
export var Default = {};
|
|
46
|
+
// #sourceMappingURL=Tooltip.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Tooltip","meta","title","component","tags","args","content","children","placement","openDelay","closeDelay","disabled","useFlex","ellipsis","argTypes","control","options","Default"],"sources":["Tooltip.stories.tsx"],"sourcesContent":["import type {Meta, StoryObj} from '@storybook/react';\n\nimport {Tooltip} from './Tooltip';\n\nconst meta = {\n title: 'Components/Tooltip',\n component: Tooltip,\n tags: ['autodocs'],\n args: {\n content: 'Simple text',\n children: 'Hover me',\n placement: 'right',\n openDelay: 400,\n closeDelay: 400,\n disabled: false,\n useFlex: false,\n ellipsis: false,\n },\n argTypes: {\n content: {control: 'text'},\n children: {control: 'text'},\n placement: {\n control: 'inline-radio',\n options: ['top', 'bottom', 'left', 'right'],\n },\n openDelay: {control: 'number'},\n closeDelay: {control: 'number'},\n disabled: {control: 'boolean'},\n useFlex: {control: 'boolean'},\n ellipsis: {control: 'boolean'},\n },\n} satisfies Meta<typeof Tooltip>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Default: Story = {};\n"],"mappings":"AAEA,SAAQA,OAAO,QAAO,WAAW;AAEjC,IAAMC,IAAI,GAAG;EACTC,KAAK,EAAE,oBAAoB;EAC3BC,SAAS,EAAEH,OAAO;EAClBI,IAAI,EAAE,CAAC,UAAU,CAAC;EAClBC,IAAI,EAAE;IACFC,OAAO,EAAE,aAAa;IACtBC,QAAQ,EAAE,UAAU;IACpBC,SAAS,EAAE,OAAO;IAClBC,SAAS,EAAE,GAAG;IACdC,UAAU,EAAE,GAAG;IACfC,QAAQ,EAAE,KAAK;IACfC,OAAO,EAAE,KAAK;IACdC,QAAQ,EAAE;EACd,CAAC;EACDC,QAAQ,EAAE;IACNR,OAAO,EAAE;MAACS,OAAO,EAAE;IAAM,CAAC;IAC1BR,QAAQ,EAAE;MAACQ,OAAO,EAAE;IAAM,CAAC;IAC3BP,SAAS,EAAE;MACPO,OAAO,EAAE,cAAc;MACvBC,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO;IAC9C,CAAC;IACDP,SAAS,EAAE;MAACM,OAAO,EAAE;IAAQ,CAAC;IAC9BL,UAAU,EAAE;MAACK,OAAO,EAAE;IAAQ,CAAC;IAC/BJ,QAAQ,EAAE;MAACI,OAAO,EAAE;IAAS,CAAC;IAC9BH,OAAO,EAAE;MAACG,OAAO,EAAE;IAAS,CAAC;IAC7BF,QAAQ,EAAE;MAACE,OAAO,EAAE;IAAS;EACjC;AACJ,CAAgC;AAEhC,eAAed,IAAI;AAInB,OAAO,IAAMgB,OAAc,GAAG,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/regeneratorRuntime";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import { test } from '../../../../playwright-components/core';
|
|
4
|
+
import { Tooltip } from '../Tooltip';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
test('Tooltip: Default', /*#__PURE__*/function () {
|
|
7
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref) {
|
|
8
|
+
var mount, expectScreenshot, page;
|
|
9
|
+
return _regeneratorRuntime().wrap(function (_context2) {
|
|
10
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
11
|
+
case 0:
|
|
12
|
+
mount = _ref.mount, expectScreenshot = _ref.expectScreenshot, page = _ref.page;
|
|
13
|
+
_context2.next = 1;
|
|
14
|
+
return mount(/*#__PURE__*/_jsx(Tooltip, {
|
|
15
|
+
content: "Simple text",
|
|
16
|
+
placement: "right",
|
|
17
|
+
openDelay: 400,
|
|
18
|
+
closeDelay: 400,
|
|
19
|
+
disabled: false,
|
|
20
|
+
useFlex: false,
|
|
21
|
+
ellipsis: false,
|
|
22
|
+
children: "Hover me"
|
|
23
|
+
}));
|
|
24
|
+
case 1:
|
|
25
|
+
_context2.next = 2;
|
|
26
|
+
return expectScreenshot({
|
|
27
|
+
component: page,
|
|
28
|
+
beforeScreenshot: function () {
|
|
29
|
+
var _beforeScreenshot = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
30
|
+
return _regeneratorRuntime().wrap(function (_context) {
|
|
31
|
+
while (1) switch (_context.prev = _context.next) {
|
|
32
|
+
case 0:
|
|
33
|
+
_context.next = 1;
|
|
34
|
+
return page.getByText('Hover me').hover();
|
|
35
|
+
case 1:
|
|
36
|
+
_context.next = 2;
|
|
37
|
+
return page.getByText('Simple text', {
|
|
38
|
+
exact: true
|
|
39
|
+
}).waitFor({
|
|
40
|
+
state: 'visible'
|
|
41
|
+
});
|
|
42
|
+
case 2:
|
|
43
|
+
case "end":
|
|
44
|
+
return _context.stop();
|
|
45
|
+
}
|
|
46
|
+
}, _callee);
|
|
47
|
+
}));
|
|
48
|
+
function beforeScreenshot() {
|
|
49
|
+
return _beforeScreenshot.apply(this, arguments);
|
|
50
|
+
}
|
|
51
|
+
return beforeScreenshot;
|
|
52
|
+
}()
|
|
53
|
+
});
|
|
54
|
+
case 2:
|
|
55
|
+
case "end":
|
|
56
|
+
return _context2.stop();
|
|
57
|
+
}
|
|
58
|
+
}, _callee2);
|
|
59
|
+
}));
|
|
60
|
+
return function (_x) {
|
|
61
|
+
return _ref2.apply(this, arguments);
|
|
62
|
+
};
|
|
63
|
+
}());
|
|
64
|
+
// #sourceMappingURL=Tooltip.visual.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["test","Tooltip","jsx","_jsx","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee2","_ref","mount","expectScreenshot","page","wrap","_context2","prev","next","content","placement","openDelay","closeDelay","disabled","useFlex","ellipsis","children","component","beforeScreenshot","_beforeScreenshot","_callee","_context","getByText","hover","exact","waitFor","state","stop","apply","arguments","_x"],"sources":["Tooltip.visual.test.tsx"],"sourcesContent":["import {test} from '../../../../playwright-components/core';\n\nimport {Tooltip} from '../Tooltip';\n\ntest('Tooltip: Default', async ({mount, expectScreenshot, page}) => {\n await mount(\n <Tooltip\n content=\"Simple text\"\n placement=\"right\"\n openDelay={400}\n closeDelay={400}\n disabled={false}\n useFlex={false}\n ellipsis={false}\n >\n Hover me\n </Tooltip>,\n );\n\n await expectScreenshot({\n component: page,\n beforeScreenshot: async () => {\n await page.getByText('Hover me').hover();\n await page.getByText('Simple text', {exact: true}).waitFor({state: 'visible'});\n },\n });\n});\n"],"mappings":";;AAAA,SAAQA,IAAI,QAAO,wCAAwC;AAE3D,SAAQC,OAAO,QAAO,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnCH,IAAI,CAAC,kBAAkB;EAAA,IAAAI,KAAA,GAAAC,iBAAA,cAAAC,mBAAA,GAAAC,IAAA,CAAE,SAAAC,SAAAC,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AAAP,OAAA;cAAA,CACjF;cAAA,SAHDF,gBAAgBA,CAAA;gBAAA,OAAAC,iBAAA,CAAAS,KAAA,OAAAC,SAAA;cAAA;cAAA,OAAhBX,gBAAgB;YAAA;UAIpB,CAAC,CAAC;QAAA;QAAA;UAAA,OAAAZ,SAAA,CAAAqB,IAAA;MAAA;IAAA,GAAA3B,QAAA;EAAA,CACL;EAAA,iBAAA8B,EAAA;IAAA,OAAAlC,KAAA,CAAAgC,KAAA,OAAAC,SAAA;EAAA;AAAA,IAAC","ignoreList":[]}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { UnipikaSettings } from '../../internal/Yson/StructuredYson/StructuredYsonTypes';
|
|
3
|
+
import type { ErrorBoundaryProps } from '../../internal/DefaultErrorBoundary';
|
|
3
4
|
export type UnipikaValueType = Array<string | UnipikaValueType>;
|
|
4
5
|
export type YqlValueProps = {
|
|
5
6
|
value?: unknown;
|
|
6
7
|
type: UnipikaValueType;
|
|
7
|
-
settings
|
|
8
|
+
settings: UnipikaSettings;
|
|
8
9
|
inline?: boolean;
|
|
10
|
+
ErrorBoundaryComponent?: React.ComponentType<ErrorBoundaryProps>;
|
|
9
11
|
};
|
|
10
|
-
declare class
|
|
12
|
+
export declare class YqlValue extends React.Component<YqlValueProps> {
|
|
11
13
|
static getFormattedValue(value: unknown, type: UnipikaValueType, settings?: UnipikaSettings): any;
|
|
12
14
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
}
|
|
14
|
-
type YqlValueWithStatic = React.FC<YqlValueProps> & {
|
|
15
|
-
getFormattedValue: typeof YqlValueImpl.getFormattedValue;
|
|
16
|
-
};
|
|
17
|
-
export declare const YqlValue: YqlValueWithStatic;
|
|
18
|
-
export {};
|
|
19
16
|
//# sourceMappingURL=YqlValue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YqlValue.d.ts","sourceRoot":"","sources":["../../../../src/components/YqlValue/YqlValue.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"YqlValue.d.ts","sourceRoot":"","sources":["../../../../src/components/YqlValue/YqlValue.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAC,eAAe,EAAC,MAAM,wDAAwD,CAAC;AACvF,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,qCAAqC,CAAC;AAG5E,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,GAAG,gBAAgB,CAAC,CAAC;AAEhE,MAAM,MAAM,aAAa,GAAG;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,gBAAgB,CAAC;IACvB,QAAQ,EAAE,eAAe,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sBAAsB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;CACpE,CAAC;AAEF,qBAAa,QAAS,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;IACxD,MAAM,CAAC,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,QAAQ,CAAC,EAAE,eAAe;IAQ3F,MAAM;CA0CT"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
3
|
import _callSuper from "@babel/runtime/helpers/callSuper";
|
|
@@ -6,35 +5,37 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
6
5
|
import React from 'react';
|
|
7
6
|
import block from 'bem-cn-lite';
|
|
8
7
|
import unipika from '../../utils/unipika';
|
|
9
|
-
import
|
|
8
|
+
import DefaultErrorBoundary from '../../internal/DefaultErrorBoundary/ErrorBoundary';
|
|
10
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
_classCallCheck(this,
|
|
14
|
-
return _callSuper(this,
|
|
10
|
+
export var YqlValue = /*#__PURE__*/function (_React$Component) {
|
|
11
|
+
function YqlValue() {
|
|
12
|
+
_classCallCheck(this, YqlValue);
|
|
13
|
+
return _callSuper(this, YqlValue, arguments);
|
|
15
14
|
}
|
|
16
|
-
_inherits(
|
|
17
|
-
return _createClass(
|
|
15
|
+
_inherits(YqlValue, _React$Component);
|
|
16
|
+
return _createClass(YqlValue, [{
|
|
18
17
|
key: "render",
|
|
19
18
|
value: function render() {
|
|
20
19
|
var _this$props = this.props,
|
|
21
20
|
value = _this$props.value,
|
|
22
21
|
type = _this$props.type,
|
|
23
22
|
inline = _this$props.inline,
|
|
24
|
-
settings = _this$props.settings
|
|
25
|
-
|
|
23
|
+
settings = _this$props.settings,
|
|
24
|
+
ErrorBoundaryComponent = _this$props.ErrorBoundaryComponent;
|
|
25
|
+
var ConfigurableErrorBoundary = ErrorBoundaryComponent || DefaultErrorBoundary;
|
|
26
|
+
var formattedValue = YqlValue.getFormattedValue(value, type, settings);
|
|
26
27
|
var title;
|
|
27
28
|
if (inline) {
|
|
28
29
|
var titleSettings = Object.assign({}, settings, {
|
|
29
30
|
asHTML: false
|
|
30
31
|
});
|
|
31
|
-
title =
|
|
32
|
+
title = settings.format === 'raw-json' ? unipika.formatRaw(value, titleSettings) : unipika.formatFromYQL(value, titleSettings);
|
|
32
33
|
}
|
|
33
34
|
var classes = block('unipika-wrapper')({
|
|
34
35
|
inline: inline && 'yes'
|
|
35
36
|
});
|
|
36
37
|
return /*#__PURE__*/_jsx(ConfigurableErrorBoundary, {
|
|
37
|
-
children: settings
|
|
38
|
+
children: settings.asHTML ? /*#__PURE__*/_jsx("div", {
|
|
38
39
|
className: classes,
|
|
39
40
|
title: title,
|
|
40
41
|
dir: "auto",
|
|
@@ -61,14 +62,4 @@ var YqlValueImpl = /*#__PURE__*/function (_React$Component) {
|
|
|
61
62
|
}
|
|
62
63
|
}]);
|
|
63
64
|
}(React.Component);
|
|
64
|
-
function YqlValueComponent(props) {
|
|
65
|
-
var fromContext = useUnipikaSettings();
|
|
66
|
-
var settings = props.settings !== undefined ? props.settings : fromContext;
|
|
67
|
-
return /*#__PURE__*/_jsx(YqlValueImpl, _objectSpread(_objectSpread({}, props), {}, {
|
|
68
|
-
settings: settings
|
|
69
|
-
}));
|
|
70
|
-
}
|
|
71
|
-
export var YqlValue = Object.assign(YqlValueComponent, {
|
|
72
|
-
getFormattedValue: YqlValueImpl.getFormattedValue
|
|
73
|
-
});
|
|
74
65
|
// #sourceMappingURL=YqlValue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","block","unipika","
|
|
1
|
+
{"version":3,"names":["React","block","unipika","DefaultErrorBoundary","jsx","_jsx","YqlValue","_React$Component","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","render","_this$props","props","type","inline","settings","ErrorBoundaryComponent","ConfigurableErrorBoundary","formattedValue","getFormattedValue","title","titleSettings","Object","assign","asHTML","format","formatRaw","formatFromYQL","classes","children","className","dir","dangerouslySetInnerHTML","__html","yqlValue","Component"],"sources":["YqlValue.tsx"],"sourcesContent":["import React from 'react';\nimport block from 'bem-cn-lite';\nimport unipika from '../../utils/unipika';\n\nimport {UnipikaSettings} from '../../internal/Yson/StructuredYson/StructuredYsonTypes';\nimport type {ErrorBoundaryProps} from '../../internal/DefaultErrorBoundary';\nimport DefaultErrorBoundary from '../../internal/DefaultErrorBoundary/ErrorBoundary';\n\nexport type UnipikaValueType = Array<string | UnipikaValueType>;\n\nexport type YqlValueProps = {\n value?: unknown;\n type: UnipikaValueType;\n settings: UnipikaSettings;\n inline?: boolean;\n ErrorBoundaryComponent?: React.ComponentType<ErrorBoundaryProps>;\n};\n\nexport class YqlValue extends React.Component<YqlValueProps> {\n static getFormattedValue(value: unknown, type: UnipikaValueType, settings?: UnipikaSettings) {\n const yqlValue = [value, type];\n\n return settings?.format === 'raw-json'\n ? unipika.formatRaw(yqlValue, settings)\n : unipika.formatFromYQL(yqlValue, settings);\n }\n\n render() {\n const {value, type, inline, settings, ErrorBoundaryComponent} = this.props;\n const ConfigurableErrorBoundary = ErrorBoundaryComponent || DefaultErrorBoundary;\n\n const formattedValue = YqlValue.getFormattedValue(value, type, settings);\n\n let title;\n\n if (inline) {\n const titleSettings = Object.assign({}, settings, {\n asHTML: false,\n });\n\n title =\n settings.format === 'raw-json'\n ? unipika.formatRaw(value, titleSettings)\n : unipika.formatFromYQL(value, titleSettings);\n }\n\n const classes = block('unipika-wrapper')({\n inline: inline && 'yes',\n });\n\n return (\n <ConfigurableErrorBoundary>\n {settings.asHTML ? (\n <div className={classes} title={title} dir=\"auto\">\n <pre\n className=\"unipika\"\n dangerouslySetInnerHTML={{__html: formattedValue}}\n />\n </div>\n ) : (\n <div\n className={classes}\n title={title}\n dangerouslySetInnerHTML={{__html: formattedValue}}\n />\n )}\n </ConfigurableErrorBoundary>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,KAAK,MAAM,aAAa;AAC/B,OAAOC,OAAO,MAAM,qBAAqB;AAIzC,OAAOC,oBAAoB,MAAM,mDAAmD;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAYrF,WAAaC,QAAQ,0BAAAC,gBAAA;EAAA,SAAAD,SAAA;IAAAE,eAAA,OAAAF,QAAA;IAAA,OAAAG,UAAA,OAAAH,QAAA,EAAAI,SAAA;EAAA;EAAAC,SAAA,CAAAL,QAAA,EAAAC,gBAAA;EAAA,OAAAK,YAAA,CAAAN,QAAA;IAAAO,GAAA;IAAAC,KAAA,EASjB,SAAAC,MAAMA,CAAA,EAAG;MACL,IAAAC,WAAA,GAAgE,IAAI,CAACC,KAAK;QAAnEH,KAAK,GAAAE,WAAA,CAALF,KAAK;QAAEI,IAAI,GAA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KAAA,EAjDD,SAAOU,iBAAiBA,CAACV,KAAc,EAAEI,IAAsB,EAAEE,QAA0B,EAAE;MACzF,IAAMmB,QAAQ,GAAG,CAACzB,KAAK,EAAEI,IAAI,CAAC;MAE9B,OAAO,CAAAE,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAEU,MAAM,MAAK,UAAU,GAChC5B,OAAO,CAAC6B,SAAS,CAACQ,QAAQ,EAAEnB,QAAQ,CAAC,GACrClB,OAAO,CAAC8B,aAAa,CAACO,QAAQ,EAAEnB,QAAQ,CAAC;IACnD;EAAC;AAAA,EAPyBpB,KAAK,CAACwC,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { type YqlValueStoryArgs } from './yqlValueStorySetup';
|
|
3
|
+
type DemoArgs = YqlValueStoryArgs;
|
|
4
|
+
declare const meta: Meta<DemoArgs>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<DemoArgs>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const fromReadQueryResultSearchPhrase: Story;
|
|
9
|
+
export declare const fromReadQueryResultUint64: Story;
|
|
10
|
+
export declare const fromReadQueryResultLongText: Story;
|
|
11
|
+
export declare const fromReadQueryResultDate: Story;
|
|
12
|
+
export declare const fromReadQueryResultDatetime: Story;
|
|
13
|
+
export declare const fromReadQueryResultInterval: Story;
|
|
14
|
+
export declare const fromReadQueryResultTimestamp: Story;
|
|
15
|
+
//# sourceMappingURL=YqlValue.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"YqlValue.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/YqlValue/YqlValue.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAGrD,OAAO,EACH,KAAK,iBAAiB,EAMzB,MAAM,sBAAsB,CAAC;AAE9B,KAAK,QAAQ,GAAG,iBAAiB,CAAC;AAElC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,QAAQ,CAoCxB,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAEhC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,+BAA+B,EAAE,KAa7C,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KAavC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,KAazC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KAarC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,KAazC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,KAazC,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,KAa1C,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { YqlValue } from './YqlValue';
|
|
2
|
+
import { defaultYqlValueStorySettings, yqlValueOptionalDate, yqlValueOptionalDatetime, yqlValueOptionalInterval, yqlValueOptionalTimestamp } from './yqlValueStorySetup';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
var meta = {
|
|
5
|
+
title: 'Components/YqlValue',
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: 'Renders a YQL value with Unipika. For `read_query_result` payloads, resolve the type from `yql_type_registry` using the type index stored in each cell, then pass the cell payload and that type into `YqlValue` (same idea as `ColumnCell`).'
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
args: {
|
|
15
|
+
type: ['DataType', 'String'],
|
|
16
|
+
value: 'hello',
|
|
17
|
+
inline: false,
|
|
18
|
+
settings: defaultYqlValueStorySettings
|
|
19
|
+
},
|
|
20
|
+
argTypes: {
|
|
21
|
+
type: {
|
|
22
|
+
control: 'object',
|
|
23
|
+
description: 'YQL type tuple from `yql_type_registry`, e.g. ["DataType","String"]'
|
|
24
|
+
},
|
|
25
|
+
value: {
|
|
26
|
+
control: 'object',
|
|
27
|
+
description: 'First element of the cell `rows[i][column][0]`: string, number, or nested array (e.g. `["19523"]` for Date in read_query_result).'
|
|
28
|
+
},
|
|
29
|
+
inline: {
|
|
30
|
+
control: 'boolean'
|
|
31
|
+
},
|
|
32
|
+
settings: {
|
|
33
|
+
control: 'object',
|
|
34
|
+
description: 'Unipika formatting options (no validateSrcUrl / normalizeUrl here).'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
render: function render(_ref) {
|
|
38
|
+
var type = _ref.type,
|
|
39
|
+
value = _ref.value,
|
|
40
|
+
inline = _ref.inline,
|
|
41
|
+
settings = _ref.settings;
|
|
42
|
+
return /*#__PURE__*/_jsx(YqlValue, {
|
|
43
|
+
value: value,
|
|
44
|
+
type: type,
|
|
45
|
+
settings: settings,
|
|
46
|
+
inline: inline
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
export default meta;
|
|
51
|
+
export var Default = {};
|
|
52
|
+
export var fromReadQueryResultSearchPhrase = {
|
|
53
|
+
name: 'From read_query_result (search phrase)',
|
|
54
|
+
args: {
|
|
55
|
+
value: 'sample search phrase movies 2013 watch online',
|
|
56
|
+
type: ['DataType', 'String']
|
|
57
|
+
},
|
|
58
|
+
parameters: {
|
|
59
|
+
docs: {
|
|
60
|
+
description: {
|
|
61
|
+
story: 'Cell shape `["…", "8"]`: in a typical registry, index 8 maps to `DataType` + `String`.'
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
export var fromReadQueryResultUint64 = {
|
|
67
|
+
name: 'From read_query_result (Uint64)',
|
|
68
|
+
args: {
|
|
69
|
+
value: '45',
|
|
70
|
+
type: ['DataType', 'Uint64']
|
|
71
|
+
},
|
|
72
|
+
parameters: {
|
|
73
|
+
docs: {
|
|
74
|
+
description: {
|
|
75
|
+
story: 'Numeric column example: payload is often a string from the API; type is `Uint64` from `yql_type_registry[11]` in the sample registry.'
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
export var fromReadQueryResultLongText = {
|
|
81
|
+
name: 'From read_query_result (long text)',
|
|
82
|
+
args: {
|
|
83
|
+
value: 'Long placeholder text for wrapping and Unipika markup: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.',
|
|
84
|
+
type: ['DataType', 'String']
|
|
85
|
+
},
|
|
86
|
+
parameters: {
|
|
87
|
+
docs: {
|
|
88
|
+
description: {
|
|
89
|
+
story: 'Long string cell to exercise line breaks and Unipika HTML output.'
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
export var fromReadQueryResultDate = {
|
|
95
|
+
name: 'From read_query_result (Date)',
|
|
96
|
+
args: {
|
|
97
|
+
value: ['19523'],
|
|
98
|
+
type: yqlValueOptionalDate
|
|
99
|
+
},
|
|
100
|
+
parameters: {
|
|
101
|
+
docs: {
|
|
102
|
+
description: {
|
|
103
|
+
story: 'Optional Date: day count in a single-element array, as returned by read_query_result.'
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
export var fromReadQueryResultDatetime = {
|
|
109
|
+
name: 'From read_query_result (Datetime)',
|
|
110
|
+
args: {
|
|
111
|
+
value: ['1686839400'],
|
|
112
|
+
type: yqlValueOptionalDatetime
|
|
113
|
+
},
|
|
114
|
+
parameters: {
|
|
115
|
+
docs: {
|
|
116
|
+
description: {
|
|
117
|
+
story: 'Optional Datetime: Unix seconds in a one-element array; type from `yql_type_registry[9]`.'
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
export var fromReadQueryResultInterval = {
|
|
123
|
+
name: 'From read_query_result (Interval)',
|
|
124
|
+
args: {
|
|
125
|
+
value: ['93784567890'],
|
|
126
|
+
type: yqlValueOptionalInterval
|
|
127
|
+
},
|
|
128
|
+
parameters: {
|
|
129
|
+
docs: {
|
|
130
|
+
description: {
|
|
131
|
+
story: 'Optional Interval; type resolved from index `"10"`.'
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
export var fromReadQueryResultTimestamp = {
|
|
137
|
+
name: 'From read_query_result (Timestamp)',
|
|
138
|
+
args: {
|
|
139
|
+
value: ['1686839400123456'],
|
|
140
|
+
type: yqlValueOptionalTimestamp
|
|
141
|
+
},
|
|
142
|
+
parameters: {
|
|
143
|
+
docs: {
|
|
144
|
+
description: {
|
|
145
|
+
story: 'Optional Timestamp: integer microseconds in a one-element array; type from `yql_type_registry[11]`.'
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
// #sourceMappingURL=YqlValue.stories.js.map
|