@redneckz/wildless-cms-uni-blocks 0.14.854 → 0.14.856
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/bin/migration-scripts/0.14.850.js +70 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +58 -109
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/TariffsTable/TableCarouselContainer.d.ts +0 -2
- package/bundle/components/TariffsTable/TariffsTable.d.ts +1 -1
- package/bundle/components/TariffsTable/TariffsTableCell.d.ts +10 -8
- package/bundle/components/TariffsTable/TariffsTableContent.d.ts +2 -68
- package/bundle/components/TariffsTable/TariffsTableRow.d.ts +0 -2
- package/bundle/components/TariffsTable/TariffsTableRowContainer.d.ts +2 -1
- package/bundle/components/TariffsTable/TariffsTableWrapper.d.ts +1 -6
- package/bundle/components/TariffsTable/renderCell.d.ts +2 -0
- package/bundle/components/TariffsTable/renderHeader.d.ts +2 -0
- package/bundle/model/onClick.d.ts +3 -0
- package/bundle/model/onClose.d.ts +3 -0
- package/bundle/ui-kit/InnerTable/InnerTableButton.d.ts +2 -3
- package/bundle/ui-kit/InnerTable/InnerTableProps.d.ts +2 -4
- package/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js +1 -2
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/TariffsTable/TableCarouselContainer.d.ts +0 -2
- package/dist/components/TariffsTable/TableCarouselContainer.js +1 -1
- package/dist/components/TariffsTable/TableCarouselContainer.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.d.ts +1 -1
- package/dist/components/TariffsTable/TariffsTable.js +4 -11
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableCell.d.ts +10 -8
- package/dist/components/TariffsTable/TariffsTableCell.js +14 -4
- package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableContent.d.ts +2 -68
- package/dist/components/TariffsTable/TariffsTableRow.d.ts +0 -2
- package/dist/components/TariffsTable/TariffsTableRow.js +6 -10
- package/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableRowContainer.d.ts +2 -1
- package/dist/components/TariffsTable/TariffsTableRowContainer.js +3 -3
- package/dist/components/TariffsTable/TariffsTableRowContainer.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableWrapper.d.ts +1 -6
- package/dist/components/TariffsTable/TariffsTableWrapper.js +1 -9
- package/dist/components/TariffsTable/TariffsTableWrapper.js.map +1 -1
- package/dist/components/TariffsTable/dataFixture.js +1 -14
- package/dist/components/TariffsTable/dataFixture.js.map +1 -1
- package/dist/components/TariffsTable/renderCell.d.ts +2 -0
- package/dist/components/TariffsTable/renderCell.js +15 -0
- package/dist/components/TariffsTable/renderCell.js.map +1 -0
- package/dist/components/TariffsTable/renderHeader.d.ts +2 -0
- package/dist/components/TariffsTable/renderHeader.js +10 -0
- package/dist/components/TariffsTable/renderHeader.js.map +1 -0
- package/dist/components/TariffsTable/renderInnerTableCell.d.ts +0 -0
- package/dist/components/TariffsTable/renderInnerTableCell.js +1 -0
- package/dist/components/TariffsTable/renderInnerTableCell.js.map +1 -0
- package/dist/model/onClick.d.ts +3 -0
- package/dist/model/onClick.js +2 -0
- package/dist/model/onClick.js.map +1 -0
- package/dist/model/onClose.d.ts +3 -0
- package/dist/model/onClose.js +2 -0
- package/dist/model/onClose.js.map +1 -0
- package/dist/retail/components/CaptchaDialog/CaptchaDialog.js +3 -1
- package/dist/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/dist/retail/components/DraftDialog/DraftActionButton.js +1 -1
- package/dist/retail/components/DraftDialog/DraftActionButton.js.map +1 -1
- package/dist/ui-kit/InnerTable/InnerTable.js +2 -3
- package/dist/ui-kit/InnerTable/InnerTable.js.map +1 -1
- package/dist/ui-kit/InnerTable/InnerTableBody.js +4 -6
- package/dist/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
- package/dist/ui-kit/InnerTable/InnerTableButton.d.ts +2 -3
- package/dist/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/dist/ui-kit/InnerTable/InnerTableProps.d.ts +2 -4
- package/dist/ui-kit/InnerTable/renderInnerTableRow.js +1 -1
- package/dist/ui-kit/InnerTable/renderInnerTableRow.js.map +1 -1
- package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js +1 -2
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/TariffsTable/TableCarouselContainer.d.ts +0 -2
- package/lib/components/TariffsTable/TableCarouselContainer.js +1 -1
- package/lib/components/TariffsTable/TableCarouselContainer.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.d.ts +1 -1
- package/lib/components/TariffsTable/TariffsTable.fixture.mobile.d.ts +3 -1
- package/lib/components/TariffsTable/TariffsTable.js +4 -11
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableCell.d.ts +10 -8
- package/lib/components/TariffsTable/TariffsTableCell.js +14 -4
- package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableContent.d.ts +2 -68
- package/lib/components/TariffsTable/TariffsTableRow.d.ts +0 -2
- package/lib/components/TariffsTable/TariffsTableRow.js +6 -10
- package/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableRowContainer.d.ts +2 -1
- package/lib/components/TariffsTable/TariffsTableRowContainer.js +2 -2
- package/lib/components/TariffsTable/TariffsTableRowContainer.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableWrapper.d.ts +1 -6
- package/lib/components/TariffsTable/TariffsTableWrapper.js +2 -10
- package/lib/components/TariffsTable/TariffsTableWrapper.js.map +1 -1
- package/lib/components/TariffsTable/dataFixture.js +1 -14
- package/lib/components/TariffsTable/dataFixture.js.map +1 -1
- package/lib/components/TariffsTable/renderCell.d.ts +2 -0
- package/lib/components/TariffsTable/renderCell.js +12 -0
- package/lib/components/TariffsTable/renderCell.js.map +1 -0
- package/lib/components/TariffsTable/renderHeader.d.ts +2 -0
- package/lib/components/TariffsTable/renderHeader.js +7 -0
- package/lib/components/TariffsTable/renderHeader.js.map +1 -0
- package/lib/components/TariffsTable/renderInnerTableCell.d.ts +0 -0
- package/lib/components/TariffsTable/renderInnerTableCell.js +1 -0
- package/lib/components/TariffsTable/renderInnerTableCell.js.map +1 -0
- package/lib/model/onClick.d.ts +3 -0
- package/lib/model/onClick.js +2 -0
- package/lib/model/onClick.js.map +1 -0
- package/lib/model/onClose.d.ts +3 -0
- package/lib/model/onClose.js +2 -0
- package/lib/model/onClose.js.map +1 -0
- package/lib/retail/components/CaptchaDialog/CaptchaDialog.js +3 -1
- package/lib/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/lib/retail/components/DraftDialog/DraftActionButton.js +1 -1
- package/lib/retail/components/DraftDialog/DraftActionButton.js.map +1 -1
- package/lib/ui-kit/InnerTable/InnerTable.js +2 -3
- package/lib/ui-kit/InnerTable/InnerTable.js.map +1 -1
- package/lib/ui-kit/InnerTable/InnerTableBody.js +4 -6
- package/lib/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
- package/lib/ui-kit/InnerTable/InnerTableButton.d.ts +2 -3
- package/lib/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/lib/ui-kit/InnerTable/InnerTableProps.d.ts +2 -4
- package/lib/ui-kit/InnerTable/renderInnerTableRow.js +1 -1
- package/lib/ui-kit/InnerTable/renderInnerTableRow.js.map +1 -1
- package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
- package/mobile/bundle/bundle.umd.js +47 -123
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/TariffsTable/TableCarouselContainer.d.ts +0 -2
- package/mobile/bundle/components/TariffsTable/TariffsTable.d.ts +1 -1
- package/mobile/bundle/components/TariffsTable/TariffsTableCell.d.ts +10 -8
- package/mobile/bundle/components/TariffsTable/TariffsTableContent.d.ts +2 -68
- package/mobile/bundle/components/TariffsTable/TariffsTableRow.d.ts +0 -2
- package/mobile/bundle/components/TariffsTable/TariffsTableRowContainer.d.ts +2 -1
- package/mobile/bundle/components/TariffsTable/TariffsTableWrapper.d.ts +1 -6
- package/mobile/bundle/components/TariffsTable/renderCell.d.ts +2 -0
- package/mobile/bundle/components/TariffsTable/renderHeader.d.ts +2 -0
- package/mobile/bundle/model/onClick.d.ts +3 -0
- package/mobile/bundle/model/onClose.d.ts +3 -0
- package/mobile/bundle/ui-kit/InnerTable/InnerTableButton.d.ts +2 -3
- package/mobile/bundle/ui-kit/InnerTable/InnerTableProps.d.ts +2 -4
- package/mobile/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +1 -2
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TableCarouselContainer.d.ts +0 -2
- package/mobile/dist/components/TariffsTable/TableCarouselContainer.js +1 -1
- package/mobile/dist/components/TariffsTable/TableCarouselContainer.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTable.d.ts +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTable.js +4 -11
- package/mobile/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableCell.d.ts +10 -8
- package/mobile/dist/components/TariffsTable/TariffsTableCell.js +14 -4
- package/mobile/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +2 -68
- package/mobile/dist/components/TariffsTable/TariffsTableRow.d.ts +0 -2
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js +6 -10
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRowContainer.d.ts +2 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRowContainer.js +3 -3
- package/mobile/dist/components/TariffsTable/TariffsTableRowContainer.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableWrapper.d.ts +1 -6
- package/mobile/dist/components/TariffsTable/TariffsTableWrapper.js +1 -9
- package/mobile/dist/components/TariffsTable/TariffsTableWrapper.js.map +1 -1
- package/mobile/dist/components/TariffsTable/dataFixture.js +1 -14
- package/mobile/dist/components/TariffsTable/dataFixture.js.map +1 -1
- package/mobile/dist/components/TariffsTable/renderCell.d.ts +2 -0
- package/mobile/dist/components/TariffsTable/renderCell.js +15 -0
- package/mobile/dist/components/TariffsTable/renderCell.js.map +1 -0
- package/mobile/dist/components/TariffsTable/renderHeader.d.ts +2 -0
- package/mobile/dist/components/TariffsTable/renderHeader.js +10 -0
- package/mobile/dist/components/TariffsTable/renderHeader.js.map +1 -0
- package/mobile/dist/components/TariffsTable/renderInnerTableCell.d.ts +0 -0
- package/mobile/dist/components/TariffsTable/renderInnerTableCell.js +1 -0
- package/mobile/dist/components/TariffsTable/renderInnerTableCell.js.map +1 -0
- package/mobile/dist/model/onClick.d.ts +3 -0
- package/mobile/dist/model/onClick.js +2 -0
- package/mobile/dist/model/onClick.js.map +1 -0
- package/mobile/dist/model/onClose.d.ts +3 -0
- package/mobile/dist/model/onClose.js +2 -0
- package/mobile/dist/model/onClose.js.map +1 -0
- package/mobile/dist/retail/components/CaptchaDialog/CaptchaDialog.js +3 -1
- package/mobile/dist/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/mobile/dist/retail/components/DraftDialog/DraftActionButton.js +1 -1
- package/mobile/dist/retail/components/DraftDialog/DraftActionButton.js.map +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTable.js +2 -3
- package/mobile/dist/ui-kit/InnerTable/InnerTable.js.map +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableBody.js +4 -6
- package/mobile/dist/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableButton.d.ts +2 -3
- package/mobile/dist/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableProps.d.ts +2 -4
- package/mobile/dist/ui-kit/InnerTable/renderInnerTableRow.js +1 -1
- package/mobile/dist/ui-kit/InnerTable/renderInnerTableRow.js.map +1 -1
- package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +1 -2
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TableCarouselContainer.d.ts +0 -2
- package/mobile/lib/components/TariffsTable/TableCarouselContainer.js +1 -1
- package/mobile/lib/components/TariffsTable/TableCarouselContainer.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTable.d.ts +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTable.js +4 -11
- package/mobile/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableCell.d.ts +10 -8
- package/mobile/lib/components/TariffsTable/TariffsTableCell.js +14 -4
- package/mobile/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +2 -68
- package/mobile/lib/components/TariffsTable/TariffsTableRow.d.ts +0 -2
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js +6 -10
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRowContainer.d.ts +2 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRowContainer.js +2 -2
- package/mobile/lib/components/TariffsTable/TariffsTableRowContainer.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableWrapper.d.ts +1 -6
- package/mobile/lib/components/TariffsTable/TariffsTableWrapper.js +2 -10
- package/mobile/lib/components/TariffsTable/TariffsTableWrapper.js.map +1 -1
- package/mobile/lib/components/TariffsTable/dataFixture.js +1 -14
- package/mobile/lib/components/TariffsTable/dataFixture.js.map +1 -1
- package/mobile/lib/components/TariffsTable/renderCell.d.ts +2 -0
- package/mobile/lib/components/TariffsTable/renderCell.js +12 -0
- package/mobile/lib/components/TariffsTable/renderCell.js.map +1 -0
- package/mobile/lib/components/TariffsTable/renderHeader.d.ts +2 -0
- package/mobile/lib/components/TariffsTable/renderHeader.js +7 -0
- package/mobile/lib/components/TariffsTable/renderHeader.js.map +1 -0
- package/mobile/lib/components/TariffsTable/renderInnerTableCell.d.ts +0 -0
- package/mobile/lib/components/TariffsTable/renderInnerTableCell.js +1 -0
- package/mobile/lib/components/TariffsTable/renderInnerTableCell.js.map +1 -0
- package/mobile/lib/model/onClick.d.ts +3 -0
- package/mobile/lib/model/onClick.js +2 -0
- package/mobile/lib/model/onClick.js.map +1 -0
- package/mobile/lib/model/onClose.d.ts +3 -0
- package/mobile/lib/model/onClose.js +2 -0
- package/mobile/lib/model/onClose.js.map +1 -0
- package/mobile/lib/retail/components/CaptchaDialog/CaptchaDialog.js +3 -1
- package/mobile/lib/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/mobile/lib/retail/components/DraftDialog/DraftActionButton.js +1 -1
- package/mobile/lib/retail/components/DraftDialog/DraftActionButton.js.map +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTable.js +2 -3
- package/mobile/lib/ui-kit/InnerTable/InnerTable.js.map +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableBody.js +4 -6
- package/mobile/lib/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableButton.d.ts +2 -3
- package/mobile/lib/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableProps.d.ts +2 -4
- package/mobile/lib/ui-kit/InnerTable/renderInnerTableRow.js +1 -1
- package/mobile/lib/ui-kit/InnerTable/renderInnerTableRow.js.map +1 -1
- package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +8 -11
- package/mobile/src/components/TariffsTable/TableCarouselContainer.tsx +3 -10
- package/mobile/src/components/TariffsTable/TariffsTable.example.json +1 -34
- package/mobile/src/components/TariffsTable/TariffsTable.tsx +6 -13
- package/mobile/src/components/TariffsTable/TariffsTable.ui.json +0 -3
- package/mobile/src/components/TariffsTable/TariffsTableCell.tsx +37 -35
- package/mobile/src/components/TariffsTable/TariffsTableContent.ts +7 -84
- package/mobile/src/components/TariffsTable/TariffsTableRow.tsx +9 -49
- package/mobile/src/components/TariffsTable/TariffsTableRowContainer.tsx +7 -13
- package/mobile/src/components/TariffsTable/TariffsTableWrapper.tsx +5 -25
- package/mobile/src/components/TariffsTable/dataFixture.tsx +9 -22
- package/mobile/src/components/TariffsTable/renderCell.tsx +42 -0
- package/mobile/src/components/TariffsTable/renderHeader.tsx +19 -0
- package/mobile/src/components/TariffsTable/renderInnerTableCell.tsx +0 -0
- package/mobile/src/model/onClick.ts +3 -0
- package/mobile/src/model/onClose.ts +3 -0
- package/mobile/src/retail/components/CaptchaDialog/CaptchaDialog.tsx +3 -1
- package/mobile/src/retail/components/DraftDialog/DraftActionButton.tsx +5 -3
- package/mobile/src/ui-kit/InnerTable/InnerTable.tsx +2 -6
- package/mobile/src/ui-kit/InnerTable/InnerTableBody.tsx +19 -21
- package/mobile/src/ui-kit/InnerTable/InnerTableButton.tsx +2 -4
- package/mobile/src/ui-kit/InnerTable/InnerTableProps.ts +2 -4
- package/mobile/src/ui-kit/InnerTable/renderInnerTableRow.tsx +1 -1
- package/mobile/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +1 -1
- package/package.json +1 -1
- package/src/components/Header/HeaderSecondaryMenu.tsx +8 -11
- package/src/components/TariffsTable/TableCarouselContainer.tsx +3 -10
- package/src/components/TariffsTable/TariffsTable.example.json +1 -34
- package/src/components/TariffsTable/TariffsTable.fixture.mobile.tsx +28 -2
- package/src/components/TariffsTable/TariffsTable.tsx +6 -13
- package/src/components/TariffsTable/TariffsTable.ui.json +0 -3
- package/src/components/TariffsTable/TariffsTableCell.tsx +37 -35
- package/src/components/TariffsTable/TariffsTableContent.ts +7 -84
- package/src/components/TariffsTable/TariffsTableRow.tsx +9 -49
- package/src/components/TariffsTable/TariffsTableRowContainer.tsx +7 -13
- package/src/components/TariffsTable/TariffsTableWrapper.tsx +5 -25
- package/src/components/TariffsTable/dataFixture.tsx +9 -22
- package/src/components/TariffsTable/renderCell.tsx +42 -0
- package/src/components/TariffsTable/renderHeader.tsx +19 -0
- package/src/components/TariffsTable/renderInnerTableCell.tsx +0 -0
- package/src/icons/IconName.ts +4 -4
- package/src/model/onClick.ts +3 -0
- package/src/model/onClose.ts +3 -0
- package/src/retail/components/CaptchaDialog/CaptchaDialog.tsx +3 -1
- package/src/retail/components/DraftDialog/DraftActionButton.tsx +5 -3
- package/src/ui-kit/InnerTable/InnerTable.fixture.mobile.tsx +1 -4
- package/src/ui-kit/InnerTable/InnerTable.fixture.tsx +1 -4
- package/src/ui-kit/InnerTable/InnerTable.tsx +2 -6
- package/src/ui-kit/InnerTable/InnerTableBody.tsx +19 -21
- package/src/ui-kit/InnerTable/InnerTableButton.tsx +2 -4
- package/src/ui-kit/InnerTable/InnerTableProps.ts +2 -4
- package/src/ui-kit/InnerTable/renderInnerTableRow.tsx +1 -1
- package/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +1 -1
- package/bundle/components/TariffsTable/EmbeddableCellData.d.ts +0 -20
- package/bundle/components/TariffsTable/TableTileHeader.d.ts +0 -2
- package/bundle/components/TariffsTable/TariffsTableHorizontal.d.ts +0 -2
- package/bundle/components/TariffsTable/TariffsTableRenderCell.d.ts +0 -12
- package/bundle/components/TariffsTable/TariffsTableTileCell.d.ts +0 -6
- package/bundle/components/TariffsTable/TariffsTableVertical.d.ts +0 -2
- package/bundle/components/TariffsTable/constants.d.ts +0 -4
- package/dist/components/TariffsTable/EmbeddableCellData.d.ts +0 -20
- package/dist/components/TariffsTable/EmbeddableCellData.js +0 -25
- package/dist/components/TariffsTable/EmbeddableCellData.js.map +0 -1
- package/dist/components/TariffsTable/TableTileHeader.d.ts +0 -2
- package/dist/components/TariffsTable/TableTileHeader.js +0 -8
- package/dist/components/TariffsTable/TableTileHeader.js.map +0 -1
- package/dist/components/TariffsTable/TariffsTableHorizontal.d.ts +0 -2
- package/dist/components/TariffsTable/TariffsTableHorizontal.js +0 -8
- package/dist/components/TariffsTable/TariffsTableHorizontal.js.map +0 -1
- package/dist/components/TariffsTable/TariffsTableRenderCell.d.ts +0 -12
- package/dist/components/TariffsTable/TariffsTableRenderCell.js +0 -41
- package/dist/components/TariffsTable/TariffsTableRenderCell.js.map +0 -1
- package/dist/components/TariffsTable/TariffsTableTileCell.d.ts +0 -6
- package/dist/components/TariffsTable/TariffsTableTileCell.js +0 -17
- package/dist/components/TariffsTable/TariffsTableTileCell.js.map +0 -1
- package/dist/components/TariffsTable/TariffsTableVertical.d.ts +0 -2
- package/dist/components/TariffsTable/TariffsTableVertical.js +0 -7
- package/dist/components/TariffsTable/TariffsTableVertical.js.map +0 -1
- package/dist/components/TariffsTable/constants.d.ts +0 -4
- package/dist/components/TariffsTable/constants.js +0 -7
- package/dist/components/TariffsTable/constants.js.map +0 -1
- package/lib/components/TariffsTable/EmbeddableCellData.d.ts +0 -20
- package/lib/components/TariffsTable/EmbeddableCellData.js +0 -23
- package/lib/components/TariffsTable/EmbeddableCellData.js.map +0 -1
- package/lib/components/TariffsTable/TableTileHeader.d.ts +0 -2
- package/lib/components/TariffsTable/TableTileHeader.js +0 -6
- package/lib/components/TariffsTable/TableTileHeader.js.map +0 -1
- package/lib/components/TariffsTable/TariffsTableHorizontal.d.ts +0 -2
- package/lib/components/TariffsTable/TariffsTableHorizontal.js +0 -6
- package/lib/components/TariffsTable/TariffsTableHorizontal.js.map +0 -1
- package/lib/components/TariffsTable/TariffsTableRenderCell.d.ts +0 -12
- package/lib/components/TariffsTable/TariffsTableRenderCell.js +0 -39
- package/lib/components/TariffsTable/TariffsTableRenderCell.js.map +0 -1
- package/lib/components/TariffsTable/TariffsTableTileCell.d.ts +0 -6
- package/lib/components/TariffsTable/TariffsTableTileCell.js +0 -15
- package/lib/components/TariffsTable/TariffsTableTileCell.js.map +0 -1
- package/lib/components/TariffsTable/TariffsTableVertical.d.ts +0 -2
- package/lib/components/TariffsTable/TariffsTableVertical.js +0 -5
- package/lib/components/TariffsTable/TariffsTableVertical.js.map +0 -1
- package/lib/components/TariffsTable/constants.d.ts +0 -4
- package/lib/components/TariffsTable/constants.js +0 -5
- package/lib/components/TariffsTable/constants.js.map +0 -1
- package/mobile/bundle/components/TariffsTable/EmbeddableCellData.d.ts +0 -20
- package/mobile/bundle/components/TariffsTable/TableTileHeader.d.ts +0 -2
- package/mobile/bundle/components/TariffsTable/TariffsTableHorizontal.d.ts +0 -2
- package/mobile/bundle/components/TariffsTable/TariffsTableRenderCell.d.ts +0 -12
- package/mobile/bundle/components/TariffsTable/TariffsTableTileCell.d.ts +0 -6
- package/mobile/bundle/components/TariffsTable/TariffsTableVertical.d.ts +0 -2
- package/mobile/bundle/components/TariffsTable/constants.d.ts +0 -4
- package/mobile/dist/components/TariffsTable/EmbeddableCellData.d.ts +0 -20
- package/mobile/dist/components/TariffsTable/EmbeddableCellData.js +0 -25
- package/mobile/dist/components/TariffsTable/EmbeddableCellData.js.map +0 -1
- package/mobile/dist/components/TariffsTable/TableTileHeader.d.ts +0 -2
- package/mobile/dist/components/TariffsTable/TableTileHeader.js +0 -8
- package/mobile/dist/components/TariffsTable/TableTileHeader.js.map +0 -1
- package/mobile/dist/components/TariffsTable/TariffsTableHorizontal.d.ts +0 -2
- package/mobile/dist/components/TariffsTable/TariffsTableHorizontal.js +0 -8
- package/mobile/dist/components/TariffsTable/TariffsTableHorizontal.js.map +0 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRenderCell.d.ts +0 -12
- package/mobile/dist/components/TariffsTable/TariffsTableRenderCell.js +0 -41
- package/mobile/dist/components/TariffsTable/TariffsTableRenderCell.js.map +0 -1
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.d.ts +0 -6
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js +0 -17
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js.map +0 -1
- package/mobile/dist/components/TariffsTable/TariffsTableVertical.d.ts +0 -2
- package/mobile/dist/components/TariffsTable/TariffsTableVertical.js +0 -7
- package/mobile/dist/components/TariffsTable/TariffsTableVertical.js.map +0 -1
- package/mobile/dist/components/TariffsTable/constants.d.ts +0 -4
- package/mobile/dist/components/TariffsTable/constants.js +0 -7
- package/mobile/dist/components/TariffsTable/constants.js.map +0 -1
- package/mobile/lib/components/TariffsTable/EmbeddableCellData.d.ts +0 -20
- package/mobile/lib/components/TariffsTable/EmbeddableCellData.js +0 -23
- package/mobile/lib/components/TariffsTable/EmbeddableCellData.js.map +0 -1
- package/mobile/lib/components/TariffsTable/TableTileHeader.d.ts +0 -2
- package/mobile/lib/components/TariffsTable/TableTileHeader.js +0 -6
- package/mobile/lib/components/TariffsTable/TableTileHeader.js.map +0 -1
- package/mobile/lib/components/TariffsTable/TariffsTableHorizontal.d.ts +0 -2
- package/mobile/lib/components/TariffsTable/TariffsTableHorizontal.js +0 -6
- package/mobile/lib/components/TariffsTable/TariffsTableHorizontal.js.map +0 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRenderCell.d.ts +0 -12
- package/mobile/lib/components/TariffsTable/TariffsTableRenderCell.js +0 -39
- package/mobile/lib/components/TariffsTable/TariffsTableRenderCell.js.map +0 -1
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.d.ts +0 -6
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js +0 -15
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js.map +0 -1
- package/mobile/lib/components/TariffsTable/TariffsTableVertical.d.ts +0 -2
- package/mobile/lib/components/TariffsTable/TariffsTableVertical.js +0 -5
- package/mobile/lib/components/TariffsTable/TariffsTableVertical.js.map +0 -1
- package/mobile/lib/components/TariffsTable/constants.d.ts +0 -4
- package/mobile/lib/components/TariffsTable/constants.js +0 -5
- package/mobile/lib/components/TariffsTable/constants.js.map +0 -1
- package/mobile/src/components/TariffsTable/EmbeddableCellData.tsx +0 -79
- package/mobile/src/components/TariffsTable/TableTileHeader.tsx +0 -15
- package/mobile/src/components/TariffsTable/TariffsTableHorizontal.tsx +0 -14
- package/mobile/src/components/TariffsTable/TariffsTableRenderCell.tsx +0 -83
- package/mobile/src/components/TariffsTable/TariffsTableTileCell.tsx +0 -33
- package/mobile/src/components/TariffsTable/TariffsTableVertical.tsx +0 -13
- package/mobile/src/components/TariffsTable/constants.ts +0 -4
- package/src/components/TariffsTable/EmbeddableCellData.tsx +0 -79
- package/src/components/TariffsTable/TableTileHeader.tsx +0 -15
- package/src/components/TariffsTable/TariffsTableHorizontal.tsx +0 -14
- package/src/components/TariffsTable/TariffsTableRenderCell.tsx +0 -83
- package/src/components/TariffsTable/TariffsTableTileCell.tsx +0 -33
- package/src/components/TariffsTable/TariffsTableVertical.tsx +0 -13
- package/src/components/TariffsTable/constants.ts +0 -4
|
@@ -3,15 +3,14 @@ import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
3
3
|
import { UniBlock } from '../../UniBlock/UniBlock.js';
|
|
4
4
|
import { Text } from '../Text/Text.js';
|
|
5
5
|
import { InnerTableBody } from './InnerTableBody.js';
|
|
6
|
-
import { TableInnerButton } from './InnerTableButton.js';
|
|
7
6
|
import { InnerTableHeader } from './InnerTableHeader.js';
|
|
8
7
|
const EMPTY_DATA = 'Данных нет';
|
|
9
|
-
export const InnerTable = UniBlock(({ tableSource
|
|
8
|
+
export const InnerTable = UniBlock(({ tableSource }) => {
|
|
10
9
|
const tableData = tableSource?.tableData;
|
|
11
10
|
const [activeTabIndex, setActiveTabIndex] = useState(0);
|
|
12
11
|
const handleActiveTabIndex = useCallback((_) => setActiveTabIndex(_), []);
|
|
13
12
|
const items = tableData?.[activeTabIndex]?.items ?? [];
|
|
14
13
|
const currencies = tableData?.map((item) => item.currency ?? '');
|
|
15
|
-
return tableData ? (_jsxs("div", { className: "bg-white z-10", children: [_jsx(InnerTableHeader, { currencies: currencies, activeTabIndex: activeTabIndex, setActiveTabIndex: handleActiveTabIndex
|
|
14
|
+
return tableData ? (_jsxs("div", { className: "bg-white z-10", children: [_jsx(InnerTableHeader, { currencies: currencies, activeTabIndex: activeTabIndex, setActiveTabIndex: handleActiveTabIndex }), _jsx(InnerTableBody, { activeTabIndex: activeTabIndex, items: items })] })) : (_jsx("div", { className: "space-y-m text-center", children: _jsx(Text, { size: "text-h6", children: EMPTY_DATA }) }));
|
|
16
15
|
});
|
|
17
16
|
//# sourceMappingURL=InnerTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InnerTable.js","sourceRoot":"","sources":["../../../src/ui-kit/InnerTable/InnerTable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAGpE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEnD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"InnerTable.js","sourceRoot":"","sources":["../../../src/ui-kit/InnerTable/InnerTable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAGpE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEnD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAOtD,MAAM,UAAU,GAAG,YAAY,CAAC;AAEhC,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAkB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE;IACtE,MAAM,SAAS,GAAG,WAAW,EAAE,SAAS,CAAC;IACzC,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACxD,MAAM,oBAAoB,GAAG,WAAW,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAClF,MAAM,KAAK,GAAG,SAAS,EAAE,CAAC,cAAc,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC;IACvD,MAAM,UAAU,GAAG,SAAS,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;IAEjE,OAAO,SAAS,CAAC,CAAC,CAAC,CACjB,eAAK,SAAS,EAAC,eAAe,aAC5B,KAAC,gBAAgB,IACf,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,oBAAoB,GACvC,EACF,KAAC,cAAc,IAAC,cAAc,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,GAAI,IAC5D,CACP,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,uBAAuB,YACpC,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,YAAE,UAAU,GAAQ,GACpC,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -2,10 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { Text } from '../../ui-kit/Text/Text.js';
|
|
4
4
|
import { InnerTableBodyItem } from './InnerTableBodyItem.js';
|
|
5
|
-
export const InnerTableBody = JSX(({ activeTabIndex, items }) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}) }));
|
|
10
|
-
});
|
|
5
|
+
export const InnerTableBody = JSX(({ activeTabIndex, items }) => (_jsx("div", { children: items.map((_, tableIdx) => {
|
|
6
|
+
const key = `activeTabIdx:${activeTabIndex}-tableIdx:${tableIdx}`;
|
|
7
|
+
return (_jsxs("div", { className: "w-full @container", children: [_jsx("div", { className: "flex py-m px-m bg-white @4xl:bg-gray relative", children: _jsx(Text, { size: "text-xl", align: "text-left", children: _.title }) }), _jsx("div", { className: "w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out", children: _jsx("div", { className: "relative", children: _jsx(InnerTableBodyItem, { rows: _.rowsData }) }) })] }, key));
|
|
8
|
+
}) })));
|
|
11
9
|
//# sourceMappingURL=InnerTableBody.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InnerTableBody.js","sourceRoot":"","sources":["../../../src/ui-kit/InnerTable/InnerTableBody.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAQ1D,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAsB,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"InnerTableBody.js","sourceRoot":"","sources":["../../../src/ui-kit/InnerTable/InnerTableBody.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAQ1D,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAsB,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACpF,wBACG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE;QACzB,MAAM,GAAG,GAAG,gBAAgB,cAAc,aAAa,QAAQ,EAAE,CAAC;QAElE,OAAO,CACL,eAAe,SAAS,EAAC,mBAAmB,aAC1C,cAAK,SAAS,EAAC,+CAA+C,YAC5D,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,WAAW,YACnC,CAAC,CAAC,KAAK,GACH,GACH,EACN,cAAK,SAAS,EAAC,4EAA4E,YACzF,cAAK,SAAS,EAAC,UAAU,YACvB,KAAC,kBAAkB,IAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,GAAI,GACpC,GACF,KAVE,GAAG,CAWP,CACP,CAAC;IACJ,CAAC,CAAC,GACE,CACP,CAAC,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { type TariffsTableCellIndexProps } from '../../components/TariffsTable/TariffsTableContent';
|
|
2
1
|
import { type ComponentType } from '../../model/ComponentType';
|
|
3
|
-
import type
|
|
2
|
+
import { type OnClickProps } from '../../model/onClick';
|
|
4
3
|
import { type TariffsTableInnerContent } from './InnerTableProps';
|
|
5
|
-
export interface InnerTableButtonProps extends
|
|
4
|
+
export interface InnerTableButtonProps extends TariffsTableInnerContent, ComponentType, OnClickProps {
|
|
6
5
|
isOpen?: boolean;
|
|
7
6
|
}
|
|
8
7
|
export declare const TableInnerButton: import("@redneckz/uni-jsx").UNIComponent<InnerTableButtonProps, any, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InnerTableButton.js","sourceRoot":"","sources":["../../../src/ui-kit/InnerTable/InnerTableButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"InnerTableButton.js","sourceRoot":"","sources":["../../../src/ui-kit/InnerTable/InnerTableButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAUlE,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CACjC,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CACvC,KAAC,iBAAiB,IAChB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,EACrC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAC,WAAW,EACnB,KAAK,QACL,OAAO,EAAE,OAAO,GAChB,CACH,CACF,CAAC"}
|
|
@@ -14,9 +14,7 @@ export declare type TableData = {
|
|
|
14
14
|
export declare type TableFetchData = {
|
|
15
15
|
tableData?: TableData[];
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export declare type TariffsTableInnerContent = {
|
|
18
18
|
/** @title Справочник */
|
|
19
19
|
tableSource?: JSONRefObject;
|
|
20
|
-
|
|
21
|
-
pdfUrl?: string;
|
|
22
|
-
}
|
|
20
|
+
};
|
|
@@ -8,7 +8,7 @@ export const renderInnerTableRow = (activeColumnIndex) => (rowData, rowIdx) => {
|
|
|
8
8
|
}
|
|
9
9
|
const [headerColumn, ...columns] = rowData;
|
|
10
10
|
const columnsStyle = style('flex duration-1000 text-center', rowIdx !== 0 ? 'font-normal' : 'font-light');
|
|
11
|
-
return (_jsxs("div", { className: "flex border-main-divider border-b border-solid h-full", children: [headerColumn?.data ? (_jsx("div", { className: "whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0", children: _jsx(Text, { size: "text-xl", font: "font-light", children: headerColumn.data }) })) : null, _jsx("div", { className: "flex flex-grow overflow-hidden", children: _jsx("div", { className: columnsStyle, style: {
|
|
11
|
+
return (_jsxs("div", { className: "flex border-main-divider border-b border-solid h-full", children: [headerColumn?.data ? (_jsx("div", { className: "whitespace-pre-wrap sm:whitespace-normal w-48 min-w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0", children: _jsx(Text, { size: "text-xl", font: "font-light", children: headerColumn.data }) })) : null, _jsx("div", { className: "flex flex-grow overflow-hidden", children: _jsx("div", { className: columnsStyle, style: {
|
|
12
12
|
transform: `translateX(-${getHorizontalShift(columns, activeColumnIndex)}px)`,
|
|
13
13
|
}, children: columns?.map((_, i) => (_jsxs("div", { className: "flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider", children: [_?.data ? _jsx(Text, { size: "text-xl", children: _.data }) : null, _?.cols ? renderCols(_.cols, activeColumnIndex) : null] }, `row${i}`))) }) })] }, String(rowIdx)));
|
|
14
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderInnerTableRow.js","sourceRoot":"","sources":["../../../src/ui-kit/InnerTable/renderInnerTableRow.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,MAAM,CAAC,MAAM,mBAAmB,GAC9B,CAAC,iBAAyB,EAAE,EAAE,CAAC,CAAC,OAAmB,EAAE,MAAc,EAAE,EAAE;IACrE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE;QACpB,OAAO,IAAI,CAAC;KACb;IACD,MAAM,CAAC,YAAY,EAAE,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC;IAC3C,MAAM,YAAY,GAAG,KAAK,CACxB,gCAAgC,EAChC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAC5C,CAAC;IAEF,OAAO,CACL,eAA0B,SAAS,EAAC,uDAAuD,aACxF,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,CACpB,cAAK,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"renderInnerTableRow.js","sourceRoot":"","sources":["../../../src/ui-kit/InnerTable/renderInnerTableRow.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,MAAM,CAAC,MAAM,mBAAmB,GAC9B,CAAC,iBAAyB,EAAE,EAAE,CAAC,CAAC,OAAmB,EAAE,MAAc,EAAE,EAAE;IACrE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE;QACpB,OAAO,IAAI,CAAC;KACb;IACD,MAAM,CAAC,YAAY,EAAE,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC;IAC3C,MAAM,YAAY,GAAG,KAAK,CACxB,gCAAgC,EAChC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAC5C,CAAC;IAEF,OAAO,CACL,eAA0B,SAAS,EAAC,uDAAuD,aACxF,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,CACpB,cAAK,SAAS,EAAC,gGAAgG,YAC7G,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,YAAY,YACnC,YAAY,CAAC,IAAI,GACb,GACH,CACP,CAAC,CAAC,CAAC,IAAI,EACR,cAAK,SAAS,EAAC,gCAAgC,YAC7C,cACE,SAAS,EAAE,YAAY,EACvB,KAAK,EAAE;wBACL,SAAS,EAAE,eAAe,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,CAAC,KAAK;qBAC9E,YAEA,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACtB,eAEE,SAAS,EAAC,wEAAwE,aAEjF,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,YAAE,CAAC,CAAC,IAAI,GAAQ,CAAC,CAAC,CAAC,IAAI,EACrD,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,IAAI,KAJlD,MAAM,CAAC,EAAE,CAKV,CACP,CAAC,GACE,GACF,KAzBE,MAAM,CAAC,MAAM,CAAC,CA0BlB,CACP,CAAC;AACJ,CAAC,CAAC;AAEJ,MAAM,UAAU,GAAG,CAAC,IAAc,EAAE,QAAgB,EAAE,EAAE,CACtD,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACjB,cAAK,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,qBAAqB,EAAE,QAAQ,KAAK,CAAC,EAAE,CAAC,YACrE,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACrB,cAAqB,SAAS,EAAC,YAAY,YACzC,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,YAAY,YACnC,IAAI,GACA,IAHC,MAAM,CAAC,CAAC,CAAC,CAIb,CACP,CAAC,GACE,CACP,CAAC,CAAC,CAAC,IAAI,CAAC"}
|
|
@@ -8,7 +8,6 @@ import { useLocation } from '../../hooks/useLocation';
|
|
|
8
8
|
import { type BlockVersion } from '../../model/BlockVersion';
|
|
9
9
|
import { type ComponentType } from '../../model/ComponentType';
|
|
10
10
|
import { type IconVersion } from '../../model/IconVersion';
|
|
11
|
-
import { ClientOnly } from '../../ui-kit/ClientOnly';
|
|
12
11
|
import { useDialog } from '../../ui-kit/DialogManager/useDialog';
|
|
13
12
|
import { LocationDialog } from '../../ui-kit/LocationDialog/LocationDialog';
|
|
14
13
|
import { SearchDialog } from '../../ui-kit/SearchDialog/SearchDialog';
|
|
@@ -39,16 +38,14 @@ export const HeaderSecondaryMenu = JSX<HeaderSecondaryMenuProps>(
|
|
|
39
38
|
role="navigation"
|
|
40
39
|
>
|
|
41
40
|
{currentLocation?.name && rest?.branches?.visible ? (
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/>
|
|
51
|
-
</ClientOnly>
|
|
41
|
+
<TopItem
|
|
42
|
+
className="whitespace-nowrap text-ellipsis overflow-hidden"
|
|
43
|
+
flat={true}
|
|
44
|
+
href="#"
|
|
45
|
+
text={currentLocation?.name}
|
|
46
|
+
data={getAspectsWithInclude(rest?.branches?.dataClick, currentLocation?.name ?? '')}
|
|
47
|
+
onClick={openLocationDialog}
|
|
48
|
+
/>
|
|
52
49
|
) : null}
|
|
53
50
|
{rest?.officesAtms?.href ? (
|
|
54
51
|
<TopItem className="whitespace-nowrap" flat={true} {...rest.officesAtms} />
|
|
@@ -2,8 +2,6 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import { type TableVersion } from '../../model/TableVersion';
|
|
3
3
|
|
|
4
4
|
export interface TableCarouselContainerProps {
|
|
5
|
-
activeIndex: number;
|
|
6
|
-
columnWidth: number;
|
|
7
5
|
version?: TableVersion;
|
|
8
6
|
}
|
|
9
7
|
|
|
@@ -13,14 +11,9 @@ const carouselContainerClassesMap: Record<TableVersion, string> = {
|
|
|
13
11
|
};
|
|
14
12
|
|
|
15
13
|
export const TableCarouselContainer = JSX<TableCarouselContainerProps>(
|
|
16
|
-
({ children,
|
|
17
|
-
<div className="flex flex-1
|
|
18
|
-
<div
|
|
19
|
-
className={carouselContainerClassesMap[version]}
|
|
20
|
-
style={{ transform: `translateX(-${activeIndex * columnWidth}px)` }}
|
|
21
|
-
>
|
|
22
|
-
{children}
|
|
23
|
-
</div>
|
|
14
|
+
({ children, version = 'comparison' }) => (
|
|
15
|
+
<div className="flex flex-1">
|
|
16
|
+
<div className={carouselContainerClassesMap[version]}>{children}</div>
|
|
24
17
|
</div>
|
|
25
18
|
),
|
|
26
19
|
);
|
|
@@ -29,67 +29,34 @@
|
|
|
29
29
|
"data": [
|
|
30
30
|
[
|
|
31
31
|
{
|
|
32
|
-
"tableCellType": "LabelDescription",
|
|
33
32
|
"label": "Ячейка 1-1",
|
|
34
33
|
"description": "Описание для ячейки 2-1"
|
|
35
34
|
},
|
|
36
35
|
{
|
|
37
|
-
"tableCellType": "RichText",
|
|
38
36
|
"isDotted": true,
|
|
39
|
-
"listItemSize": "M",
|
|
40
37
|
"__html": "<ul><li>Элемент списка 1</li><li>Элемент списка 2</li><li>Элемент списка 3</li></ul>"
|
|
41
38
|
},
|
|
42
39
|
{
|
|
43
40
|
"label": "Ячейка 1-2",
|
|
44
|
-
"tableCellType": "LabelDescription",
|
|
45
41
|
"description": "Описание"
|
|
46
42
|
},
|
|
47
43
|
{
|
|
48
|
-
"tableCellType": "RichText",
|
|
49
44
|
"isDotted": false,
|
|
50
|
-
"listItemSize": "M",
|
|
51
45
|
"__html": "<ul><li>Элемент списка 1</li><li>Элемент списка 2</li><li>Элемент списка 3</li></ul>"
|
|
52
46
|
}
|
|
53
47
|
],
|
|
54
48
|
[
|
|
55
49
|
{
|
|
56
|
-
"tableCellType": "LabelDescription",
|
|
57
50
|
"label": "Ячейка 2-1"
|
|
58
51
|
},
|
|
59
52
|
{
|
|
60
|
-
"tableCellType": "RichText",
|
|
61
53
|
"isDotted": true,
|
|
62
|
-
"listItemSize": "M",
|
|
63
54
|
"__html": "<ul><li>Элемент списка 1</li><li>Элемент списка 2</li><li>Элемент списка 3</li></ul>"
|
|
64
55
|
}
|
|
65
56
|
],
|
|
66
57
|
[
|
|
67
58
|
{
|
|
68
|
-
"label": "Ячейка 3-1"
|
|
69
|
-
"tableCellType": "LabelDescription"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"tableCellType": "Button",
|
|
73
|
-
"buttons": [
|
|
74
|
-
{
|
|
75
|
-
"icon": {
|
|
76
|
-
"icon": "AppleIcon"
|
|
77
|
-
},
|
|
78
|
-
"rounded": true,
|
|
79
|
-
"version": "secondary",
|
|
80
|
-
"href": "/",
|
|
81
|
-
"target": "_blank"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"icon": {
|
|
85
|
-
"icon": "PlayMarketIcon"
|
|
86
|
-
},
|
|
87
|
-
"rounded": true,
|
|
88
|
-
"version": "secondary",
|
|
89
|
-
"href": "/",
|
|
90
|
-
"target": "_blank"
|
|
91
|
-
}
|
|
92
|
-
]
|
|
59
|
+
"label": "Ячейка 3-1"
|
|
93
60
|
}
|
|
94
61
|
]
|
|
95
62
|
]
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
1
|
import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
|
|
3
|
-
import { useCarouselControls } from '../../hooks/useCarouselControls';
|
|
4
2
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
5
3
|
import { DefaultFoldButton } from '../../ui-kit/Foldable/DefaultFoldButton';
|
|
6
4
|
import { Foldable } from '../../ui-kit/Foldable/Foldable';
|
|
7
5
|
import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
|
|
6
|
+
import { UniBlock } from '../../UniBlock/UniBlock';
|
|
8
7
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
9
8
|
import { style } from '../../utils/style';
|
|
10
9
|
import { Headline } from '../Headline/Headline';
|
|
11
|
-
import { COLS_LENGTH_FOR_SCROLL } from './constants';
|
|
12
10
|
import { type TariffsTableContent } from './TariffsTableContent';
|
|
13
11
|
import { TariffsTableRow } from './TariffsTableRow';
|
|
14
12
|
import { TariffsTableWrapper } from './TariffsTableWrapper';
|
|
15
13
|
|
|
16
14
|
export interface TariffsTableProps extends TariffsTableContent, UniBlockProps {}
|
|
17
15
|
|
|
18
|
-
export const TariffsTable =
|
|
16
|
+
export const TariffsTable = UniBlock<TariffsTableProps>(
|
|
19
17
|
({
|
|
20
18
|
className = '',
|
|
21
19
|
title,
|
|
@@ -30,13 +28,8 @@ export const TariffsTable = JSX<TariffsTableProps>(
|
|
|
30
28
|
header,
|
|
31
29
|
data: colData.map((col) => col?.[i] || []),
|
|
32
30
|
}));
|
|
33
|
-
const itemCount = colData.length;
|
|
34
|
-
const [activeIndex, controls] = useCarouselControls({
|
|
35
|
-
itemCount: itemCount,
|
|
36
|
-
visibleItemCount: COLS_LENGTH_FOR_SCROLL,
|
|
37
|
-
});
|
|
38
31
|
const rows = (rowData || []).map((row, i) => (
|
|
39
|
-
<TariffsTableRow key={String(i)} row={row}
|
|
32
|
+
<TariffsTableRow key={String(i)} row={row} {...rest} />
|
|
40
33
|
));
|
|
41
34
|
const [visibleRows, hiddenRows] =
|
|
42
35
|
hiddenRowsNum > 0 ? [rows.slice(0, -hiddenRowsNum), rows.slice(-hiddenRowsNum)] : [rows, []];
|
|
@@ -45,7 +38,7 @@ export const TariffsTable = JSX<TariffsTableProps>(
|
|
|
45
38
|
|
|
46
39
|
return (
|
|
47
40
|
<BlockWrapper
|
|
48
|
-
className={style('relative space-y-
|
|
41
|
+
className={style('relative space-y-xl', className)}
|
|
49
42
|
defaultPadding="p-6xl"
|
|
50
43
|
{...rest}
|
|
51
44
|
>
|
|
@@ -59,14 +52,14 @@ export const TariffsTable = JSX<TariffsTableProps>(
|
|
|
59
52
|
<div className="space-y-m overflow-hidden">
|
|
60
53
|
{hiddenRowsNum > 0 ? (
|
|
61
54
|
<Foldable>
|
|
62
|
-
<TariffsTableWrapper
|
|
55
|
+
<TariffsTableWrapper>
|
|
63
56
|
{visibleRows}
|
|
64
57
|
<FoldableSection isUnfolded={isUnfolded}>{hiddenRows}</FoldableSection>
|
|
65
58
|
</TariffsTableWrapper>
|
|
66
59
|
<DefaultFoldButton className="text-h4" isUnfolded={isUnfolded} onClick={toggle} />
|
|
67
60
|
</Foldable>
|
|
68
61
|
) : (
|
|
69
|
-
<TariffsTableWrapper
|
|
62
|
+
<TariffsTableWrapper>{rows}</TariffsTableWrapper>
|
|
70
63
|
)}
|
|
71
64
|
</div>
|
|
72
65
|
</BlockWrapper>
|
|
@@ -1,48 +1,50 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import type { JSONRefObject } from '../../data/JSONRefObject';
|
|
3
|
+
import { type OnCloseProps } from '../../model/onClose';
|
|
4
|
+
import { TableInnerButton } from '../../ui-kit/InnerTable/InnerTableButton';
|
|
5
|
+
import {
|
|
6
|
+
type TableFetchData,
|
|
7
|
+
type TariffsTableInnerContent,
|
|
8
|
+
} from '../../ui-kit/InnerTable/InnerTableProps';
|
|
3
9
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
10
|
+
import { renderCell } from './renderCell';
|
|
4
11
|
import { type CellDef } from './TariffsTableContent';
|
|
5
|
-
import { RenderCellInner } from './TariffsTableRenderCell';
|
|
6
12
|
|
|
7
13
|
export interface TariffTableContentProps {
|
|
8
|
-
|
|
9
|
-
setOpenTableInnerIdx: (props?: number) => void;
|
|
10
|
-
setTableInner: (props?: TariffsTableInnerContent) => void;
|
|
14
|
+
onSetTable: (props?: TariffsTableInnerContent) => void;
|
|
11
15
|
tableInner?: TariffsTableInnerContent;
|
|
12
16
|
}
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
type CellDefProps = CellDef & { tableSource?: JSONRefObject & TableFetchData };
|
|
19
|
+
|
|
20
|
+
export interface TariffsTableCellProps
|
|
21
|
+
extends TariffTableContentProps,
|
|
22
|
+
UniBlockProps,
|
|
23
|
+
OnCloseProps {
|
|
24
|
+
cells: CellDefProps[];
|
|
18
25
|
}
|
|
19
26
|
|
|
20
|
-
export const TariffsTableCell = JSX<TariffsTableCellProps>(
|
|
21
|
-
(
|
|
22
|
-
|
|
23
|
-
rowIdx,
|
|
24
|
-
cellIdx,
|
|
25
|
-
setTableInner,
|
|
26
|
-
tableInner,
|
|
27
|
-
openTableInnerIdx,
|
|
28
|
-
setOpenTableInnerIdx,
|
|
29
|
-
}) => (
|
|
30
|
-
<div className="w-80 flex-grow flex flex-col gap-m @4xl:gap-lg" role="cell">
|
|
27
|
+
export const TariffsTableCell = JSX<TariffsTableCellProps>(({ cells, tableInner, onSetTable }) => {
|
|
28
|
+
return (
|
|
29
|
+
<div className="w-80 flex-grow flex flex-col gap-lg" role="cell">
|
|
31
30
|
{cells?.length
|
|
32
|
-
? cells.map((_, i) =>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
31
|
+
? cells.map((_, i) => {
|
|
32
|
+
if (_?.tableSource?.tableData) {
|
|
33
|
+
return (
|
|
34
|
+
<TableInnerButton
|
|
35
|
+
key={String(i)}
|
|
36
|
+
className="w-fit"
|
|
37
|
+
isOpen={Boolean(tableInner)}
|
|
38
|
+
onClick={() => {
|
|
39
|
+
onSetTable(tableInner ? undefined : { tableSource: _.tableSource });
|
|
40
|
+
}}
|
|
41
|
+
/>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return renderCell(_, i);
|
|
46
|
+
})
|
|
45
47
|
: null}
|
|
46
48
|
</div>
|
|
47
|
-
)
|
|
48
|
-
);
|
|
49
|
+
);
|
|
50
|
+
});
|
|
@@ -4,31 +4,7 @@ import { type ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
|
4
4
|
import { type TariffsTableInnerContent } from '../../ui-kit/InnerTable/InnerTableProps';
|
|
5
5
|
import { type ButtonsSectionContent } from '../../ui-kit/LinkButton/ButtonsSectionContent';
|
|
6
6
|
import { type RichTextProps } from '../../ui-kit/RichText/RichTextProps';
|
|
7
|
-
import { type UniBlockContent
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export interface TariffsTableTile {
|
|
13
|
-
header: TariffsTableRowHeader;
|
|
14
|
-
data: CellDef[];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
export interface TariffsTableProps extends UniBlockProps {
|
|
21
|
-
tiles?: TariffsTableTile[];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* @hidden
|
|
26
|
-
*/
|
|
27
|
-
export interface TariffsTableCellIndexProps {
|
|
28
|
-
rowIdx: number;
|
|
29
|
-
cellIdx: number;
|
|
30
|
-
fieldIdx: number;
|
|
31
|
-
}
|
|
7
|
+
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
32
8
|
|
|
33
9
|
/**
|
|
34
10
|
* @hidden
|
|
@@ -43,68 +19,15 @@ export type Data = {
|
|
|
43
19
|
*/
|
|
44
20
|
export type TariffsTableRowHeader = TitleProps & IconProps;
|
|
45
21
|
|
|
46
|
-
/**
|
|
47
|
-
* @title Изображение
|
|
48
|
-
*/
|
|
49
|
-
export type ImageCellDef = ImageContent & {
|
|
50
|
-
/** @default Img */
|
|
51
|
-
tableCellType: 'Img';
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @title Кнопки
|
|
56
|
-
*/
|
|
57
|
-
export type ButtonsCellDef = ButtonsSectionContent & {
|
|
58
|
-
/** @default Buttons */
|
|
59
|
-
tableCellType: 'Buttons';
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* @title Заголовок и описание
|
|
64
|
-
*/
|
|
65
|
-
export type LabelDescriptionCell = LabelProps & DescriptionProps;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* @title Заголовок и описание
|
|
69
|
-
*/
|
|
70
|
-
export type LabelDescriptionCellDef = LabelDescriptionCell & {
|
|
71
|
-
/** @default LabelDescription */
|
|
72
|
-
tableCellType: 'LabelDescription';
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @title Список
|
|
77
|
-
*/
|
|
78
|
-
export type RichTextDef = RichTextProps & {
|
|
79
|
-
/** @default RichText */
|
|
80
|
-
tableCellType: 'RichText';
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* @title Таблица
|
|
85
|
-
*/
|
|
86
|
-
export type InnerTableBlockDef = TariffsTableInnerContent & {
|
|
87
|
-
/** @default Table */
|
|
88
|
-
tableCellType: 'Table';
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
/** @title Не выбрано * */
|
|
92
|
-
export type EmptyCellType = {
|
|
93
|
-
/** @default "" */
|
|
94
|
-
tableCellType: '';
|
|
95
|
-
};
|
|
96
|
-
|
|
97
22
|
/**
|
|
98
23
|
* @title Содержимое ячейки
|
|
99
|
-
* @default { "tableCellType": "" }
|
|
100
24
|
*/
|
|
101
|
-
export type CellDef =
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
| InnerTableBlockDef;
|
|
25
|
+
export type CellDef = LabelProps &
|
|
26
|
+
DescriptionProps &
|
|
27
|
+
RichTextProps &
|
|
28
|
+
ImageContent &
|
|
29
|
+
TariffsTableInnerContent &
|
|
30
|
+
ButtonsSectionContent;
|
|
108
31
|
|
|
109
32
|
/**
|
|
110
33
|
* @title Ячейки
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
-
import { Img } from '../../ui-kit/Img/Img';
|
|
4
3
|
import { type TariffsTableInnerContent } from '../../ui-kit/InnerTable/InnerTableProps';
|
|
5
|
-
import { Text } from '../../ui-kit/Text/Text';
|
|
6
4
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
7
|
-
import {
|
|
8
|
-
import { COLUMN_WIDTH, firstCellStyle } from './constants';
|
|
5
|
+
import { renderHeader } from './renderHeader';
|
|
9
6
|
import { TableCarouselContainer } from './TableCarouselContainer';
|
|
10
7
|
import { TariffsTableCell } from './TariffsTableCell';
|
|
11
8
|
import { type Data } from './TariffsTableContent';
|
|
@@ -13,63 +10,26 @@ import { TariffsTableRowContainer } from './TariffsTableRowContainer';
|
|
|
13
10
|
|
|
14
11
|
export interface TariffsTableRowProps extends UniBlockProps {
|
|
15
12
|
row: Data;
|
|
16
|
-
activeIndex: number;
|
|
17
|
-
rowIdx: number;
|
|
18
13
|
}
|
|
19
14
|
|
|
20
15
|
export const TariffsTableRow = JSX<TariffsTableRowProps>(
|
|
21
|
-
({ row: { header, data
|
|
16
|
+
({ row: { header, data = [] }, ...rest }) => {
|
|
22
17
|
const [tableInner, setTableInner] = useState<TariffsTableInnerContent | undefined>(undefined);
|
|
23
|
-
const handleSetTableInner = useCallback(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
);
|
|
27
|
-
const [openTableInnerIdx, setOpenTableInnerIdx] = useState<number | undefined>(undefined);
|
|
28
|
-
const handleOpenTableInnerIdx = useCallback(
|
|
29
|
-
(_: number | undefined) => setOpenTableInnerIdx(_),
|
|
30
|
-
[],
|
|
31
|
-
);
|
|
32
|
-
const onHideContentClick = () => setTableInner(undefined);
|
|
18
|
+
const handleSetTableInner = useCallback((_?: TariffsTableInnerContent) => {
|
|
19
|
+
setTableInner(_);
|
|
20
|
+
}, []);
|
|
33
21
|
|
|
34
22
|
return (
|
|
35
|
-
<TariffsTableRowContainer
|
|
36
|
-
|
|
37
|
-
tableInner={tableInner}
|
|
38
|
-
{...rest}
|
|
39
|
-
>
|
|
40
|
-
<div className={style('text-s', firstCellStyle)}>
|
|
41
|
-
<div className="flex gap-m items-center" role="cell">
|
|
42
|
-
{header?.icon ? (
|
|
43
|
-
<Img
|
|
44
|
-
className="hidden @4xl:block max-w-6 shrink-0"
|
|
45
|
-
image={header.icon}
|
|
46
|
-
width="24"
|
|
47
|
-
height="24"
|
|
48
|
-
/>
|
|
49
|
-
) : null}
|
|
50
|
-
{header?.title ? (
|
|
51
|
-
<Text size="text-m" font="font-light" color="text-primary-text">
|
|
52
|
-
{header?.title}
|
|
53
|
-
</Text>
|
|
54
|
-
) : null}
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
23
|
+
<TariffsTableRowContainer tableInner={tableInner} {...rest}>
|
|
24
|
+
{renderHeader(header)}
|
|
57
25
|
{data?.length ? (
|
|
58
|
-
<TableCarouselContainer
|
|
59
|
-
activeIndex={activeIndex}
|
|
60
|
-
columnWidth={COLUMN_WIDTH}
|
|
61
|
-
version="tariff"
|
|
62
|
-
>
|
|
26
|
+
<TableCarouselContainer version="tariff">
|
|
63
27
|
{data.map((cells, i) => (
|
|
64
28
|
<TariffsTableCell
|
|
65
29
|
key={String(i)}
|
|
66
30
|
cells={cells}
|
|
67
|
-
|
|
68
|
-
cellIdx={i}
|
|
69
|
-
setTableInner={handleSetTableInner}
|
|
31
|
+
onSetTable={handleSetTableInner}
|
|
70
32
|
tableInner={tableInner}
|
|
71
|
-
openTableInnerIdx={openTableInnerIdx}
|
|
72
|
-
setOpenTableInnerIdx={handleOpenTableInnerIdx}
|
|
73
33
|
{...rest}
|
|
74
34
|
/>
|
|
75
35
|
))}
|
|
@@ -3,27 +3,21 @@ import { InnerTable } from '../../ui-kit/InnerTable/InnerTable';
|
|
|
3
3
|
import { type TariffsTableInnerContent } from '../../ui-kit/InnerTable/InnerTableProps';
|
|
4
4
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
5
5
|
import { style } from '../../utils/style';
|
|
6
|
-
import { dividerStyle } from './constants';
|
|
7
6
|
|
|
8
7
|
export interface TariffsTableRowContainerProps extends UniBlockProps {
|
|
9
8
|
tableInner?: TariffsTableInnerContent;
|
|
10
|
-
|
|
9
|
+
onClick?: (_?: TariffsTableInnerContent) => void;
|
|
11
10
|
}
|
|
12
11
|
|
|
12
|
+
export const DIVIDER_STYLE = 'border-main-divider lg:border-b w-full py-s lg:py-xl';
|
|
13
|
+
|
|
13
14
|
export const TariffsTableRowContainer = JSX<TariffsTableRowContainerProps>(
|
|
14
|
-
({ children, tableInner,
|
|
15
|
-
<div className=
|
|
16
|
-
<div
|
|
17
|
-
className={style(
|
|
18
|
-
dividerStyle,
|
|
19
|
-
'flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg',
|
|
20
|
-
)}
|
|
21
|
-
>
|
|
22
|
-
{children}
|
|
23
|
-
</div>
|
|
15
|
+
({ children, tableInner, onClick }) => (
|
|
16
|
+
<div className={style('self-start flex flex-col gap-xl', DIVIDER_STYLE)} role="row">
|
|
17
|
+
<div className={style('flex flex-col lg:flex-row gap-x-5xl gap-y-xs')}>{children}</div>
|
|
24
18
|
{tableInner ? (
|
|
25
19
|
<div className="origin-top animate-expansion">
|
|
26
|
-
<InnerTable {...tableInner} onClick={
|
|
20
|
+
<InnerTable {...tableInner} onClick={onClick} />
|
|
27
21
|
</div>
|
|
28
22
|
) : null}
|
|
29
23
|
</div>
|