mux.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743
  1. package docsrc
  2. import (
  3. "fmt"
  4. "net/http"
  5. "os"
  6. "strings"
  7. "github.com/go-chi/chi/middleware"
  8. "github.com/qor5/admin/presets"
  9. "github.com/qor5/docs/docsrc/examples/e00_basics"
  10. "github.com/qor5/docs/docsrc/examples/e10_vuetify_autocomplete"
  11. "github.com/qor5/docs/docsrc/examples/e11_vuetify_basic_inputs"
  12. "github.com/qor5/docs/docsrc/examples/e13_vuetify_list"
  13. "github.com/qor5/docs/docsrc/examples/e14_vuetify_menu"
  14. "github.com/qor5/docs/docsrc/examples/e15_vuetify_navigation_drawer"
  15. "github.com/qor5/docs/docsrc/examples/e17_hello_lazy_portals_and_reload"
  16. "github.com/qor5/docs/docsrc/examples/e21_presents"
  17. "github.com/qor5/docs/docsrc/examples/e22_vuetify_variant_sub_form"
  18. "github.com/qor5/docs/docsrc/examples/e23_vuetify_components_kitchen"
  19. "github.com/qor5/docs/docsrc/examples/e24_vuetify_components_linkage_select"
  20. "github.com/qor5/docs/docsrc/examples/example_basics"
  21. "github.com/qor5/docs/docsrc/utils"
  22. "github.com/qor5/ui/tiptap"
  23. v "github.com/qor5/ui/vuetify"
  24. "github.com/qor5/ui/vuetifyx"
  25. "github.com/qor5/web"
  26. "github.com/theplant/docgo"
  27. . "github.com/theplant/htmlgo"
  28. )
  29. type section struct {
  30. title string
  31. slug string
  32. items []*pageItem
  33. }
  34. type pageItem struct {
  35. section string
  36. slug string
  37. title string
  38. doc HTMLComponent
  39. }
  40. func menuLinks(prefix string, secs []*section) (comp HTMLComponent) {
  41. var nav = Nav().Class("side-tree-nav")
  42. for _, sec := range secs {
  43. secdiv := Div(
  44. Div(
  45. Div().Class("marker"),
  46. Div().Class("text").Text(sec.title),
  47. ).Class("tree-item-title tree-branch-title js-item-title js-branch-title is_active"),
  48. ).Class("tree-item tree-branch js-item js-branch _opened")
  49. for _, p := range sec.items {
  50. secdiv.AppendChildren(
  51. Div(
  52. A(
  53. Span("").Class("marker"),
  54. Span(p.title).Class("text"),
  55. ).Class("tree-item-title tree-leaf-title js-item-title js-leaf-title").
  56. Href(fmt.Sprintf("%s/%s/%s", prefix, sec.slug, p.slug)),
  57. ).Class("tree-item tree-leaf js-item js-leaf"),
  58. )
  59. }
  60. nav.AppendChildren(secdiv)
  61. }
  62. comp = Aside(
  63. Div(nav).Class("js-side-tree-nav"),
  64. ).Class("g-3")
  65. return
  66. }
  67. func header() HTMLComponent {
  68. return Header(
  69. Div(
  70. Div(
  71. A().Href("/").Class("global-header-logo").Text("QOR5"),
  72. Nav(
  73. Div(
  74. A().Href("https://github.com/qor5").Text("Github").Class("nav-item"),
  75. ).Class("nav-links"),
  76. ).Class("global-nav"),
  77. ).Class("g-layout"),
  78. ).Class("global-header-panel"),
  79. ).Class("global-header")
  80. }
  81. func footer() HTMLComponent {
  82. return Footer(
  83. Div(
  84. Div(
  85. Div(
  86. Div(
  87. Div().Class("terms-copyright").Text("Licensed under the MIT license"),
  88. ).Class("global-footer-row"),
  89. ).Class("global-footer-container"),
  90. ).Class("g-layout"),
  91. ).Class("global-footer-terms"),
  92. ).Role("contentinfo").Class("global-footer")
  93. }
  94. func addGA(ctx *web.EventContext) {
  95. if strings.Index(ctx.R.Host, "localhost") >= 0 {
  96. return
  97. }
  98. ctx.Injector.HeadHTML(`
  99. <!-- Global site tag (gtag.js) - Google Analytics -->
  100. <script async src="https://www.googletagmanager.com/gtag/js?id=UA-149605708-1"></script>
  101. <script>
  102. window.dataLayer = window.dataLayer || [];
  103. function gtag(){dataLayer.push(arguments);}
  104. gtag('js', new Date());
  105. gtag('config', 'UA-149605708-1');
  106. </script>
  107. `)
  108. }
  109. func layout(in web.PageFunc, secs []*section, prefix string, cp *pageItem) (out web.PageFunc) {
  110. return func(ctx *web.EventContext) (pr web.PageResponse, err error) {
  111. addGA(ctx)
  112. pr.PageTitle = cp.title + " - " + "QOR5"
  113. ctx.Injector.HeadHTML(`
  114. <link rel="stylesheet" href="/assets/main.css">
  115. `)
  116. ctx.Injector.Title(cp.title)
  117. ctx.Injector.HeadHTML(`
  118. <script src='/assets/vue.js'></script>
  119. <script src='/assets/codehighlight.js'></script>
  120. `)
  121. ctx.Injector.TailHTML(coreJSTags)
  122. var innerPr web.PageResponse
  123. innerPr, err = in(ctx)
  124. if err != nil {
  125. panic(err)
  126. }
  127. demo := innerPr.Body
  128. ctx.Injector.HeadHTML(`
  129. <style>
  130. [v-cloak] {
  131. display: none;
  132. }
  133. </style>
  134. `)
  135. pr.Body = Components(
  136. Div(
  137. header(),
  138. Div(
  139. Div(
  140. menuLinks(prefix, secs),
  141. Article(demo.(HTMLComponent)).Class("page-content g-9").Role("main"),
  142. ).Class("g-grid"),
  143. ).Class("g-layout global-content"),
  144. ).Class("global-layout"),
  145. footer(),
  146. )
  147. return
  148. }
  149. }
  150. // @snippet_begin(DemoLayoutSample)
  151. func demoLayout(in web.PageFunc) (out web.PageFunc) {
  152. return func(ctx *web.EventContext) (pr web.PageResponse, err error) {
  153. addGA(ctx)
  154. ctx.Injector.HeadHTML(`
  155. <script src='/assets/vue.js'></script>
  156. `)
  157. ctx.Injector.TailHTML(coreJSTags)
  158. ctx.Injector.HeadHTML(`
  159. <style>
  160. [v-cloak] {
  161. display: none;
  162. }
  163. </style>
  164. `)
  165. var innerPr web.PageResponse
  166. innerPr, err = in(ctx)
  167. if err != nil {
  168. panic(err)
  169. }
  170. pr.Body = innerPr.Body
  171. return
  172. }
  173. }
  174. // @snippet_end
  175. // @snippet_begin(TipTapLayoutSample)
  176. func tiptapLayout(in web.PageFunc) (out web.PageFunc) {
  177. return func(ctx *web.EventContext) (pr web.PageResponse, err error) {
  178. addGA(ctx)
  179. ctx.Injector.HeadHTML(`
  180. <link rel="stylesheet" href="/assets/tiptap.css">
  181. <script src='/assets/vue.js'></script>
  182. `)
  183. ctx.Injector.TailHTML(`
  184. <script src='/assets/tiptap.js'></script>
  185. <script src='/assets/main.js'></script>
  186. `)
  187. ctx.Injector.HeadHTML(`
  188. <style>
  189. [v-cloak] {
  190. display: none;
  191. }
  192. </style>
  193. `)
  194. var innerPr web.PageResponse
  195. innerPr, err = in(ctx)
  196. if err != nil {
  197. panic(err)
  198. }
  199. pr.Body = innerPr.Body
  200. return
  201. }
  202. }
  203. // @snippet_end
  204. // @snippet_begin(DemoBootstrapLayoutSample)
  205. func demoBootstrapLayout(in web.PageFunc) (out web.PageFunc) {
  206. return func(ctx *web.EventContext) (pr web.PageResponse, err error) {
  207. addGA(ctx)
  208. ctx.Injector.HeadHTML(`
  209. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  210. <script src='/assets/vue.js'></script>
  211. `)
  212. ctx.Injector.TailHTML(`
  213. <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
  214. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
  215. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
  216. <script src='/assets/main.js'></script>
  217. `)
  218. ctx.Injector.HeadHTML(`
  219. <style>
  220. [v-cloak] {
  221. display: none;
  222. }
  223. </style>
  224. `)
  225. var innerPr web.PageResponse
  226. innerPr, err = in(ctx)
  227. if err != nil {
  228. panic(err)
  229. }
  230. pr.Body = innerPr.Body
  231. return
  232. }
  233. }
  234. // @snippet_end
  235. var coreJSTags = func() string {
  236. if len(os.Getenv("DEV_CORE_JS")) > 0 {
  237. return `
  238. <script src='http://localhost:3100/js/chunk-vendors.js'></script>
  239. <script src='http://localhost:3100/js/app.js'></script>
  240. `
  241. }
  242. return `<script src='/assets/main.js'></script>`
  243. }()
  244. var vuetifyJSTags = func() string {
  245. if len(os.Getenv("DEV_VUETIFY_JS")) > 0 {
  246. return `
  247. <script src='http://localhost:3080/js/chunk-vendors.js'></script>
  248. <script src='http://localhost:3080/js/app.js'></script>
  249. `
  250. }
  251. return `<script src='/assets/vuetify.js'></script>`
  252. }()
  253. // @snippet_begin(DemoVuetifyLayoutSample)
  254. func demoVuetifyLayout(in web.PageFunc) (out web.PageFunc) {
  255. return func(ctx *web.EventContext) (pr web.PageResponse, err error) {
  256. addGA(ctx)
  257. ctx.Injector.HeadHTML(`
  258. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono" async>
  259. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" async>
  260. <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" async>
  261. <link rel="stylesheet" href="/assets/vuetify.css">
  262. <script src='/assets/vue.js'></script>
  263. `)
  264. ctx.Injector.TailHTML(fmt.Sprintf("%s %s", vuetifyJSTags, coreJSTags))
  265. ctx.Injector.HeadHTML(`
  266. <style>
  267. [v-cloak] {
  268. display: none;
  269. }
  270. </style>
  271. `)
  272. var innerPr web.PageResponse
  273. innerPr, err = in(ctx)
  274. if err != nil {
  275. panic(err)
  276. }
  277. pr.Body = v.VApp(
  278. v.VMain(
  279. innerPr.Body,
  280. ),
  281. )
  282. return
  283. }
  284. }
  285. // @snippet_end
  286. func rf(comp HTMLComponent, p *pageItem) web.PageFunc {
  287. return func(ctx *web.EventContext) (r web.PageResponse, err error) {
  288. r.Body = Components(
  289. utils.Anchor(H1(""), p.title),
  290. comp,
  291. )
  292. return
  293. }
  294. }
  295. func Mux(prefix string) http.Handler {
  296. // @snippet_begin(HelloWorldMuxSample1)
  297. mux := http.NewServeMux()
  298. // @snippet_end
  299. // @snippet_begin(ComponentsPackSample)
  300. mux.Handle("/assets/main.js",
  301. web.PacksHandler("text/javascript",
  302. web.JSComponentsPack(),
  303. ),
  304. )
  305. mux.Handle("/assets/vue.js",
  306. web.PacksHandler("text/javascript",
  307. web.JSVueComponentsPack(),
  308. ),
  309. )
  310. // @snippet_end
  311. // @snippet_begin(TipTapComponentsPackSample)
  312. mux.Handle("/assets/tiptap.js",
  313. web.PacksHandler("text/javascript",
  314. tiptap.JSComponentsPack(),
  315. ),
  316. )
  317. mux.Handle("/assets/tiptap.css",
  318. web.PacksHandler("text/css",
  319. tiptap.CSSComponentsPack(),
  320. ),
  321. )
  322. // @snippet_end
  323. // @snippet_begin(VuetifyComponentsPackSample)
  324. mux.Handle("/assets/vuetify.js",
  325. web.PacksHandler("text/javascript",
  326. v.Vuetify(""),
  327. v.JSComponentsPack(),
  328. vuetifyx.JSComponentsPack(),
  329. ),
  330. )
  331. mux.Handle("/assets/vuetify.css",
  332. web.PacksHandler("text/css",
  333. v.CSSComponentsPack(),
  334. ),
  335. )
  336. // @snippet_end
  337. mux.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
  338. w.Write(favicon)
  339. return
  340. })
  341. samplesMux := SamplesHandler(prefix)
  342. mux.Handle("/samples/",
  343. middleware.Logger(
  344. middleware.RequestID(
  345. samplesMux,
  346. ),
  347. ),
  348. )
  349. mux.Handle("/", docgo.New().
  350. MainPageTitle("QOR5 Document").
  351. Assets("/assets/", Assets).
  352. DocTree(DocTree...).
  353. Build(),
  354. )
  355. return mux
  356. }
  357. func SamplesHandler(prefix string) http.Handler {
  358. mux := http.NewServeMux()
  359. emptyUb := web.New().LayoutFunc(web.NoopLayoutFunc)
  360. mux.Handle(e00_basics.TypeSafeBuilderSamplePath, e00_basics.TypeSafeBuilderSamplePFPB.Builder(emptyUb))
  361. // @snippet_begin(HelloWorldMuxSample2)
  362. mux.Handle(e00_basics.HelloWorldPath, e00_basics.HelloWorldPB)
  363. // @snippet_end
  364. // @snippet_begin(HelloWorldReloadMuxSample1)
  365. mux.Handle(
  366. e00_basics.HelloWorldReloadPath,
  367. e00_basics.HelloWorldReloadPB.Wrap(demoLayout),
  368. )
  369. // @snippet_end
  370. mux.Handle(
  371. e00_basics.Page1Path,
  372. e00_basics.Page1PB.Wrap(demoLayout),
  373. )
  374. mux.Handle(
  375. e00_basics.Page2Path,
  376. e00_basics.Page2PB.Wrap(demoLayout),
  377. )
  378. mux.Handle(
  379. e00_basics.ReloadWithFlashPath,
  380. e00_basics.ReloadWithFlashPB.Wrap(demoLayout),
  381. )
  382. mux.Handle(
  383. e00_basics.PartialUpdatePagePath,
  384. e00_basics.PartialUpdatePagePB.Wrap(demoLayout),
  385. )
  386. mux.Handle(
  387. e00_basics.PartialReloadPagePath,
  388. e00_basics.PartialReloadPagePB.Wrap(demoLayout),
  389. )
  390. mux.Handle(
  391. e00_basics.MultiStatePagePath,
  392. e00_basics.MultiStatePagePB.Wrap(demoLayout),
  393. )
  394. mux.Handle(
  395. e00_basics.FormHandlingPagePath,
  396. e00_basics.FormHandlingPagePB.Wrap(demoLayout),
  397. )
  398. mux.Handle(
  399. e00_basics.CompositeComponentSample1PagePath,
  400. e00_basics.CompositeComponentSample1PagePB.Wrap(demoBootstrapLayout),
  401. )
  402. mux.Handle(
  403. e00_basics.HelloWorldTipTapPath,
  404. e00_basics.HelloWorldTipTapPB.Wrap(tiptapLayout),
  405. )
  406. mux.Handle(
  407. e13_vuetify_list.HelloVuetifyListPath,
  408. e13_vuetify_list.HelloVuetifyListPB.Wrap(demoVuetifyLayout),
  409. )
  410. mux.Handle(
  411. e14_vuetify_menu.HelloVuetifyMenuPath,
  412. e14_vuetify_menu.HelloVuetifyMenuPB.Wrap(demoVuetifyLayout),
  413. )
  414. mux.Handle(
  415. e00_basics.EventExamplePagePath,
  416. e00_basics.ExamplePagePB.Wrap(demoVuetifyLayout),
  417. )
  418. mux.Handle(
  419. e00_basics.EventHandlingPagePath,
  420. e00_basics.EventHandlingPagePB.Wrap(demoVuetifyLayout),
  421. )
  422. mux.Handle(
  423. e00_basics.WebScopeUseLocalsPagePath,
  424. e00_basics.UseLocalsPB.Wrap(demoVuetifyLayout),
  425. )
  426. mux.Handle(
  427. e00_basics.WebScopeUsePlaidFormPagePath,
  428. e00_basics.UsePlaidFormPB.Wrap(demoVuetifyLayout),
  429. )
  430. mux.Handle(
  431. e00_basics.ShortCutSamplePath,
  432. e00_basics.ShortCutSamplePB.Wrap(demoVuetifyLayout),
  433. )
  434. mux.Handle(
  435. e11_vuetify_basic_inputs.VuetifyBasicInputsPath,
  436. e11_vuetify_basic_inputs.VuetifyBasicInputsPB.Wrap(demoVuetifyLayout),
  437. )
  438. mux.Handle(
  439. e10_vuetify_autocomplete.VuetifyAutoCompletePath,
  440. e10_vuetify_autocomplete.VuetifyAutocompletePB.Wrap(demoVuetifyLayout),
  441. )
  442. mux.Handle(
  443. e10_vuetify_autocomplete.VuetifyAutoCompletePresetPath+"/",
  444. e10_vuetify_autocomplete.ExamplePreset,
  445. )
  446. mux.Handle(
  447. e22_vuetify_variant_sub_form.VuetifyVariantSubFormPath,
  448. e22_vuetify_variant_sub_form.VuetifyVariantSubFormPB.Wrap(demoVuetifyLayout),
  449. )
  450. mux.Handle(
  451. e23_vuetify_components_kitchen.VuetifyComponentsKitchenPath,
  452. e23_vuetify_components_kitchen.VuetifyComponentsKitchenPB.Wrap(demoVuetifyLayout),
  453. )
  454. mux.Handle(
  455. e15_vuetify_navigation_drawer.VuetifyNavigationDrawerPath,
  456. e15_vuetify_navigation_drawer.VuetifyNavigationDrawerPB.Wrap(demoVuetifyLayout),
  457. )
  458. mux.Handle(
  459. e17_hello_lazy_portals_and_reload.LazyPortalsAndReloadPath,
  460. e17_hello_lazy_portals_and_reload.LazyPortalsAndReloadPB.Wrap(demoVuetifyLayout),
  461. )
  462. mux.Handle(
  463. e24_vuetify_components_linkage_select.VuetifyComponentsLinkageSelectPath,
  464. e24_vuetify_components_linkage_select.VuetifyComponentsLinkageSelectPB.Wrap(demoVuetifyLayout),
  465. )
  466. // @snippet_begin(MountPresetHelloWorldSample)
  467. c00 := presets.New().AssetFunc(addGA)
  468. e21_presents.PresetsHelloWorld(c00)
  469. mux.Handle(
  470. e21_presents.PresetsHelloWorldPath+"/",
  471. c00,
  472. )
  473. // @snippet_end
  474. c01 := presets.New().AssetFunc(addGA)
  475. e21_presents.PresetsListingCustomizationFields(c01)
  476. mux.Handle(
  477. e21_presents.PresetsListingCustomizationFieldsPath+"/",
  478. c01,
  479. )
  480. c02 := presets.New().AssetFunc(addGA)
  481. e21_presents.PresetsListingCustomizationFilters(c02)
  482. mux.Handle(
  483. e21_presents.PresetsListingCustomizationFiltersPath+"/",
  484. c02,
  485. )
  486. c03 := presets.New().AssetFunc(addGA)
  487. e21_presents.PresetsListingCustomizationTabs(c03)
  488. mux.Handle(
  489. e21_presents.PresetsListingCustomizationTabsPath+"/",
  490. c03,
  491. )
  492. c04 := presets.New().AssetFunc(addGA)
  493. e21_presents.PresetsListingCustomizationBulkActions(c04)
  494. mux.Handle(
  495. e21_presents.PresetsListingCustomizationBulkActionsPath+"/",
  496. c04,
  497. )
  498. c05 := presets.New().AssetFunc(addGA)
  499. e21_presents.PresetsEditingCustomizationDescription(c05)
  500. mux.Handle(
  501. e21_presents.PresetsEditingCustomizationDescriptionPath+"/",
  502. c05,
  503. )
  504. c06 := presets.New().AssetFunc(addGA)
  505. e21_presents.PresetsEditingCustomizationFileType(c06)
  506. mux.Handle(
  507. e21_presents.PresetsEditingCustomizationFileTypePath+"/",
  508. c06,
  509. )
  510. c07 := presets.New().AssetFunc(addGA)
  511. e21_presents.PresetsEditingCustomizationValidation(c07)
  512. mux.Handle(
  513. e21_presents.PresetsEditingCustomizationValidationPath+"/",
  514. c07,
  515. )
  516. c08 := presets.New().AssetFunc(addGA)
  517. e21_presents.PresetsDetailPageTopNotes(c08)
  518. mux.Handle(
  519. e21_presents.PresetsDetailPageTopNotesPath+"/",
  520. c08,
  521. )
  522. c09 := presets.New().AssetFunc(addGA)
  523. e21_presents.PresetsDetailPageDetails(c09)
  524. mux.Handle(
  525. e21_presents.PresetsDetailPageDetailsPath+"/",
  526. c09,
  527. )
  528. c10 := presets.New().AssetFunc(addGA)
  529. e21_presents.PresetsDetailPageCards(c10)
  530. mux.Handle(
  531. e21_presents.PresetsDetailPageCardsPath+"/",
  532. c10,
  533. )
  534. c11 := presets.New().AssetFunc(addGA)
  535. e21_presents.PresetsPermissions(c11)
  536. mux.Handle(
  537. e21_presents.PresetsPermissionsPath+"/",
  538. c11,
  539. )
  540. c12 := presets.New().AssetFunc(addGA)
  541. e21_presents.PresetsModelBuilderExtensions(c12)
  542. mux.Handle(
  543. e21_presents.PresetsModelBuilderExtensionsPath+"/",
  544. c12,
  545. )
  546. c13 := presets.New().AssetFunc(addGA)
  547. example_basics.PresetsBasicFilter(c13)
  548. mux.Handle(
  549. example_basics.PresetsBasicFilterPath+"/",
  550. c13,
  551. )
  552. c14 := presets.New().AssetFunc(addGA)
  553. e21_presents.PresetsNotificationCenterSample(c14)
  554. mux.Handle(
  555. e21_presents.NotificationCenterSamplePath+"/",
  556. c14,
  557. )
  558. c15 := presets.New().AssetFunc(addGA)
  559. e21_presents.PresetsLinkageSelectFilterItem(c15)
  560. mux.Handle(
  561. e21_presents.PresetsLinkageSelectFilterItemPath+"/",
  562. c15,
  563. )
  564. c16 := presets.New().AssetFunc(addGA)
  565. example_basics.ListingSample(c16)
  566. mux.Handle(
  567. example_basics.ListingSamplePath+"/",
  568. c16,
  569. )
  570. c17 := presets.New().AssetFunc(addGA)
  571. e21_presents.PresetsBrandTitle(c17)
  572. mux.Handle(
  573. e21_presents.PresetsBrandTitlePath+"/",
  574. c17,
  575. )
  576. c18 := presets.New().AssetFunc(addGA)
  577. e21_presents.PresetsBrandFunc(c18)
  578. mux.Handle(
  579. e21_presents.PresetsBrandFuncPath+"/",
  580. c18,
  581. )
  582. c19 := presets.New().AssetFunc(addGA)
  583. e21_presents.PresetsProfile(c19)
  584. mux.Handle(
  585. e21_presents.PresetsProfilePath+"/",
  586. c19,
  587. )
  588. c20 := presets.New().AssetFunc(addGA)
  589. e21_presents.PresetsOrderMenu(c20)
  590. mux.Handle(
  591. e21_presents.PresetsMenuOrderPath+"/",
  592. c20,
  593. )
  594. c21 := presets.New().AssetFunc(addGA)
  595. e21_presents.PresetsGroupMenu(c21)
  596. mux.Handle(
  597. e21_presents.PresetsMenuGroupPath+"/",
  598. c21,
  599. )
  600. c22 := presets.New().AssetFunc(addGA)
  601. example_basics.PresetsConfirmDialog(c22)
  602. mux.Handle(
  603. example_basics.PresetsConfirmDialogPath+"/",
  604. c22,
  605. )
  606. c23 := presets.New().AssetFunc(addGA)
  607. example_basics.WorkerExampleMock(c23)
  608. mux.Handle(
  609. example_basics.WorkerExamplePath+"/",
  610. c23,
  611. )
  612. c24 := presets.New().AssetFunc(addGA)
  613. example_basics.ActionWorkerExampleMock(c24)
  614. mux.Handle(
  615. example_basics.ActionWorkerExamplePath+"/",
  616. c24,
  617. )
  618. c25 := presets.New().AssetFunc(addGA)
  619. example_basics.LocalizationExampleMock(c25)
  620. mux.Handle(
  621. example_basics.LocalizationExamplePath+"/",
  622. c25,
  623. )
  624. return mux
  625. }