| 1 |
import { __ } from '@wordpress/i18n'; |
| 2 |
import { Dashicon } from '@wordpress/components'; |
| 3 |
|
| 4 |
export const ORDER_BY = [ |
| 5 |
{ label: __("Name", "betterdocs"), value: "name" }, |
| 6 |
{ label: __("Slug", "betterdocs"), value: "slug" }, |
| 7 |
{ label: __("Term Group", "betterdocs"), value: "term_group" }, |
| 8 |
{ label: __("ID", "betterdocs"), value: "id" }, |
| 9 |
{ label: __("Description", "betterdocs"), value: "description" }, |
| 10 |
{ |
| 11 |
label: __("BetterDocs Order", "betterdocs"), |
| 12 |
value: "doc_category_order", |
| 13 |
}, |
| 14 |
]; |
| 15 |
|
| 16 |
export const POSTS_ORDER_BY = [ |
| 17 |
{ label: __("Doc ID", "betterdocs"), value: "id" }, |
| 18 |
{ label: __("Doc Author", "betterdocs"), value: "author" }, |
| 19 |
{ label: __("Title", "betterdocs"), value: "title" }, |
| 20 |
{ label: __("Date", "betterdocs"), value: "date" }, |
| 21 |
{ label: __("Last Modified Date", "betterdocs"), value: "modified" }, |
| 22 |
{ label: __("Parent Id", "betterdocs"), value: "parent" }, |
| 23 |
{ label: __("Random", "betterdocs"), value: "rand" }, |
| 24 |
{ label: __("Comment Count", "betterdocs"), value: "comment_count" }, |
| 25 |
{ label: __("Menu Order", "betterdocs"), value: "menu_order" }, |
| 26 |
]; |
| 27 |
|
| 28 |
export const ORDER = [ |
| 29 |
{ label: __("Ascending", "betterdocs"), value: "asc" }, |
| 30 |
{ label: __("Descending", "betterdocs"), value: "desc" }, |
| 31 |
]; |
| 32 |
|
| 33 |
export const FAQ_LAYOUT = [ |
| 34 |
{ label: __("Modern", "betterdocs"), value: "layout-1" }, |
| 35 |
{ label: __("Classic", "betterdocs"), value: "layout-2" }, |
| 36 |
{ label: __("Abstract", "betterdocs"), value: "layout-3" }, |
| 37 |
{ label: __("Tab", "betterdocs"), value: "layout-4" }, |
| 38 |
]; |
| 39 |
|
| 40 |
export const getFaqTaxonomyOptions = () => { |
| 41 |
const options = [ |
| 42 |
{ label: __("General FAQ", "betterdocs"), value: "betterdocs_faq_category" }, |
| 43 |
]; |
| 44 |
if (Boolean(betterDocsBlocksHelper.is_woocommerce_active)) { |
| 45 |
options.push({ label: __("Product FAQ", "betterdocs"), value: "betterdocs_product_faq_category" }); |
| 46 |
options.push({ label: __("Product Assignments", "betterdocs"), value: "product_assignments" }); |
| 47 |
} |
| 48 |
return options; |
| 49 |
}; |
| 50 |
|
| 51 |
export const LAYOUT_MODE = [ |
| 52 |
{ label: __("Handbook", "betterdocs"), value: "faq" }, |
| 53 |
{ label: __("Masonry", "betterdocs"), value: "masonry" }, |
| 54 |
]; |
| 55 |
|
| 56 |
export const HTML_TAGS = [ |
| 57 |
{ label: __("H1", "betterdocs"), value: "h1" }, |
| 58 |
{ label: __("H2", "betterdocs"), value: "h2" }, |
| 59 |
{ label: __("H3", "betterdocs"), value: "h3" }, |
| 60 |
{ label: __("H4", "betterdocs"), value: "h4" }, |
| 61 |
{ label: __("H5", "betterdocs"), value: "h5" }, |
| 62 |
{ label: __("H6", "betterdocs"), value: "h6" }, |
| 63 |
{ label: __("span", "betterdocs"), value: "span" }, |
| 64 |
{ label: __("p", "betterdocs"), value: "p" }, |
| 65 |
{ label: __("div", "betterdocs"), value: "div" }, |
| 66 |
]; |
| 67 |
|
| 68 |
export const BUTTON_POSITION = [ |
| 69 |
{ |
| 70 |
label: __( |
| 71 |
<Dashicon icon={"editor-alignleft"} title={__("Left", "betterdocs")} /> |
| 72 |
), |
| 73 |
value: "left", |
| 74 |
}, |
| 75 |
{ |
| 76 |
label: __( |
| 77 |
<Dashicon |
| 78 |
icon={"editor-aligncenter"} |
| 79 |
title={__("Center", "betterdocs")} |
| 80 |
/> |
| 81 |
), |
| 82 |
value: "center", |
| 83 |
}, |
| 84 |
{ |
| 85 |
label: __( |
| 86 |
<Dashicon icon={"editor-alignright"} title={__("Right", "betterdocs")} /> |
| 87 |
), |
| 88 |
value: "right", |
| 89 |
}, |
| 90 |
]; |
| 91 |
|
| 92 |
// responsive range controller |
| 93 |
export const COLUMNS = "col"; |
| 94 |
export const FAQ_SPACE = "faqSpace"; |
| 95 |
export const COUNT_SIZE = "countSize"; |
| 96 |
export const ICON_SIZE = "iconSize"; |
| 97 |
export const THUMBNAIL_SIZE = "thumbnailSize"; |
| 98 |
|
| 99 |
// dimension control |
| 100 |
export const FAQ_LIST_MARGIN = "faqListMargin"; |
| 101 |
export const FAQ_LIST_MARGIN_LAYOUT_4 = "faqListMarginLayout4"; |
| 102 |
export const FAQ_LIST_PADDING = "faqListPadding"; |
| 103 |
export const FAQ_LIST_PADDING_LAYOUT_4 = "faqListPaddingLayout4"; |
| 104 |
export const FAQ_CONTENT_MARGIN = "faqContentMargin"; |
| 105 |
export const FAQ_CONTENT_MARGIN_LAYOUT_4 = "faqContentMarginLayout4"; |
| 106 |
export const FAQ_CONTENT_PADDING = "faqContentPadding"; |
| 107 |
export const FAQ_CONTENT_PADDING_LAYOUT_4 = "faqContentPaddingLayout4"; |
| 108 |
export const TITLE_MARGIN = "titleMargin"; |
| 109 |
export const DESCRIPTION_MARGIN = "descriptionMargin"; |
| 110 |
export const TITLE_PADDING = "titlePadding"; |
| 111 |
export const DESCRIPTION_PADDING = "descriptionPadding"; |
| 112 |
export const LIST_MARGIN = "listMargin"; |
| 113 |
export const LIST_PADDING = "listPadding"; |
| 114 |
export const ICON_MARGIN = "iconMargin"; |
| 115 |
export const BTN_MARGIN = "btnMargin"; |
| 116 |
export const BTN_PADDING = "btnPadding"; |
| 117 |
export const WRAPPER_MARGIN = "wrpMargin"; |
| 118 |
export const SECTION_TITLE_MARGIN = 'sectionTitleMargin'; |
| 119 |
export const SECTION_TITLE_PADDING = 'sectionTitlePadding'; |
| 120 |
export const GROUP_TITLE_MARGIN = 'groupTitleMargin'; |
| 121 |
export const GROUP_TITLE_MARGIN_LAYOUT_4 = 'groupTitleMarginLayout4'; |
| 122 |
export const GROUP_TITLE_PADDING = 'groupTitlePadding'; |
| 123 |
export const GROUP_TITLE_PADDING_LAYOUT_4 = 'groupTitlePaddingLayout4'; |
| 124 |
export const CONTAINER_SECTION_PADDING = 'containerSectionPadding'; |
| 125 |
export const CONTAINER_SECTION_MARGIN = 'containerSectionMargin'; |
| 126 |
|
| 127 |
// background controls |
| 128 |
export const FAQ_LIST_BACKGROUND = "faqListBack"; |
| 129 |
export const FAQ_LIST_BACKGROUND_LAYOUT_4 = "faqListBackLayout4"; |
| 130 |
export const FAQ_CONTENT_BACKGROUND = "faqContentBack"; |
| 131 |
export const FAQ_CONTENT_BACKGROUND_LAYOUT_4 = "faqContentBackLayout4"; |
| 132 |
export const TITLE_BACKGROUND = "titleBack"; |
| 133 |
export const DESCRIPTION_BACKGROUND = "descriptionBack"; |
| 134 |
export const COUNT_BACKGROUND = "countBack"; |
| 135 |
export const LIST_BACKGROUND = "listBack"; |
| 136 |
export const BTN_BACKGROUND = "btnBack"; |
| 137 |
export const CONTAINER_SECTION_BACKGROUND = 'containerSectionBack'; |
| 138 |
|
| 139 |
// border shadow attriubtes |
| 140 |
export const FAQ_BORDER = "faqBrd"; |
| 141 |
export const FAQ_BORDER_LAYOUT_4 = "faqBrdLayout4"; |
| 142 |
export const FAQ_CONTENT_BORDER = "faqContentBrd"; |
| 143 |
export const FAQ_CONTENT_BORDER_LAYOUT_4 = "faqContentBrdLayout4"; |
| 144 |
export const TITLE_BORDER = "titleBrd"; |
| 145 |
export const DESCRIPTION_BORDER = "descriptionBrd"; |
| 146 |
export const COUNT_BORDER = "countBrd"; |
| 147 |
export const BTN_BORDER = "btnBrd"; |
| 148 |
|
| 149 |
//layout 3 constants |
| 150 |
export const FAQ_LIST_BACKGROUND_LAYOUT_3 = "faqListBackLayout3"; |
| 151 |
|