@ikas/component-cli 0.133.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/create.d.ts +8 -3
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +8 -227
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +120 -31
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/proxy.d.ts.map +1 -1
- package/dist/commands/proxy.js +5 -1
- package/dist/commands/proxy.js.map +1 -1
- package/package.json +4 -5
- package/bin/create-ikas-component.js +0 -8
- package/templates/create/README.md +0 -50
- package/templates/create/claude-md +0 -275
- package/templates/create/cursorrules +0 -123
- package/templates/create/gitignore +0 -6
- package/templates/create/ikas.config.json +0 -95
- package/templates/create/mcp.json +0 -10
- package/templates/create/package.json +0 -22
- package/templates/create/src/components/ExampleComponent/index.tsx +0 -22
- package/templates/create/src/components/ExampleComponent/styles.css +0 -36
- package/templates/create/src/components/ExampleComponent/types.ts +0 -7
- package/templates/create/src/components/ExampleSection/index.tsx +0 -14
- package/templates/create/src/components/ExampleSection/styles.css +0 -29
- package/templates/create/src/components/ExampleSection/types.ts +0 -6
- package/templates/create/src/components/index.ts +0 -2
- package/templates/create/src/global-types.ts +0 -5
- package/templates/create/src/global.css +0 -29
- package/templates/create/src/ikas-component-utils.d.ts +0 -3
- package/templates/create/tsconfig.json +0 -30
- package/templates/create/vite.config.ts +0 -15
- package/templates/create-full/README.md +0 -78
- package/templates/create-full/claude-md +0 -752
- package/templates/create-full/cursorrules +0 -117
- package/templates/create-full/gitignore +0 -4
- package/templates/create-full/ikas.config.json +0 -5009
- package/templates/create-full/mcp.json +0 -10
- package/templates/create-full/package.json +0 -23
- package/templates/create-full/src/components/AccountAddresses/components/AddressCard/index.tsx +0 -55
- package/templates/create-full/src/components/AccountAddresses/components/AddressCard/styles.css +0 -46
- package/templates/create-full/src/components/AccountAddresses/components/AddressModal/index.tsx +0 -298
- package/templates/create-full/src/components/AccountAddresses/components/AddressModal/styles.css +0 -23
- package/templates/create-full/src/components/AccountAddresses/index.tsx +0 -127
- package/templates/create-full/src/components/AccountAddresses/styles.css +0 -41
- package/templates/create-full/src/components/AccountAddresses/types.ts +0 -15
- package/templates/create-full/src/components/AccountFavorites/index.tsx +0 -82
- package/templates/create-full/src/components/AccountFavorites/styles.css +0 -52
- package/templates/create-full/src/components/AccountFavorites/types.ts +0 -7
- package/templates/create-full/src/components/AccountInfo/components/AccountSidebar/index.tsx +0 -171
- package/templates/create-full/src/components/AccountInfo/components/AccountSidebar/styles.css +0 -144
- package/templates/create-full/src/components/AccountInfo/index.tsx +0 -91
- package/templates/create-full/src/components/AccountInfo/styles.css +0 -35
- package/templates/create-full/src/components/AccountInfo/types.ts +0 -9
- package/templates/create-full/src/components/AccountInfoContent/index.tsx +0 -134
- package/templates/create-full/src/components/AccountInfoContent/styles.css +0 -57
- package/templates/create-full/src/components/AccountInfoContent/types.ts +0 -8
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderHeader/index.tsx +0 -78
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderHeader/styles.css +0 -46
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderItemRow/index.tsx +0 -20
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderItemRow/styles.css +0 -16
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderLineItemDisplay/index.tsx +0 -112
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderLineItemDisplay/styles.css +0 -86
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderSidebar/index.tsx +0 -195
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderSidebar/styles.css +0 -93
- package/templates/create-full/src/components/AccountOrderDetail/components/PackageGroup/index.tsx +0 -156
- package/templates/create-full/src/components/AccountOrderDetail/components/PackageGroup/styles.css +0 -100
- package/templates/create-full/src/components/AccountOrderDetail/components/ReturnItemRow/index.tsx +0 -56
- package/templates/create-full/src/components/AccountOrderDetail/components/ReturnItemRow/styles.css +0 -57
- package/templates/create-full/src/components/AccountOrderDetail/components/ReturnView/index.tsx +0 -159
- package/templates/create-full/src/components/AccountOrderDetail/components/ReturnView/styles.css +0 -29
- package/templates/create-full/src/components/AccountOrderDetail/index.tsx +0 -244
- package/templates/create-full/src/components/AccountOrderDetail/styles.css +0 -125
- package/templates/create-full/src/components/AccountOrderDetail/types.ts +0 -32
- package/templates/create-full/src/components/AccountOrders/components/OrderCard/index.tsx +0 -122
- package/templates/create-full/src/components/AccountOrders/components/OrderCard/styles.css +0 -114
- package/templates/create-full/src/components/AccountOrders/index.tsx +0 -105
- package/templates/create-full/src/components/AccountOrders/styles.css +0 -36
- package/templates/create-full/src/components/AccountOrders/types.ts +0 -11
- package/templates/create-full/src/components/Announcement/index.tsx +0 -11
- package/templates/create-full/src/components/Announcement/styles.css +0 -4
- package/templates/create-full/src/components/Announcement/types.ts +0 -4
- package/templates/create-full/src/components/Announcements/index.tsx +0 -91
- package/templates/create-full/src/components/Announcements/styles.css +0 -46
- package/templates/create-full/src/components/Announcements/types.ts +0 -8
- package/templates/create-full/src/components/BlogHome/components/BlogCard/index.tsx +0 -89
- package/templates/create-full/src/components/BlogHome/components/BlogCard/styles.css +0 -121
- package/templates/create-full/src/components/BlogHome/index.tsx +0 -124
- package/templates/create-full/src/components/BlogHome/styles.css +0 -118
- package/templates/create-full/src/components/BlogHome/types.ts +0 -15
- package/templates/create-full/src/components/BlogPost/index.tsx +0 -128
- package/templates/create-full/src/components/BlogPost/styles.css +0 -120
- package/templates/create-full/src/components/BlogPost/types.ts +0 -12
- package/templates/create-full/src/components/CardProductName/index.tsx +0 -25
- package/templates/create-full/src/components/CardProductName/styles.css +0 -22
- package/templates/create-full/src/components/CardProductName/types.ts +0 -7
- package/templates/create-full/src/components/CardProductPrice/index.tsx +0 -30
- package/templates/create-full/src/components/CardProductPrice/styles.css +0 -13
- package/templates/create-full/src/components/CardProductPrice/types.ts +0 -6
- package/templates/create-full/src/components/CardProductVariants/index.tsx +0 -10
- package/templates/create-full/src/components/CardProductVariants/styles.css +0 -1
- package/templates/create-full/src/components/CardProductVariants/types.ts +0 -6
- package/templates/create-full/src/components/CartPage/components/CouponCode/index.tsx +0 -108
- package/templates/create-full/src/components/CartPage/components/CouponCode/styles.css +0 -68
- package/templates/create-full/src/components/CartPage/components/EmptyState/index.tsx +0 -31
- package/templates/create-full/src/components/CartPage/components/EmptyState/styles.css +0 -18
- package/templates/create-full/src/components/CartPage/components/OrderSummary/index.tsx +0 -106
- package/templates/create-full/src/components/CartPage/components/OrderSummary/styles.css +0 -70
- package/templates/create-full/src/components/CartPage/index.tsx +0 -107
- package/templates/create-full/src/components/CartPage/styles.css +0 -54
- package/templates/create-full/src/components/CartPage/types.ts +0 -16
- package/templates/create-full/src/components/CategoryImageItem/components/Card/index.tsx +0 -64
- package/templates/create-full/src/components/CategoryImageItem/components/Card/styles.css +0 -56
- package/templates/create-full/src/components/CategoryImageItem/index.tsx +0 -64
- package/templates/create-full/src/components/CategoryImageItem/styles.css +0 -10
- package/templates/create-full/src/components/CategoryImageItem/types.ts +0 -16
- package/templates/create-full/src/components/CategoryImages/index.tsx +0 -62
- package/templates/create-full/src/components/CategoryImages/styles.css +0 -38
- package/templates/create-full/src/components/CategoryImages/types.ts +0 -11
- package/templates/create-full/src/components/CategoryList/components/CategoryListControls/index.tsx +0 -129
- package/templates/create-full/src/components/CategoryList/components/CategoryListControls/styles.css +0 -99
- package/templates/create-full/src/components/CategoryList/components/FilterBoxValues/index.tsx +0 -42
- package/templates/create-full/src/components/CategoryList/components/FilterBoxValues/styles.css +0 -27
- package/templates/create-full/src/components/CategoryList/components/FilterCategoryList/index.tsx +0 -43
- package/templates/create-full/src/components/CategoryList/components/FilterCategoryList/styles.css +0 -20
- package/templates/create-full/src/components/CategoryList/components/FilterGroupValues/index.tsx +0 -114
- package/templates/create-full/src/components/CategoryList/components/FilterGroupValues/styles.css +0 -1
- package/templates/create-full/src/components/CategoryList/components/FilterListValues/index.tsx +0 -54
- package/templates/create-full/src/components/CategoryList/components/FilterListValues/styles.css +0 -22
- package/templates/create-full/src/components/CategoryList/components/FilterRangeListValues/index.tsx +0 -50
- package/templates/create-full/src/components/CategoryList/components/FilterRangeListValues/styles.css +0 -25
- package/templates/create-full/src/components/CategoryList/components/FilterRangeValues/index.tsx +0 -189
- package/templates/create-full/src/components/CategoryList/components/FilterRangeValues/styles.css +0 -89
- package/templates/create-full/src/components/CategoryList/components/FilterSidebar/index.tsx +0 -92
- package/templates/create-full/src/components/CategoryList/components/FilterSidebar/styles.css +0 -27
- package/templates/create-full/src/components/CategoryList/components/FilterSwatchValues/index.tsx +0 -63
- package/templates/create-full/src/components/CategoryList/components/FilterSwatchValues/styles.css +0 -48
- package/templates/create-full/src/components/CategoryList/components/MobileFilterModal/index.tsx +0 -146
- package/templates/create-full/src/components/CategoryList/components/MobileFilterModal/styles.css +0 -133
- package/templates/create-full/src/components/CategoryList/index.tsx +0 -333
- package/templates/create-full/src/components/CategoryList/styles.css +0 -110
- package/templates/create-full/src/components/CategoryList/types.ts +0 -30
- package/templates/create-full/src/components/CollapsibleContent/index.tsx +0 -23
- package/templates/create-full/src/components/CollapsibleContent/styles.css +0 -11
- package/templates/create-full/src/components/CollapsibleContent/types.ts +0 -6
- package/templates/create-full/src/components/CookieBar/index.tsx +0 -78
- package/templates/create-full/src/components/CookieBar/styles.css +0 -111
- package/templates/create-full/src/components/CookieBar/types.ts +0 -10
- package/templates/create-full/src/components/CustomerEmailVerification/index.tsx +0 -168
- package/templates/create-full/src/components/CustomerEmailVerification/styles.css +0 -118
- package/templates/create-full/src/components/CustomerEmailVerification/types.ts +0 -17
- package/templates/create-full/src/components/FeatureItem/index.tsx +0 -27
- package/templates/create-full/src/components/FeatureItem/styles.css +0 -19
- package/templates/create-full/src/components/FeatureItem/types.ts +0 -7
- package/templates/create-full/src/components/Features/index.tsx +0 -25
- package/templates/create-full/src/components/Features/styles.css +0 -39
- package/templates/create-full/src/components/Features/types.ts +0 -5
- package/templates/create-full/src/components/Footer/index.tsx +0 -154
- package/templates/create-full/src/components/Footer/styles.css +0 -175
- package/templates/create-full/src/components/Footer/types.ts +0 -15
- package/templates/create-full/src/components/ForgotPassword/components/ForgotPasswordForm/index.tsx +0 -129
- package/templates/create-full/src/components/ForgotPassword/components/ForgotPasswordForm/styles.css +0 -0
- package/templates/create-full/src/components/ForgotPassword/index.tsx +0 -30
- package/templates/create-full/src/components/ForgotPassword/styles.css +0 -85
- package/templates/create-full/src/components/ForgotPassword/types.ts +0 -13
- package/templates/create-full/src/components/Header/index.tsx +0 -46
- package/templates/create-full/src/components/Header/styles.css +0 -4
- package/templates/create-full/src/components/Header/types.ts +0 -4
- package/templates/create-full/src/components/HeroSlider/index.tsx +0 -110
- package/templates/create-full/src/components/HeroSlider/styles.css +0 -129
- package/templates/create-full/src/components/HeroSlider/types.ts +0 -9
- package/templates/create-full/src/components/HeroSliderItem/index.tsx +0 -231
- package/templates/create-full/src/components/HeroSliderItem/styles.css +0 -152
- package/templates/create-full/src/components/HeroSliderItem/types.ts +0 -34
- package/templates/create-full/src/components/Login/components/LoginForm/index.tsx +0 -181
- package/templates/create-full/src/components/Login/components/LoginForm/styles.css +0 -0
- package/templates/create-full/src/components/Login/index.tsx +0 -37
- package/templates/create-full/src/components/Login/styles.css +0 -129
- package/templates/create-full/src/components/Login/types.ts +0 -18
- package/templates/create-full/src/components/Navbar/components/CartSidebar/index.tsx +0 -203
- package/templates/create-full/src/components/Navbar/components/CartSidebar/styles.css +0 -175
- package/templates/create-full/src/components/Navbar/components/MobileMenu/index.tsx +0 -198
- package/templates/create-full/src/components/Navbar/components/MobileMenu/styles.css +0 -122
- package/templates/create-full/src/components/Navbar/components/NavItem/index.tsx +0 -65
- package/templates/create-full/src/components/Navbar/components/SearchModal/index.tsx +0 -339
- package/templates/create-full/src/components/Navbar/components/SearchModal/styles.css +0 -191
- package/templates/create-full/src/components/Navbar/index.tsx +0 -254
- package/templates/create-full/src/components/Navbar/styles.css +0 -254
- package/templates/create-full/src/components/Navbar/types.ts +0 -42
- package/templates/create-full/src/components/NotFound/index.tsx +0 -39
- package/templates/create-full/src/components/NotFound/styles.css +0 -46
- package/templates/create-full/src/components/NotFound/types.ts +0 -8
- package/templates/create-full/src/components/ProductDetail/components/ProductGallery/index.tsx +0 -316
- package/templates/create-full/src/components/ProductDetail/components/ProductGallery/styles.css +0 -213
- package/templates/create-full/src/components/ProductDetail/index.tsx +0 -92
- package/templates/create-full/src/components/ProductDetail/styles.css +0 -58
- package/templates/create-full/src/components/ProductDetail/types.ts +0 -12
- package/templates/create-full/src/components/ProductDetailAddToCart/components/PayWithIkas/index.tsx +0 -34
- package/templates/create-full/src/components/ProductDetailAddToCart/components/PayWithIkas/styles.css +0 -4
- package/templates/create-full/src/components/ProductDetailAddToCart/index.tsx +0 -146
- package/templates/create-full/src/components/ProductDetailAddToCart/styles.css +0 -27
- package/templates/create-full/src/components/ProductDetailAddToCart/types.ts +0 -18
- package/templates/create-full/src/components/ProductDetailBundleFurniture/components/BundleFurnitureRow/index.tsx +0 -164
- package/templates/create-full/src/components/ProductDetailBundleFurniture/components/BundleFurnitureSection/index.tsx +0 -134
- package/templates/create-full/src/components/ProductDetailBundleFurniture/components/BundleFurnitureSection/styles.css +0 -188
- package/templates/create-full/src/components/ProductDetailBundleFurniture/index.tsx +0 -61
- package/templates/create-full/src/components/ProductDetailBundleFurniture/styles.css +0 -12
- package/templates/create-full/src/components/ProductDetailBundleFurniture/types.ts +0 -21
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleProductItem/index.tsx +0 -169
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleProductItem/styles.css +0 -141
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleSkeletonLoading/index.tsx +0 -35
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleSkeletonLoading/styles.css +0 -85
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureRow/index.tsx +0 -51
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureRow/styles.css +0 -30
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureView/index.tsx +0 -54
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureView/styles.css +0 -22
- package/templates/create-full/src/components/ProductDetailBundleProduct/index.tsx +0 -101
- package/templates/create-full/src/components/ProductDetailBundleProduct/styles.css +0 -20
- package/templates/create-full/src/components/ProductDetailBundleProduct/types.ts +0 -18
- package/templates/create-full/src/components/ProductDetailDescription/index.tsx +0 -56
- package/templates/create-full/src/components/ProductDetailDescription/styles.css +0 -21
- package/templates/create-full/src/components/ProductDetailDescription/types.ts +0 -13
- package/templates/create-full/src/components/ProductDetailFeatureItem/index.tsx +0 -28
- package/templates/create-full/src/components/ProductDetailFeatureItem/styles.css +0 -22
- package/templates/create-full/src/components/ProductDetailFeatureItem/types.ts +0 -7
- package/templates/create-full/src/components/ProductDetailFeatures/index.tsx +0 -40
- package/templates/create-full/src/components/ProductDetailFeatures/styles.css +0 -17
- package/templates/create-full/src/components/ProductDetailFeatures/types.ts +0 -10
- package/templates/create-full/src/components/ProductDetailNameFavorite/index.tsx +0 -66
- package/templates/create-full/src/components/ProductDetailNameFavorite/styles.css +0 -45
- package/templates/create-full/src/components/ProductDetailNameFavorite/types.ts +0 -11
- package/templates/create-full/src/components/ProductDetailOffer/components/OfferCard/index.tsx +0 -209
- package/templates/create-full/src/components/ProductDetailOffer/components/OfferCard/styles.css +0 -146
- package/templates/create-full/src/components/ProductDetailOffer/components/OfferSummary/index.tsx +0 -175
- package/templates/create-full/src/components/ProductDetailOffer/index.tsx +0 -199
- package/templates/create-full/src/components/ProductDetailOffer/styles.css +0 -211
- package/templates/create-full/src/components/ProductDetailOffer/types.ts +0 -24
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionCheckbox/index.tsx +0 -52
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionCheckbox/styles.css +0 -19
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceBox/index.tsx +0 -60
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceBox/styles.css +0 -38
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSelect/index.tsx +0 -102
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSelect/styles.css +0 -34
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSwatch/index.tsx +0 -121
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSwatch/styles.css +0 -87
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/index.tsx +0 -57
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionColorPicker/index.tsx +0 -54
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionColorPicker/styles.css +0 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionDatePicker/index.tsx +0 -124
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionDatePicker/styles.css +0 -1
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionFile/index.tsx +0 -217
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionFile/styles.css +0 -87
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionRenderer/index.tsx +0 -133
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionText/index.tsx +0 -60
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionText/styles.css +0 -1
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionTextarea/index.tsx +0 -74
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionTextarea/styles.css +0 -10
- package/templates/create-full/src/components/ProductDetailOptionSet/index.tsx +0 -99
- package/templates/create-full/src/components/ProductDetailOptionSet/styles.css +0 -30
- package/templates/create-full/src/components/ProductDetailOptionSet/types.ts +0 -21
- package/templates/create-full/src/components/ProductDetailPrices/index.tsx +0 -62
- package/templates/create-full/src/components/ProductDetailPrices/styles.css +0 -32
- package/templates/create-full/src/components/ProductDetailPrices/types.ts +0 -10
- package/templates/create-full/src/components/ProductDetailProductGroup/index.tsx +0 -74
- package/templates/create-full/src/components/ProductDetailProductGroup/styles.css +0 -33
- package/templates/create-full/src/components/ProductDetailProductGroup/types.ts +0 -10
- package/templates/create-full/src/components/ProductDetailReviews/index.tsx +0 -205
- package/templates/create-full/src/components/ProductDetailReviews/styles.css +0 -43
- package/templates/create-full/src/components/ProductDetailReviews/types.ts +0 -19
- package/templates/create-full/src/components/ProductDetailSku/index.tsx +0 -38
- package/templates/create-full/src/components/ProductDetailSku/styles.css +0 -16
- package/templates/create-full/src/components/ProductDetailSku/types.ts +0 -11
- package/templates/create-full/src/components/ProductDetailVariant/index.tsx +0 -38
- package/templates/create-full/src/components/ProductDetailVariant/styles.css +0 -14
- package/templates/create-full/src/components/ProductDetailVariant/types.ts +0 -12
- package/templates/create-full/src/components/ProductSlider/index.tsx +0 -151
- package/templates/create-full/src/components/ProductSlider/styles.css +0 -105
- package/templates/create-full/src/components/ProductSlider/types.ts +0 -17
- package/templates/create-full/src/components/RecoverPassword/components/RecoverPasswordForm/index.tsx +0 -133
- package/templates/create-full/src/components/RecoverPassword/components/RecoverPasswordForm/styles.css +0 -0
- package/templates/create-full/src/components/RecoverPassword/index.tsx +0 -30
- package/templates/create-full/src/components/RecoverPassword/styles.css +0 -93
- package/templates/create-full/src/components/RecoverPassword/types.ts +0 -13
- package/templates/create-full/src/components/Register/components/RegisterForm/index.tsx +0 -326
- package/templates/create-full/src/components/Register/components/RegisterForm/styles.css +0 -0
- package/templates/create-full/src/components/Register/index.tsx +0 -30
- package/templates/create-full/src/components/Register/styles.css +0 -152
- package/templates/create-full/src/components/Register/types.ts +0 -27
- package/templates/create-full/src/components/RichText/index.tsx +0 -25
- package/templates/create-full/src/components/RichText/styles.css +0 -51
- package/templates/create-full/src/components/RichText/types.ts +0 -5
- package/templates/create-full/src/components/SocialMediaIcon/index.tsx +0 -26
- package/templates/create-full/src/components/SocialMediaIcon/styles.css +0 -17
- package/templates/create-full/src/components/SocialMediaIcon/types.ts +0 -7
- package/templates/create-full/src/components/index.ts +0 -50
- package/templates/create-full/src/global-types.ts +0 -11
- package/templates/create-full/src/global.css +0 -598
- package/templates/create-full/src/hooks/useBundleProducts.ts +0 -75
- package/templates/create-full/src/hooks/useColumnPreference.ts +0 -26
- package/templates/create-full/src/hooks/useInfiniteScroll.ts +0 -49
- package/templates/create-full/src/hooks/usePageTracking.ts +0 -56
- package/templates/create-full/src/hooks/usePayWithIkas.ts +0 -114
- package/templates/create-full/src/hooks/useRedirectIfLoggedIn.ts +0 -35
- package/templates/create-full/src/hooks/useScrollLock.ts +0 -19
- package/templates/create-full/src/hooks/useToast.ts +0 -27
- package/templates/create-full/src/ikas-component-utils.d.ts +0 -3
- package/templates/create-full/src/sub-components/Badge/index.tsx +0 -208
- package/templates/create-full/src/sub-components/Badge/styles.css +0 -129
- package/templates/create-full/src/sub-components/Breadcrumb/index.tsx +0 -57
- package/templates/create-full/src/sub-components/Breadcrumb/styles.css +0 -49
- package/templates/create-full/src/sub-components/BundleMedia/index.tsx +0 -72
- package/templates/create-full/src/sub-components/BundleQuantityBox/index.tsx +0 -73
- package/templates/create-full/src/sub-components/BundleQuantityBox/styles.css +0 -43
- package/templates/create-full/src/sub-components/Button/index.tsx +0 -52
- package/templates/create-full/src/sub-components/Button/styles.css +0 -114
- package/templates/create-full/src/sub-components/CartItem/components/BundleProductItem/index.tsx +0 -59
- package/templates/create-full/src/sub-components/CartItem/components/BundleProductItem/styles.css +0 -24
- package/templates/create-full/src/sub-components/CartItem/components/BundleProducts/index.tsx +0 -55
- package/templates/create-full/src/sub-components/CartItem/components/BundleProducts/styles.css +0 -30
- package/templates/create-full/src/sub-components/CartItem/components/ItemOptions/index.tsx +0 -31
- package/templates/create-full/src/sub-components/CartItem/components/ItemOptions/styles.css +0 -6
- package/templates/create-full/src/sub-components/CartItem/components/OptionValueDisplay/index.tsx +0 -79
- package/templates/create-full/src/sub-components/CartItem/components/OptionValueDisplay/styles.css +0 -28
- package/templates/create-full/src/sub-components/CartItem/index.tsx +0 -216
- package/templates/create-full/src/sub-components/CartItem/styles.css +0 -170
- package/templates/create-full/src/sub-components/Checkbox/index.tsx +0 -42
- package/templates/create-full/src/sub-components/Checkbox/styles.css +0 -65
- package/templates/create-full/src/sub-components/CollapsibleGroup/index.tsx +0 -52
- package/templates/create-full/src/sub-components/CollapsibleGroup/styles.css +0 -51
- package/templates/create-full/src/sub-components/ColorInput/index.tsx +0 -33
- package/templates/create-full/src/sub-components/ColorInput/styles.css +0 -53
- package/templates/create-full/src/sub-components/ConfirmModal/index.tsx +0 -60
- package/templates/create-full/src/sub-components/ConfirmModal/styles.css +0 -20
- package/templates/create-full/src/sub-components/FormItem/index.tsx +0 -66
- package/templates/create-full/src/sub-components/FormItem/styles.css +0 -38
- package/templates/create-full/src/sub-components/ImagePreviewModal/index.tsx +0 -55
- package/templates/create-full/src/sub-components/ImagePreviewModal/styles.css +0 -50
- package/templates/create-full/src/sub-components/Input/index.tsx +0 -69
- package/templates/create-full/src/sub-components/Input/styles.css +0 -162
- package/templates/create-full/src/sub-components/Modal/index.tsx +0 -120
- package/templates/create-full/src/sub-components/Modal/styles.css +0 -70
- package/templates/create-full/src/sub-components/PageLoader/index.tsx +0 -14
- package/templates/create-full/src/sub-components/PageLoader/styles.css +0 -12
- package/templates/create-full/src/sub-components/Pagination/index.tsx +0 -107
- package/templates/create-full/src/sub-components/Pagination/styles.css +0 -88
- package/templates/create-full/src/sub-components/ProductCard/index.tsx +0 -276
- package/templates/create-full/src/sub-components/ProductCard/styles.css +0 -99
- package/templates/create-full/src/sub-components/QuantitySelector/index.tsx +0 -41
- package/templates/create-full/src/sub-components/QuantitySelector/styles.css +0 -51
- package/templates/create-full/src/sub-components/ReviewCard/index.tsx +0 -103
- package/templates/create-full/src/sub-components/ReviewCard/styles.css +0 -95
- package/templates/create-full/src/sub-components/ReviewForm/index.tsx +0 -115
- package/templates/create-full/src/sub-components/ReviewForm/styles.css +0 -11
- package/templates/create-full/src/sub-components/ReviewSummary/index.tsx +0 -65
- package/templates/create-full/src/sub-components/ReviewSummary/styles.css +0 -86
- package/templates/create-full/src/sub-components/Select/index.tsx +0 -86
- package/templates/create-full/src/sub-components/Select/styles.css +0 -110
- package/templates/create-full/src/sub-components/SkeletonField/index.tsx +0 -12
- package/templates/create-full/src/sub-components/SkeletonField/styles.css +0 -29
- package/templates/create-full/src/sub-components/SliderArrow/index.tsx +0 -26
- package/templates/create-full/src/sub-components/SliderArrow/styles.css +0 -24
- package/templates/create-full/src/sub-components/SocialLoginButton/index.tsx +0 -24
- package/templates/create-full/src/sub-components/SocialLoginButton/styles.css +0 -19
- package/templates/create-full/src/sub-components/SpinnerIcon/index.tsx +0 -10
- package/templates/create-full/src/sub-components/SpinnerIcon/styles.css +0 -8
- package/templates/create-full/src/sub-components/StarRating/index.tsx +0 -76
- package/templates/create-full/src/sub-components/StarRating/styles.css +0 -40
- package/templates/create-full/src/sub-components/Tag/index.tsx +0 -21
- package/templates/create-full/src/sub-components/Tag/styles.css +0 -30
- package/templates/create-full/src/sub-components/Textarea/index.tsx +0 -45
- package/templates/create-full/src/sub-components/Textarea/styles.css +0 -82
- package/templates/create-full/src/sub-components/Toast/index.tsx +0 -257
- package/templates/create-full/src/sub-components/Toast/styles.css +0 -3
- package/templates/create-full/src/sub-components/Toggle/index.tsx +0 -46
- package/templates/create-full/src/sub-components/Toggle/styles.css +0 -86
- package/templates/create-full/src/sub-components/VariantBadge/index.tsx +0 -153
- package/templates/create-full/src/sub-components/VariantBadge/styles.css +0 -47
- package/templates/create-full/src/sub-components/icons/index.tsx +0 -981
- package/templates/create-full/src/utils/bundle.ts +0 -70
- package/templates/create-full/src/utils/cx.ts +0 -4
- package/templates/create-full/src/utils/fullName.ts +0 -6
- package/templates/create-full/src/utils/media.ts +0 -36
- package/templates/create-full/src/utils/optionPrice.ts +0 -19
- package/templates/create-full/src/utils/optionSet.ts +0 -17
- package/templates/create-full/src/utils/orderStatus.ts +0 -28
- package/templates/create-full/src/utils/pagination.ts +0 -29
- package/templates/create-full/src/utils/toast.ts +0 -5
- package/templates/create-full/tsconfig.json +0 -30
- package/templates/create-full/vite.config.ts +0 -15
package/templates/create-full/src/components/AccountOrderDetail/components/ReturnView/index.tsx
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { useState } from "preact/hooks";
|
|
2
|
-
import {
|
|
3
|
-
IkasOrder,
|
|
4
|
-
IkasOrderLineItem,
|
|
5
|
-
customerStore,
|
|
6
|
-
refundOrder,
|
|
7
|
-
Router,
|
|
8
|
-
getIkasOrderRefundableItems,
|
|
9
|
-
setOrderLineItemRefundQuantity,
|
|
10
|
-
isIkasOrderRefundable,
|
|
11
|
-
} from "@ikas/bp-storefront";
|
|
12
|
-
import Breadcrumb from "../../../../sub-components/Breadcrumb";
|
|
13
|
-
import Button from "../../../../sub-components/Button";
|
|
14
|
-
import { showToast } from "../../../../utils/toast";
|
|
15
|
-
import OrderHeader from "../OrderHeader";
|
|
16
|
-
import ReturnItemRow from "../ReturnItemRow";
|
|
17
|
-
|
|
18
|
-
interface Props {
|
|
19
|
-
order: IkasOrder;
|
|
20
|
-
breadcrumbOrdersLabel: string;
|
|
21
|
-
breadcrumbOrderLabel: string;
|
|
22
|
-
orderNoLabel: string;
|
|
23
|
-
orderStatusLabel: string;
|
|
24
|
-
orderDateLabel: string;
|
|
25
|
-
returnRequestTitle: string;
|
|
26
|
-
returnSubmitText: string;
|
|
27
|
-
returningButtonText: string;
|
|
28
|
-
returnSuccessText: string;
|
|
29
|
-
returnErrorText: string;
|
|
30
|
-
copiedText: string;
|
|
31
|
-
onBack: () => void;
|
|
32
|
-
onSuccess: () => void;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function ReturnView({
|
|
36
|
-
order,
|
|
37
|
-
breadcrumbOrdersLabel,
|
|
38
|
-
breadcrumbOrderLabel,
|
|
39
|
-
orderNoLabel,
|
|
40
|
-
orderStatusLabel,
|
|
41
|
-
orderDateLabel,
|
|
42
|
-
returnRequestTitle,
|
|
43
|
-
returnSubmitText,
|
|
44
|
-
returningButtonText,
|
|
45
|
-
returnSuccessText,
|
|
46
|
-
returnErrorText,
|
|
47
|
-
copiedText,
|
|
48
|
-
onBack,
|
|
49
|
-
onSuccess,
|
|
50
|
-
}: Props) {
|
|
51
|
-
const [submitting, setSubmitting] = useState(false);
|
|
52
|
-
const [quantities, setQuantities] = useState<Record<string, number>>({});
|
|
53
|
-
const refundableItems = getIkasOrderRefundableItems(order);
|
|
54
|
-
|
|
55
|
-
const orderRefundable = isIkasOrderRefundable(order);
|
|
56
|
-
|
|
57
|
-
const disabled = !orderRefundable || submitting;
|
|
58
|
-
|
|
59
|
-
const updateQuantity = (item: IkasOrderLineItem, next: number) => {
|
|
60
|
-
const current = quantities[item.id] ?? 0;
|
|
61
|
-
if (next === current) return;
|
|
62
|
-
setOrderLineItemRefundQuantity(next || null, item);
|
|
63
|
-
if (next <= 0) {
|
|
64
|
-
const { [item.id]: _, ...rest } = quantities;
|
|
65
|
-
setQuantities(rest);
|
|
66
|
-
} else {
|
|
67
|
-
setQuantities({ ...quantities, [item.id]: next });
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
const handleToggle = (item: IkasOrderLineItem) => {
|
|
72
|
-
const current = quantities[item.id] ?? 0;
|
|
73
|
-
updateQuantity(item, current > 0 ? 0 : 1);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
const handleDecrease = (item: IkasOrderLineItem) => {
|
|
77
|
-
const current = quantities[item.id] ?? 0;
|
|
78
|
-
updateQuantity(item, Math.max(0, current - 1));
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
const handleIncrease = (item: IkasOrderLineItem) => {
|
|
82
|
-
const current = quantities[item.id] ?? 0;
|
|
83
|
-
updateQuantity(item, Math.min(item.quantity, current + 1));
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
const handleSubmit = async () => {
|
|
87
|
-
if (disabled) return;
|
|
88
|
-
setSubmitting(true);
|
|
89
|
-
try {
|
|
90
|
-
const success = await refundOrder(customerStore, order);
|
|
91
|
-
if (success) {
|
|
92
|
-
showToast(returnSuccessText, "success");
|
|
93
|
-
onSuccess();
|
|
94
|
-
} else {
|
|
95
|
-
showToast(returnErrorText, "error");
|
|
96
|
-
}
|
|
97
|
-
} catch {
|
|
98
|
-
showToast(returnErrorText, "error");
|
|
99
|
-
} finally {
|
|
100
|
-
setSubmitting(false);
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
return (
|
|
105
|
-
<div className="kombos-order-detail-return">
|
|
106
|
-
<Breadcrumb
|
|
107
|
-
items={[
|
|
108
|
-
{
|
|
109
|
-
label: breadcrumbOrdersLabel,
|
|
110
|
-
onClick: () => Router.navigateToPage("ORDERS"),
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
label: `${order.orderNumber} ${breadcrumbOrderLabel}`,
|
|
114
|
-
onClick: onBack,
|
|
115
|
-
},
|
|
116
|
-
{ label: returnRequestTitle },
|
|
117
|
-
]}
|
|
118
|
-
/>
|
|
119
|
-
|
|
120
|
-
<div className="kombos-order-detail-return__content">
|
|
121
|
-
<OrderHeader
|
|
122
|
-
order={order}
|
|
123
|
-
orderNoLabel={orderNoLabel}
|
|
124
|
-
orderStatusLabel={orderStatusLabel}
|
|
125
|
-
orderDateLabel={orderDateLabel}
|
|
126
|
-
copiedText={copiedText}
|
|
127
|
-
/>
|
|
128
|
-
|
|
129
|
-
<div className="kombos-order-detail-return__items">
|
|
130
|
-
{refundableItems.map((item) => (
|
|
131
|
-
<ReturnItemRow
|
|
132
|
-
key={item.id}
|
|
133
|
-
item={item}
|
|
134
|
-
refundQty={quantities[item.id] ?? 0}
|
|
135
|
-
onToggle={() => handleToggle(item)}
|
|
136
|
-
onDecrease={() => handleDecrease(item)}
|
|
137
|
-
onIncrease={() => handleIncrease(item)}
|
|
138
|
-
/>
|
|
139
|
-
))}
|
|
140
|
-
</div>
|
|
141
|
-
|
|
142
|
-
<div className="kombos-order-detail-return__footer">
|
|
143
|
-
<Button
|
|
144
|
-
variant="primary"
|
|
145
|
-
size="s"
|
|
146
|
-
onClick={handleSubmit}
|
|
147
|
-
loading={submitting}
|
|
148
|
-
disabled={disabled}
|
|
149
|
-
className="kombos-order-detail-return__submit-btn"
|
|
150
|
-
>
|
|
151
|
-
{submitting ? returningButtonText : returnSubmitText}
|
|
152
|
-
</Button>
|
|
153
|
-
</div>
|
|
154
|
-
</div>
|
|
155
|
-
</div>
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export default ReturnView;
|
package/templates/create-full/src/components/AccountOrderDetail/components/ReturnView/styles.css
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
.kombos-order-detail-return {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
gap: 1.5rem;
|
|
5
|
-
width: 100%;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
.kombos-order-detail-return__content {
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
gap: 2rem;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.kombos-order-detail-return__items {
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
gap: 1rem;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/* Footer */
|
|
22
|
-
.kombos-order-detail-return__footer {
|
|
23
|
-
display: flex;
|
|
24
|
-
justify-content: flex-end;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.kombos-order-detail-return__submit-btn {
|
|
28
|
-
width: 100%;
|
|
29
|
-
}
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from "preact/hooks";
|
|
2
|
-
import {
|
|
3
|
-
customerStore,
|
|
4
|
-
IkasOrder,
|
|
5
|
-
IkasProductFile,
|
|
6
|
-
IkasOrderTransaction,
|
|
7
|
-
getOrderDetailsOfPage,
|
|
8
|
-
getIkasOrderDisplayedPackages,
|
|
9
|
-
isIkasOrderRefundable,
|
|
10
|
-
getIkasOrderProductFiles,
|
|
11
|
-
getOrderProductFiles,
|
|
12
|
-
getOrderTransactions,
|
|
13
|
-
getDigitalProductFileDownloadUrl,
|
|
14
|
-
Router,
|
|
15
|
-
getIkasOrderRefundableItems,
|
|
16
|
-
} from "@ikas/bp-storefront";
|
|
17
|
-
import PageLoader from "../../sub-components/PageLoader";
|
|
18
|
-
import Button from "../../sub-components/Button";
|
|
19
|
-
import Breadcrumb from "../../sub-components/Breadcrumb";
|
|
20
|
-
import { DownloadSVG } from "../../sub-components/icons";
|
|
21
|
-
import OrderHeader from "./components/OrderHeader";
|
|
22
|
-
import PackageGroup from "./components/PackageGroup";
|
|
23
|
-
import OrderSidebar from "./components/OrderSidebar";
|
|
24
|
-
import ReturnView from "./components/ReturnView";
|
|
25
|
-
import { Props } from "./types";
|
|
26
|
-
|
|
27
|
-
export function AccountOrderDetail({
|
|
28
|
-
breadcrumbOrdersLabel = "My Orders",
|
|
29
|
-
breadcrumbOrderLabel = "Order",
|
|
30
|
-
orderNoLabel = "Order No:",
|
|
31
|
-
orderStatusLabel = "Order Status:",
|
|
32
|
-
orderDateLabel = "Order Date:",
|
|
33
|
-
returnButtonText = "Return",
|
|
34
|
-
returningButtonText = "Submitting return request...",
|
|
35
|
-
returnRequestTitle = "Return Request",
|
|
36
|
-
returnSubmitText = "Return",
|
|
37
|
-
deliveryAddressLabel = "Delivery Address",
|
|
38
|
-
billingAddressLabel = "Billing Address",
|
|
39
|
-
paymentInfoLabel = "Payment Information",
|
|
40
|
-
summaryLabel = "Summary",
|
|
41
|
-
subtotalLabel = "Subtotal",
|
|
42
|
-
shippingLabel = "Shipping",
|
|
43
|
-
totalLabel = "Total",
|
|
44
|
-
taxIncludedText = "*taxes included",
|
|
45
|
-
installmentText = "Installment",
|
|
46
|
-
singlePaymentText = "Single Payment",
|
|
47
|
-
cargoCompanyLabel = "Shipping Company:",
|
|
48
|
-
trackingNumberLabel = "Tracking Number:",
|
|
49
|
-
quantityLabel = "items",
|
|
50
|
-
errorText = "Order not found.",
|
|
51
|
-
backToOrdersText = "Back to Orders",
|
|
52
|
-
returnSuccessText = "Your return request has been successfully created.",
|
|
53
|
-
returnErrorText = "An error occurred while creating the return request.",
|
|
54
|
-
copiedText = "Copied!",
|
|
55
|
-
downloadSectionTitle = "Downloadable Files",
|
|
56
|
-
downloadButtonText = "Download",
|
|
57
|
-
}: Props) {
|
|
58
|
-
const [order, setOrder] = useState<IkasOrder | null>(null);
|
|
59
|
-
const [loading, setLoading] = useState(true);
|
|
60
|
-
const [view, setView] = useState<"detail" | "return">("detail");
|
|
61
|
-
const [files, setFiles] = useState<IkasProductFile[]>([]);
|
|
62
|
-
const [transactions, setTransactions] = useState<IkasOrderTransaction[]>([]);
|
|
63
|
-
useEffect(() => {
|
|
64
|
-
let cancelled = false;
|
|
65
|
-
(async () => {
|
|
66
|
-
try {
|
|
67
|
-
const result = await getOrderDetailsOfPage(customerStore);
|
|
68
|
-
if (!cancelled && result) {
|
|
69
|
-
setOrder(result);
|
|
70
|
-
const fileIds = getIkasOrderProductFiles(result);
|
|
71
|
-
if (fileIds.length > 0) {
|
|
72
|
-
const [productFiles, txns] = await Promise.all([
|
|
73
|
-
getOrderProductFiles(customerStore, fileIds),
|
|
74
|
-
getOrderTransactions(customerStore, { orderId: result.id }),
|
|
75
|
-
]);
|
|
76
|
-
if (!cancelled) {
|
|
77
|
-
setFiles(productFiles);
|
|
78
|
-
setTransactions(txns);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
} finally {
|
|
83
|
-
if (!cancelled) setLoading(false);
|
|
84
|
-
}
|
|
85
|
-
})();
|
|
86
|
-
return () => {
|
|
87
|
-
cancelled = true;
|
|
88
|
-
};
|
|
89
|
-
}, []);
|
|
90
|
-
|
|
91
|
-
if (loading) {
|
|
92
|
-
return <PageLoader />;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
if (!order) {
|
|
96
|
-
return (
|
|
97
|
-
<div className="kombos-order-detail">
|
|
98
|
-
<div className="kombos-order-detail__empty">
|
|
99
|
-
<p className="kombos-order-detail__empty-text text-sm-regular">
|
|
100
|
-
{errorText}
|
|
101
|
-
</p>
|
|
102
|
-
<Button
|
|
103
|
-
variant="secondary"
|
|
104
|
-
size="s"
|
|
105
|
-
onClick={() => Router.navigateToPage("ORDERS")}
|
|
106
|
-
>
|
|
107
|
-
{backToOrdersText}
|
|
108
|
-
</Button>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
if (view === "return") {
|
|
115
|
-
return (
|
|
116
|
-
<div className="kombos-order-detail">
|
|
117
|
-
<ReturnView
|
|
118
|
-
order={order}
|
|
119
|
-
breadcrumbOrdersLabel={breadcrumbOrdersLabel}
|
|
120
|
-
breadcrumbOrderLabel={breadcrumbOrderLabel}
|
|
121
|
-
orderNoLabel={orderNoLabel}
|
|
122
|
-
orderStatusLabel={orderStatusLabel}
|
|
123
|
-
orderDateLabel={orderDateLabel}
|
|
124
|
-
returnRequestTitle={returnRequestTitle}
|
|
125
|
-
returnSubmitText={returnSubmitText}
|
|
126
|
-
returningButtonText={returningButtonText}
|
|
127
|
-
returnSuccessText={returnSuccessText}
|
|
128
|
-
returnErrorText={returnErrorText}
|
|
129
|
-
copiedText={copiedText}
|
|
130
|
-
onBack={() => setView("detail")}
|
|
131
|
-
onSuccess={() => setView("detail")}
|
|
132
|
-
/>
|
|
133
|
-
</div>
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
const packages = getIkasOrderDisplayedPackages(order);
|
|
138
|
-
const canRefund = getIkasOrderRefundableItems(order).length > 0;
|
|
139
|
-
// const canRefund = isIkasOrderRefundable(order);
|
|
140
|
-
const isDownloadable =
|
|
141
|
-
transactions.length > 0 &&
|
|
142
|
-
transactions.every((t) => t.status === "SUCCESS");
|
|
143
|
-
|
|
144
|
-
return (
|
|
145
|
-
<div className="kombos-order-detail">
|
|
146
|
-
<Breadcrumb
|
|
147
|
-
items={[
|
|
148
|
-
{
|
|
149
|
-
label: breadcrumbOrdersLabel,
|
|
150
|
-
onClick: () => Router.navigateToPage("ORDERS"),
|
|
151
|
-
},
|
|
152
|
-
{ label: `${order.orderNumber} ${breadcrumbOrderLabel}` },
|
|
153
|
-
]}
|
|
154
|
-
/>
|
|
155
|
-
|
|
156
|
-
<div className="kombos-order-detail__content">
|
|
157
|
-
<div className="kombos-order-detail__header-row">
|
|
158
|
-
<OrderHeader
|
|
159
|
-
order={order}
|
|
160
|
-
orderNoLabel={orderNoLabel}
|
|
161
|
-
orderStatusLabel={orderStatusLabel}
|
|
162
|
-
orderDateLabel={orderDateLabel}
|
|
163
|
-
copiedText={copiedText}
|
|
164
|
-
/>
|
|
165
|
-
{canRefund && (
|
|
166
|
-
<Button
|
|
167
|
-
variant="secondary"
|
|
168
|
-
size="s"
|
|
169
|
-
onClick={() => setView("return")}
|
|
170
|
-
className="kombos-order-detail__return-btn"
|
|
171
|
-
>
|
|
172
|
-
{returnButtonText}
|
|
173
|
-
</Button>
|
|
174
|
-
)}
|
|
175
|
-
</div>
|
|
176
|
-
|
|
177
|
-
<div className="kombos-order-detail__body">
|
|
178
|
-
<div className="kombos-order-detail__packages">
|
|
179
|
-
{files.length > 0 && (
|
|
180
|
-
<div className="kombos-order-detail__downloads">
|
|
181
|
-
<h3 className="kombos-order-detail__downloads-title text-md-semibold">
|
|
182
|
-
{downloadSectionTitle}
|
|
183
|
-
</h3>
|
|
184
|
-
<div className="kombos-order-detail__downloads-list">
|
|
185
|
-
{files.map((file) => (
|
|
186
|
-
<div
|
|
187
|
-
key={file.id}
|
|
188
|
-
className="kombos-order-detail__download-item"
|
|
189
|
-
>
|
|
190
|
-
<span className="kombos-order-detail__download-name text-sm-regular">
|
|
191
|
-
{file.name}
|
|
192
|
-
</span>
|
|
193
|
-
<Button
|
|
194
|
-
variant="secondary"
|
|
195
|
-
size="xs"
|
|
196
|
-
icon={<DownloadSVG />}
|
|
197
|
-
className="kombos-order-detail__download-btn"
|
|
198
|
-
disabled={!isDownloadable}
|
|
199
|
-
onClick={() =>
|
|
200
|
-
getDigitalProductFileDownloadUrl(
|
|
201
|
-
customerStore,
|
|
202
|
-
order,
|
|
203
|
-
file,
|
|
204
|
-
)
|
|
205
|
-
}
|
|
206
|
-
>
|
|
207
|
-
{downloadButtonText}
|
|
208
|
-
</Button>
|
|
209
|
-
</div>
|
|
210
|
-
))}
|
|
211
|
-
</div>
|
|
212
|
-
</div>
|
|
213
|
-
)}
|
|
214
|
-
{packages.map((pkg) => (
|
|
215
|
-
<PackageGroup
|
|
216
|
-
key={pkg.id}
|
|
217
|
-
pkg={pkg}
|
|
218
|
-
quantityLabel={quantityLabel}
|
|
219
|
-
cargoCompanyLabel={cargoCompanyLabel}
|
|
220
|
-
trackingNumberLabel={trackingNumberLabel}
|
|
221
|
-
/>
|
|
222
|
-
))}
|
|
223
|
-
</div>
|
|
224
|
-
|
|
225
|
-
<OrderSidebar
|
|
226
|
-
order={order}
|
|
227
|
-
deliveryAddressLabel={deliveryAddressLabel}
|
|
228
|
-
billingAddressLabel={billingAddressLabel}
|
|
229
|
-
paymentInfoLabel={paymentInfoLabel}
|
|
230
|
-
summaryLabel={summaryLabel}
|
|
231
|
-
subtotalLabel={subtotalLabel}
|
|
232
|
-
shippingLabel={shippingLabel}
|
|
233
|
-
totalLabel={totalLabel}
|
|
234
|
-
taxIncludedText={taxIncludedText}
|
|
235
|
-
installmentText={installmentText}
|
|
236
|
-
singlePaymentText={singlePaymentText}
|
|
237
|
-
/>
|
|
238
|
-
</div>
|
|
239
|
-
</div>
|
|
240
|
-
</div>
|
|
241
|
-
);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
export default AccountOrderDetail;
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
/* AccountOrderDetail — Root (component, not section) */
|
|
2
|
-
.kombos-order-detail {
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
gap: 1.5rem;
|
|
6
|
-
width: 100%;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/* Empty / Error */
|
|
10
|
-
.kombos-order-detail__empty {
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
align-items: center;
|
|
14
|
-
justify-content: center;
|
|
15
|
-
gap: 1rem;
|
|
16
|
-
padding: 4rem 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.kombos-order-detail__empty-text {
|
|
20
|
-
color: var(--kombos-gray-500);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/* Content */
|
|
24
|
-
.kombos-order-detail__content {
|
|
25
|
-
display: flex;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
gap: 2rem;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/* Header row (order info + return button) */
|
|
31
|
-
.kombos-order-detail__header-row {
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
gap: 1rem;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.kombos-order-detail__return-btn {
|
|
38
|
-
align-self: flex-start;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@media (min-width: 768px) {
|
|
42
|
-
.kombos-order-detail__header-row {
|
|
43
|
-
flex-direction: row;
|
|
44
|
-
align-items: flex-start;
|
|
45
|
-
justify-content: space-between;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.kombos-order-detail__header-row .kombos-order-detail-header {
|
|
49
|
-
border-bottom: none;
|
|
50
|
-
padding-bottom: 0;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.kombos-order-detail__return-btn {
|
|
54
|
-
align-self: auto;
|
|
55
|
-
flex-shrink: 0;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/* Body (packages + sidebar) */
|
|
60
|
-
.kombos-order-detail__body {
|
|
61
|
-
display: flex;
|
|
62
|
-
flex-direction: column;
|
|
63
|
-
gap: 2.5rem;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.kombos-order-detail__packages {
|
|
67
|
-
display: flex;
|
|
68
|
-
flex-direction: column;
|
|
69
|
-
gap: 1.5rem;
|
|
70
|
-
flex: 1;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/* Digital Downloads */
|
|
74
|
-
.kombos-order-detail__downloads {
|
|
75
|
-
display: flex;
|
|
76
|
-
flex-direction: column;
|
|
77
|
-
gap: 0.75rem;
|
|
78
|
-
padding: 1rem;
|
|
79
|
-
border: 1px solid var(--kombos-gray-200);
|
|
80
|
-
border-radius: 6px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.kombos-order-detail__downloads-title {
|
|
84
|
-
color: var(--kombos-gray-900);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.kombos-order-detail__downloads-list {
|
|
88
|
-
display: flex;
|
|
89
|
-
flex-direction: column;
|
|
90
|
-
gap: 0.5rem;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.kombos-order-detail__download-item {
|
|
94
|
-
display: flex;
|
|
95
|
-
align-items: center;
|
|
96
|
-
justify-content: space-between;
|
|
97
|
-
gap: 1rem;
|
|
98
|
-
padding: 0.5rem 0;
|
|
99
|
-
border-bottom: 1px solid var(--kombos-gray-100);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.kombos-order-detail__download-item:last-child {
|
|
103
|
-
border-bottom: none;
|
|
104
|
-
padding-bottom: 0;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.kombos-order-detail__download-name {
|
|
108
|
-
color: var(--kombos-gray-700);
|
|
109
|
-
flex: 1;
|
|
110
|
-
min-width: 0;
|
|
111
|
-
overflow: hidden;
|
|
112
|
-
text-overflow: ellipsis;
|
|
113
|
-
white-space: nowrap;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.kombos-order-detail__download-btn {
|
|
117
|
-
flex-shrink: 0;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
@media (min-width: 1024px) {
|
|
121
|
-
.kombos-order-detail__body {
|
|
122
|
-
flex-direction: row;
|
|
123
|
-
gap: 6rem;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated — do not edit manually.
|
|
2
|
-
export interface Props {
|
|
3
|
-
breadcrumbOrdersLabel?: string;
|
|
4
|
-
breadcrumbOrderLabel?: string;
|
|
5
|
-
orderNoLabel?: string;
|
|
6
|
-
orderStatusLabel?: string;
|
|
7
|
-
orderDateLabel?: string;
|
|
8
|
-
returnButtonText?: string;
|
|
9
|
-
returningButtonText?: string;
|
|
10
|
-
returnRequestTitle?: string;
|
|
11
|
-
returnSubmitText?: string;
|
|
12
|
-
deliveryAddressLabel?: string;
|
|
13
|
-
billingAddressLabel?: string;
|
|
14
|
-
paymentInfoLabel?: string;
|
|
15
|
-
summaryLabel?: string;
|
|
16
|
-
subtotalLabel?: string;
|
|
17
|
-
shippingLabel?: string;
|
|
18
|
-
totalLabel?: string;
|
|
19
|
-
taxIncludedText?: string;
|
|
20
|
-
cargoCompanyLabel?: string;
|
|
21
|
-
trackingNumberLabel?: string;
|
|
22
|
-
quantityLabel?: string;
|
|
23
|
-
errorText?: string;
|
|
24
|
-
backToOrdersText?: string;
|
|
25
|
-
returnSuccessText?: string;
|
|
26
|
-
returnErrorText?: string;
|
|
27
|
-
copiedText?: string;
|
|
28
|
-
installmentText?: string;
|
|
29
|
-
singlePaymentText?: string;
|
|
30
|
-
downloadSectionTitle?: string;
|
|
31
|
-
downloadButtonText?: string;
|
|
32
|
-
}
|