🚚 Rename CrateHandle to BaseHandle for base dir
This commit is contained in:
parent
466723f7e9
commit
e25cf3eecc
35 changed files with 69 additions and 69 deletions
|
|
@ -123,8 +123,8 @@ pub fn component_classes_derive(input: TokenStream) -> TokenStream {
|
|||
TokenStream::from(expanded)
|
||||
}
|
||||
|
||||
#[proc_macro_derive(CrateHandle, attributes(handle))]
|
||||
pub fn crate_handle_derive(input: TokenStream) -> TokenStream {
|
||||
#[proc_macro_derive(BaseHandle, attributes(handle))]
|
||||
pub fn base_handle_derive(input: TokenStream) -> TokenStream {
|
||||
impl_handle(input, quote! { crate })
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
use super::FnAction;
|
||||
|
||||
#[derive(CrateHandle)]
|
||||
#[derive(BaseHandle)]
|
||||
pub struct AfterPrepareComponent<C: ComponentTrait> {
|
||||
f: FnAction<C>,
|
||||
referer_handle: Option<Handle>,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
use super::FnAction;
|
||||
|
||||
#[derive(CrateHandle)]
|
||||
#[derive(BaseHandle)]
|
||||
pub struct BeforePrepareComponent<C: ComponentTrait> {
|
||||
f: FnAction<C>,
|
||||
referer_handle: Option<Handle>,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
use super::FnActionPage;
|
||||
|
||||
#[derive(CrateHandle)]
|
||||
#[derive(BaseHandle)]
|
||||
pub struct AfterPrepareBody {
|
||||
f: FnActionPage,
|
||||
weight: Weight,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
use super::FnActionPage;
|
||||
|
||||
#[derive(CrateHandle)]
|
||||
#[derive(BaseHandle)]
|
||||
pub struct BeforePrepareBody {
|
||||
f: FnActionPage,
|
||||
weight: Weight,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(ComponentClasses, CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, ComponentClasses, SmartDefault)]
|
||||
pub struct Block {
|
||||
id : OptionId,
|
||||
weight : Weight,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, SmartDefault)]
|
||||
pub struct Branding {
|
||||
id : OptionId,
|
||||
weight : Weight,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[derive(SmartDefault)]
|
||||
pub enum ButtonType {
|
||||
|
|
@ -29,7 +29,7 @@ pub enum ButtonTarget {
|
|||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(ComponentClasses, CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, ComponentClasses, SmartDefault)]
|
||||
pub struct Button {
|
||||
id : OptionId,
|
||||
weight : Weight,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(ComponentClasses, CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, ComponentClasses, SmartDefault)]
|
||||
pub struct Container {
|
||||
id : OptionId,
|
||||
weight : Weight,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(ComponentClasses, CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, ComponentClasses, SmartDefault)]
|
||||
pub struct Item {
|
||||
id : OptionId,
|
||||
weight : Weight,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[derive(SmartDefault)]
|
||||
pub enum ButtonType {
|
||||
|
|
@ -21,7 +21,7 @@ impl ToString for ButtonType {
|
|||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(ComponentClasses, CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, ComponentClasses, SmartDefault)]
|
||||
pub struct Button {
|
||||
weight : Weight,
|
||||
renderable : Renderable,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(ComponentClasses, CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, ComponentClasses, SmartDefault)]
|
||||
pub struct Date {
|
||||
weight : Weight,
|
||||
renderable : Renderable,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[derive(SmartDefault)]
|
||||
pub enum FormMethod {
|
||||
|
|
@ -9,7 +9,7 @@ pub enum FormMethod {
|
|||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(ComponentClasses, CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, ComponentClasses, SmartDefault)]
|
||||
pub struct Form {
|
||||
id : OptionId,
|
||||
weight : Weight,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, SmartDefault)]
|
||||
pub struct Hidden {
|
||||
weight: Weight,
|
||||
name : OptionName,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[derive(SmartDefault)]
|
||||
pub enum InputType {
|
||||
|
|
@ -13,7 +13,7 @@ pub enum InputType {
|
|||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(ComponentClasses, CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, ComponentClasses, SmartDefault)]
|
||||
pub struct Input {
|
||||
weight : Weight,
|
||||
renderable : Renderable,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[derive(SmartDefault)]
|
||||
pub enum HeadingType {
|
||||
|
|
@ -40,7 +40,7 @@ impl ToString for HeadingDisplay {
|
|||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(ComponentClasses, CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, ComponentClasses, SmartDefault)]
|
||||
pub struct Heading {
|
||||
id : OptionId,
|
||||
weight : Weight,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[derive(CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, SmartDefault)]
|
||||
pub struct Html(Markup);
|
||||
|
||||
impl ComponentTrait for Html {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(ComponentClasses, CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, ComponentClasses, SmartDefault)]
|
||||
pub struct Icon {
|
||||
weight : Weight,
|
||||
renderable: Renderable,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
const IMG_FLUID: &str = "pt-img__fluid";
|
||||
const IMG_FIXED: &str = "pt-img__fixed";
|
||||
|
|
@ -15,7 +15,7 @@ pub enum ImageSize {
|
|||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(ComponentClasses, CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, ComponentClasses, SmartDefault)]
|
||||
pub struct Image {
|
||||
id : OptionId,
|
||||
weight : Weight,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
use super::Submenu;
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ pub enum ElementType {
|
|||
// Element.
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, SmartDefault)]
|
||||
pub struct Element {
|
||||
weight : Weight,
|
||||
renderable : Renderable,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
use super::Element;
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, SmartDefault)]
|
||||
pub struct Group {
|
||||
id : OptionId,
|
||||
weight : Weight,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
use super::{Megamenu, Submenu};
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ pub enum ItemType {
|
|||
// Item.
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, SmartDefault)]
|
||||
pub struct Item {
|
||||
weight : Weight,
|
||||
renderable : Renderable,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
use super::Group;
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, SmartDefault)]
|
||||
pub struct Megamenu {
|
||||
id : OptionId,
|
||||
weight : Weight,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
use super::Item;
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, SmartDefault)]
|
||||
pub struct Menu {
|
||||
id : OptionId,
|
||||
weight : Weight,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
use super::Item;
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, SmartDefault)]
|
||||
pub struct Submenu {
|
||||
id : OptionId,
|
||||
weight : Weight,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(ComponentClasses, CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, ComponentClasses, SmartDefault)]
|
||||
pub struct Paragraph {
|
||||
id : OptionId,
|
||||
weight : Weight,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[derive(Default, Eq, PartialEq)]
|
||||
pub enum PoweredByLogo {
|
||||
|
|
@ -12,7 +12,7 @@ pub enum PoweredByLogo {
|
|||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, SmartDefault)]
|
||||
pub struct PoweredBy {
|
||||
weight : Weight,
|
||||
renderable: Renderable,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[derive(CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, SmartDefault)]
|
||||
pub struct Translate(L10n);
|
||||
|
||||
impl ComponentTrait for Translate {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[derive(SmartDefault)]
|
||||
pub enum WrapperType {
|
||||
|
|
@ -12,7 +12,7 @@ pub enum WrapperType {
|
|||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(ComponentClasses, CrateHandle, SmartDefault)]
|
||||
#[derive(BaseHandle, ComponentClasses, SmartDefault)]
|
||||
pub struct Wrapper {
|
||||
id : OptionId,
|
||||
weight : Weight,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[derive(CrateHandle)]
|
||||
#[derive(BaseHandle)]
|
||||
pub struct Basic;
|
||||
|
||||
impl ModuleTrait for Basic {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[derive(CrateHandle)]
|
||||
#[derive(BaseHandle)]
|
||||
pub struct Chassis;
|
||||
|
||||
impl ModuleTrait for Chassis {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use crate::prelude::*;
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[derive(CrateHandle)]
|
||||
#[derive(BaseHandle)]
|
||||
pub struct Inception;
|
||||
|
||||
impl ModuleTrait for Inception {
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ pub use smart_default::SmartDefault;
|
|||
|
||||
pub use pagetop_macros::{fn_builder, main, test, AssignHandle, ComponentClasses};
|
||||
|
||||
pub(crate) use pagetop_macros::CrateHandle;
|
||||
pub(crate) use pagetop_macros::BaseHandle;
|
||||
|
||||
// *************************************************************************************************
|
||||
// GLOBAL.
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use crate::core::component::{ComponentTrait, Context};
|
||||
use crate::html::{html, PrepareMarkup};
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[derive(CrateHandle)]
|
||||
#[derive(BaseHandle)]
|
||||
pub struct Error403;
|
||||
|
||||
impl ComponentTrait for Error403 {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use crate::core::component::{ComponentTrait, Context};
|
||||
use crate::html::{html, PrepareMarkup};
|
||||
use crate::CrateHandle;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[derive(CrateHandle)]
|
||||
#[derive(BaseHandle)]
|
||||
pub struct Error404;
|
||||
|
||||
impl ComponentTrait for Error404 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue