waibu-db 2.33.1 → 2.34.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.
Files changed (135) hide show
  1. package/.github/FUNDING.yml +0 -0
  2. package/.github/workflows/repo-lockdown.yml +0 -0
  3. package/.jsdoc.conf.json +0 -0
  4. package/LICENSE +0 -0
  5. package/README.md +0 -0
  6. package/docs/WaibuDb.html +0 -0
  7. package/docs/data/search.json +0 -0
  8. package/docs/external-DoboModel.html +0 -0
  9. package/docs/external-TFilter.html +0 -0
  10. package/docs/external-TOptions.html +0 -0
  11. package/docs/fonts/Inconsolata-Regular.ttf +0 -0
  12. package/docs/fonts/OpenSans-Regular.ttf +0 -0
  13. package/docs/fonts/WorkSans-Bold.ttf +0 -0
  14. package/docs/global.html +0 -0
  15. package/docs/index.html +0 -0
  16. package/docs/index.js.html +0 -0
  17. package/docs/lib_config.js.html +0 -0
  18. package/docs/lib_crud_add-handler.js.html +0 -0
  19. package/docs/lib_crud_all-handler.js.html +0 -0
  20. package/docs/lib_crud_delete-handler.js.html +0 -0
  21. package/docs/lib_crud_details-handler.js.html +0 -0
  22. package/docs/lib_crud_edit-handler.js.html +0 -0
  23. package/docs/lib_crud_export-handler.js.html +0 -0
  24. package/docs/lib_crud_helper.js.html +0 -0
  25. package/docs/lib_crud_list-handler.js.html +0 -0
  26. package/docs/lib_util.js.html +0 -0
  27. package/docs/module-CRUDHandler.html +0 -0
  28. package/docs/module-CRUDHandler_Helper.html +0 -0
  29. package/docs/module-Helper.html +0 -0
  30. package/docs/module-Helper_CRUDHandler.html +0 -0
  31. package/docs/scripts/core.js +0 -0
  32. package/docs/scripts/core.min.js +0 -0
  33. package/docs/scripts/resize.js +0 -0
  34. package/docs/scripts/search.js +0 -0
  35. package/docs/scripts/search.min.js +5 -5
  36. package/docs/scripts/third-party/Apache-License-2.0.txt +0 -0
  37. package/docs/scripts/third-party/fuse.js +0 -0
  38. package/docs/scripts/third-party/hljs-line-num-original.js +0 -0
  39. package/docs/scripts/third-party/hljs-line-num.js +0 -0
  40. package/docs/scripts/third-party/hljs-original.js +0 -0
  41. package/docs/scripts/third-party/hljs.js +0 -0
  42. package/docs/scripts/third-party/popper.js +0 -0
  43. package/docs/scripts/third-party/tippy.js +0 -0
  44. package/docs/scripts/third-party/tocbot.js +0 -0
  45. package/docs/scripts/third-party/tocbot.min.js +0 -0
  46. package/docs/static/bitcoin.jpeg +0 -0
  47. package/docs/static/home.md +0 -0
  48. package/docs/static/logo-ecosystem.png +0 -0
  49. package/docs/static/logo.png +0 -0
  50. package/docs/styles/clean-jsdoc-theme-base.css +0 -0
  51. package/docs/styles/clean-jsdoc-theme-dark.css +0 -0
  52. package/docs/styles/clean-jsdoc-theme-light.css +0 -0
  53. package/docs/styles/clean-jsdoc-theme-scrollbar.css +0 -0
  54. package/docs/styles/clean-jsdoc-theme-without-scrollbar.min.css +0 -0
  55. package/docs/styles/clean-jsdoc-theme.min.css +0 -0
  56. package/extend/bajo/hook/waibu-rest-api@after-init.js +0 -0
  57. package/extend/bajo/intl/en-US.json +0 -0
  58. package/extend/bajo/intl/id.json +0 -0
  59. package/extend/bajoTemplate/partial/crud/_add-attachment.html +0 -0
  60. package/extend/bajoTemplate/partial/crud/_add-btns.html +0 -0
  61. package/extend/bajoTemplate/partial/crud/_addons.html +0 -0
  62. package/extend/bajoTemplate/partial/crud/_details-attachment.html +0 -0
  63. package/extend/bajoTemplate/partial/crud/_details-btns.html +0 -0
  64. package/extend/bajoTemplate/partial/crud/_edit-attachment.html +0 -0
  65. package/extend/bajoTemplate/partial/crud/_edit-btns.html +0 -0
  66. package/extend/bajoTemplate/partial/crud/_list-attachment.html +0 -0
  67. package/extend/bajoTemplate/partial/crud/_list-btns.html +0 -0
  68. package/extend/bajoTemplate/partial/crud/_list-footer.html +0 -0
  69. package/extend/bajoTemplate/partial/crud/_list-warnings.html +9 -9
  70. package/extend/bajoTemplate/partial/crud/add-handler.html +0 -0
  71. package/extend/bajoTemplate/partial/crud/details-handler.html +0 -0
  72. package/extend/bajoTemplate/partial/crud/edit-handler.html +0 -0
  73. package/extend/bajoTemplate/partial/crud/list-handler.html +0 -0
  74. package/extend/bajoTemplate/partial/crud/not-found.html +0 -0
  75. package/extend/bajoTemplate/partial/crud/~echarts-window.html +0 -0
  76. package/extend/bajoTemplate/template/crud/add.html +0 -0
  77. package/extend/bajoTemplate/template/crud/details.html +0 -0
  78. package/extend/bajoTemplate/template/crud/edit.html +0 -0
  79. package/extend/bajoTemplate/template/crud/list.html +0 -0
  80. package/extend/bajoTemplate/template/crud/not-found.html +0 -0
  81. package/extend/bajoTemplate/template/disabled.html +0 -0
  82. package/extend/sumba/route/secure.json +3 -3
  83. package/extend/waibuBootstrap/theme/component/wdb-base.js +0 -0
  84. package/extend/waibuBootstrap/theme/component/widget/btn-add.js +0 -0
  85. package/extend/waibuBootstrap/theme/component/widget/btn-back.js +0 -0
  86. package/extend/waibuBootstrap/theme/component/widget/btn-clone.js +0 -0
  87. package/extend/waibuBootstrap/theme/component/widget/btn-columns.js +0 -0
  88. package/extend/waibuBootstrap/theme/component/widget/btn-delete.js +0 -0
  89. package/extend/waibuBootstrap/theme/component/widget/btn-details.js +0 -0
  90. package/extend/waibuBootstrap/theme/component/widget/btn-edit.js +0 -0
  91. package/extend/waibuBootstrap/theme/component/widget/btn-export.js +0 -0
  92. package/extend/waibuBootstrap/theme/component/widget/data-table.js +0 -0
  93. package/extend/waibuBootstrap/theme/component/widget/echarts-bar.js +0 -0
  94. package/extend/waibuBootstrap/theme/component/widget/echarts-pie.js +0 -0
  95. package/extend/waibuBootstrap/theme/component/widget/echarts.js +0 -0
  96. package/extend/waibuBootstrap/theme/component/widget/form.js +0 -0
  97. package/extend/waibuBootstrap/theme/component/widget/lookup-select.js +40 -40
  98. package/extend/waibuBootstrap/theme/component/widget/pagination.js +0 -0
  99. package/extend/waibuBootstrap/theme/component/widget/query.js +0 -0
  100. package/extend/waibuBootstrap/theme/component/widget/recs-info.js +0 -0
  101. package/extend/waibuMpa/extend/waibuAdmin/route/@model/@action.js +0 -0
  102. package/extend/waibuMpa/extend/waibuAdmin/route/index.js +11 -11
  103. package/extend/waibuRestApi/route/@model/@id/get.js +0 -0
  104. package/extend/waibuRestApi/route/@model/@id/remove.js +0 -0
  105. package/extend/waibuRestApi/route/@model/@id/update.js +0 -0
  106. package/extend/waibuRestApi/route/@model/create.js +0 -0
  107. package/extend/waibuRestApi/route/@model/find.js +0 -0
  108. package/extend/waibuRestApi/route/@model/stat/@stat/find.js +0 -0
  109. package/extend/waibuRestApi/route/lookup/@model/model-builder.json +0 -0
  110. package/index.js +0 -0
  111. package/lib/config.js +45 -45
  112. package/lib/crud/add-handler.js +0 -0
  113. package/lib/crud/all-handler.js +0 -0
  114. package/lib/crud/delete-handler.js +0 -0
  115. package/lib/crud/details-handler.js +0 -0
  116. package/lib/crud/edit-handler.js +0 -0
  117. package/lib/crud/export-handler.js +0 -0
  118. package/lib/crud/helper.js +115 -115
  119. package/lib/crud/list-handler.js +0 -0
  120. package/lib/method/aggregate.js +0 -0
  121. package/lib/method/count-record.js +0 -0
  122. package/lib/method/create-record.js +0 -0
  123. package/lib/method/find-all-record.js +0 -0
  124. package/lib/method/find-one-record.js +0 -0
  125. package/lib/method/find-record.js +0 -0
  126. package/lib/method/get-record.js +0 -0
  127. package/lib/method/get-schema-ext.js +1 -1
  128. package/lib/method/histogram.js +0 -0
  129. package/lib/method/remove-record.js +0 -0
  130. package/lib/method/update-record.js +0 -0
  131. package/lib/util.js +1 -0
  132. package/package.json +1 -1
  133. package/wiki/CHANGES.md +357 -353
  134. package/wiki/CONFIG.md +0 -0
  135. package/wiki/CONTRIBUTING.md +0 -0
File without changes
File without changes
package/.jsdoc.conf.json CHANGED
File without changes
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
package/docs/WaibuDb.html CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/docs/global.html CHANGED
File without changes
package/docs/index.html CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,6 +1,6 @@
1
- const searchId="LiBfqbJVcV",searchHash="#"+searchId,searchContainer=document.querySelector("#PkfLWpAbet"),searchWrapper=document.querySelector("#iCxFxjkHbP"),searchCloseButton=document.querySelector("#VjLlGakifb"),searchInput=document.querySelector("#vpcKVYIppa"),resultBox=document.querySelector("#fWwVHRuDuN");function showResultText(e){resultBox.innerHTML=`<span class="search-result-c-text">${e}</span>`}function hideSearch(){window.location.hash===searchHash&&history.go(-1),window.onhashchange=null,searchContainer&&(searchContainer.style.display="none")}function listenCloseKey(e){"Escape"===e.key&&(hideSearch(),window.removeEventListener("keyup",listenCloseKey))}function showSearch(){try{hideMobileMenu()}catch(e){console.error(e)}window.onhashchange=hideSearch,window.location.hash!==searchHash&&history.pushState(null,null,searchHash),searchContainer&&(searchContainer.style.display="flex",window.addEventListener("keyup",listenCloseKey)),searchInput&&searchInput.focus()}async function fetchAllData(){var{hostname:e,protocol:t,port:n}=location,t=t+"//"+e+(""!==n?":"+n:"")+baseURL,e=new URL("data/search.json",t);const a=await fetch(e);n=(await a.json()).list;return n}function onClickSearchItem(t){const n=t.currentTarget;if(n){const a=n.getAttribute("href")||"";t=a.split("#")[1]||"";let e=document.getElementById(t);e||(t=decodeURI(t),e=document.getElementById(t)),e&&setTimeout(function(){bringElementIntoView(e)},100)}}function buildSearchResult(e){let t="";var n=/(<([^>]+)>)/gi;for(const s of e){const{title:c="",description:i=""}=s.item;var a=s.item.link.replace('<a href="',"").replace(/">.*/,""),o=c.replace(n,""),r=i.replace(n,"");t+=`
2
- <a onclick="onClickSearchItem(event)" href="${a}" class="search-result-item">
3
- <div class="search-result-item-title">${o}</div>
4
- <div class="search-result-item-p">${r||"No description available."}</div>
5
- </a>
1
+ const searchId="LiBfqbJVcV",searchHash="#"+searchId,searchContainer=document.querySelector("#PkfLWpAbet"),searchWrapper=document.querySelector("#iCxFxjkHbP"),searchCloseButton=document.querySelector("#VjLlGakifb"),searchInput=document.querySelector("#vpcKVYIppa"),resultBox=document.querySelector("#fWwVHRuDuN");function showResultText(e){resultBox.innerHTML=`<span class="search-result-c-text">${e}</span>`}function hideSearch(){window.location.hash===searchHash&&history.go(-1),window.onhashchange=null,searchContainer&&(searchContainer.style.display="none")}function listenCloseKey(e){"Escape"===e.key&&(hideSearch(),window.removeEventListener("keyup",listenCloseKey))}function showSearch(){try{hideMobileMenu()}catch(e){console.error(e)}window.onhashchange=hideSearch,window.location.hash!==searchHash&&history.pushState(null,null,searchHash),searchContainer&&(searchContainer.style.display="flex",window.addEventListener("keyup",listenCloseKey)),searchInput&&searchInput.focus()}async function fetchAllData(){var{hostname:e,protocol:t,port:n}=location,t=t+"//"+e+(""!==n?":"+n:"")+baseURL,e=new URL("data/search.json",t);const a=await fetch(e);n=(await a.json()).list;return n}function onClickSearchItem(t){const n=t.currentTarget;if(n){const a=n.getAttribute("href")||"";t=a.split("#")[1]||"";let e=document.getElementById(t);e||(t=decodeURI(t),e=document.getElementById(t)),e&&setTimeout(function(){bringElementIntoView(e)},100)}}function buildSearchResult(e){let t="";var n=/(<([^>]+)>)/gi;for(const s of e){const{title:c="",description:i=""}=s.item;var a=s.item.link.replace('<a href="',"").replace(/">.*/,""),o=c.replace(n,""),r=i.replace(n,"");t+=`
2
+ <a onclick="onClickSearchItem(event)" href="${a}" class="search-result-item">
3
+ <div class="search-result-item-title">${o}</div>
4
+ <div class="search-result-item-p">${r||"No description available."}</div>
5
+ </a>
6
6
  `}return t}function getSearchResult(e,t,n){var t={...{shouldSort:!0,threshold:.4,location:0,distance:100,maxPatternLength:32,minMatchCharLength:1,keys:t}},a=Fuse.createIndex(t.keys,e);const o=new Fuse(e,t,a),r=o.search(n);return 20<r.length?r.slice(0,20):r}function debounce(t,n,a){let o;return function(){const e=arguments;clearTimeout(o),o=setTimeout(()=>{o=null,a||t.apply(this,e)},n),a&&!o&&t.apply(this,e)}}let searchData;async function search(e){e=e.target.value;if(resultBox)if(e){if(!searchData){showResultText("Loading...");try{searchData=await fetchAllData()}catch(e){return console.log(e),void showResultText("Failed to load result.")}}e=getSearchResult(searchData,["title","description"],e);e.length?resultBox.innerHTML=buildSearchResult(e):showResultText("No result found! Try some different combination.")}else showResultText("Type anything to view search result");else console.error("Search result container not found")}function onDomContentLoaded(){const e=document.querySelectorAll(".search-button");var t=debounce(search,300);searchCloseButton&&searchCloseButton.addEventListener("click",hideSearch),e&&e.forEach(function(e){e.addEventListener("click",showSearch)}),searchContainer&&searchContainer.addEventListener("click",hideSearch),searchWrapper&&searchWrapper.addEventListener("click",function(e){e.stopPropagation()}),searchInput&&searchInput.addEventListener("keyup",t),window.location.hash===searchHash&&showSearch()}window.addEventListener("DOMContentLoaded",onDomContentLoaded),window.addEventListener("hashchange",function(){window.location.hash===searchHash&&showSearch()});
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,10 +1,10 @@
1
- <% if ((list.warnings ?? []).length > 0) { %>
2
- <c:div padding="all-3">
3
- <c:div><%= _t('warning') %>:</c:div>
4
- <c:ul>
5
- <% list.warnings.forEach(warning => { %>
6
- <c:li><%= warning %></c:li>
7
- <% }) %>
8
- </c:ul>
9
- </c:div>
1
+ <% if ((list.warnings ?? []).length > 0) { %>
2
+ <c:div padding="all-3">
3
+ <c:div><%= _t('warning') %>:</c:div>
4
+ <c:ul>
5
+ <% list.warnings.forEach(warning => { %>
6
+ <c:li><%= warning %></c:li>
7
+ <% }) %>
8
+ </c:ul>
9
+ </c:div>
10
10
  <% } %>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,4 +1,4 @@
1
- [
2
- "/**/*",
3
- "restapi:/**/*"
1
+ [
2
+ "/**/*",
3
+ "restapi:/**/*"
4
4
  ]
File without changes
@@ -1,40 +1,40 @@
1
- import wdbBase from '../wdb-base.js'
2
-
3
- async function lookupSelect () {
4
- const WdbBase = await wdbBase.call(this)
5
-
6
- return class WdbLookupSelect extends WdbBase {
7
- constructor (options) {
8
- super(options)
9
- this.params.noTag = true
10
- }
11
-
12
- build = async () => {
13
- const { isEmpty, get, omit, set, camelCase, kebabCase } = this.app.lib._
14
- const { parseQuery } = this.app.dobo
15
- const { base64JsonEncode } = this.app.waibu
16
- const ref = this.getRef({ field: this.params.attr.name, refName: this.getRefName(this.params.attr.name) })
17
- if (isEmpty(ref)) {
18
- const sentence = `<c:form-input ${Object.entries(this.params.attr).map(([k, v]) => `${kebabCase(k)}="${v}"`).join(' ')} />`
19
- this.params.html = await this.component.buildSentence(sentence, this.component.locals)
20
- return
21
- }
22
-
23
- this.params.attr.url = this.params.attr.url ?? `waibuDb.restapi:/lookup/${kebabCase(ref.model)}`
24
- const keys = ['url', 'searchField', 'labelField', 'valueField', 'allowCreate']
25
- const attr = omit(this.params.attr, keys)
26
- for (const k of keys) {
27
- attr[camelCase(`remote ${k}`)] = this.params.attr[k] ?? ref[k] ?? ref.field
28
- }
29
- const q = set({}, this.params.attr.searchField ?? get(ref, 'searchField', 'id'), ['__REGEXP__', '{searchItem}', 'i'])
30
- attr.remoteQuery = base64JsonEncode({ $and: [parseQuery(get(ref, 'query', {})), q] })
31
- attr.remoteApiKey = true
32
- attr.clearBtn = true
33
- const sentence = `<c:form-select-ext ${Object.entries(attr).map(([k, v]) => `${kebabCase(k)}="${v}"`).join(' ')} />`
34
- this.params.html = await this.component.buildSentence(sentence, this.component.locals)
35
- this.params.attr = omit(this.params.attr, ['model', 'field', ...keys])
36
- }
37
- }
38
- }
39
-
40
- export default lookupSelect
1
+ import wdbBase from '../wdb-base.js'
2
+
3
+ async function lookupSelect () {
4
+ const WdbBase = await wdbBase.call(this)
5
+
6
+ return class WdbLookupSelect extends WdbBase {
7
+ constructor (options) {
8
+ super(options)
9
+ this.params.noTag = true
10
+ }
11
+
12
+ build = async () => {
13
+ const { isEmpty, get, omit, set, camelCase, kebabCase } = this.app.lib._
14
+ const { parseQuery } = this.app.dobo
15
+ const { base64JsonEncode } = this.app.waibu
16
+ const ref = this.getRef({ field: this.params.attr.name, refName: this.getRefName(this.params.attr.name) })
17
+ if (isEmpty(ref)) {
18
+ const sentence = `<c:form-input ${Object.entries(this.params.attr).map(([k, v]) => `${kebabCase(k)}="${v}"`).join(' ')} />`
19
+ this.params.html = await this.component.buildSentence(sentence, this.component.locals)
20
+ return
21
+ }
22
+
23
+ this.params.attr.url = this.params.attr.url ?? `waibuDb.restapi:/lookup/${kebabCase(ref.model)}`
24
+ const keys = ['url', 'searchField', 'labelField', 'valueField', 'allowCreate']
25
+ const attr = omit(this.params.attr, keys)
26
+ for (const k of keys) {
27
+ attr[camelCase(`remote ${k}`)] = this.params.attr[k] ?? ref[k] ?? ref.field
28
+ }
29
+ const q = set({}, this.params.attr.searchField ?? get(ref, 'searchField', 'id'), ['__REGEXP__', '{searchItem}', 'i'])
30
+ attr.remoteQuery = base64JsonEncode({ $and: [parseQuery(get(ref, 'query', {})), q] })
31
+ attr.remoteApiKey = true
32
+ attr.clearBtn = true
33
+ const sentence = `<c:form-select-ext ${Object.entries(attr).map(([k, v]) => `${kebabCase(k)}="${v}"`).join(' ')} />`
34
+ this.params.html = await this.component.buildSentence(sentence, this.component.locals)
35
+ this.params.attr = omit(this.params.attr, ['model', 'field', ...keys])
36
+ }
37
+ }
38
+ }
39
+
40
+ export default lookupSelect
@@ -1,11 +1,11 @@
1
- async function index (req, reply) {
2
- const { kebabCase } = this.app.lib._
3
- const plugin = this.app.waibuDb
4
- const models = plugin.getAutoModels().map(m => m.name)
5
- const prefix = this.app.waibu.getPluginPrefix(plugin.ns)
6
- const params = { model: kebabCase(models[0]), action: 'list' }
7
- if (models.length > 0) return reply.redirectTo(`waibuAdmin:/${prefix}/:model/:action`, { params })
8
- throw this.error('_notFound')
9
- }
10
-
11
- export default index
1
+ async function index (req, reply) {
2
+ const { kebabCase } = this.app.lib._
3
+ const plugin = this.app.waibuDb
4
+ const models = plugin.getAutoModels().map(m => m.name)
5
+ const prefix = this.app.waibu.getPluginPrefix(plugin.ns)
6
+ const params = { model: kebabCase(models[0]), action: 'list' }
7
+ if (models.length > 0) return reply.redirectTo(`waibuAdmin:/${prefix}/:model/:action`, { params })
8
+ throw this.error('_notFound')
9
+ }
10
+
11
+ export default index
File without changes
File without changes
File without changes
File without changes
File without changes
package/index.js CHANGED
File without changes
package/lib/config.js CHANGED
@@ -1,45 +1,45 @@
1
- /**
2
- * Configuration object
3
- * @typedef TConfig
4
- * @type {object}
5
- * @property {object} [waibu={}] - Waibu configuration
6
- * @property {string} [waibu.prefix='db'] - Waibu prefix
7
- * @property {string} [waibu.title='dbModels'] - Waibu title
8
- * @property {object} [waibuAdmin={}] - Waibu Admin configuration
9
- * @property {boolean} [waibuAdmin.menuCollapsible=true] - Whether the menu is collapsible
10
- * @property {string} [waibuAdmin.menuHandler='waibuDb:adminMenu'] - Menu handler
11
- * @property {object} [waibuMpa={}] - Waibu MPA configuration
12
- * @property {string} [waibuMpa.icon='database'] - Icon for the MPA
13
- * @property {object} [dbModel={}] - Database model configuration
14
- * @property {boolean} [dbModel.count=false] - Whether to count records
15
- * @property {boolean} [dbModel.patchEnabled=false] - Whether patching is enabled
16
- * @property {object} [control={}] - Control configuration
17
- * @property {object} [control.wdbBtnColumns={}] - Configuration for the WDB button columns
18
- * @property {number} [control.wdbBtnColumns.menuMax=10] - Maximum number of menu items
19
- * @property {boolean} [enableRestApiForModel=false] - Whether to enable REST API for the model
20
- */
21
- const config = {
22
- waibu: {
23
- prefix: 'db',
24
- title: 'dbModels'
25
- },
26
- waibuAdmin: {
27
- menuCollapsible: true,
28
- menuHandler: 'waibuDb:adminMenu'
29
- },
30
- waibuMpa: {
31
- icon: 'database'
32
- },
33
- dbModel: {
34
- count: false,
35
- patchEnabled: false
36
- },
37
- control: {
38
- wdbBtnColumns: {
39
- menuMax: 10
40
- }
41
- },
42
- enableRestApiForModel: false
43
- }
44
-
45
- export default config
1
+ /**
2
+ * Configuration object
3
+ * @typedef TConfig
4
+ * @type {object}
5
+ * @property {object} [waibu={}] - Waibu configuration
6
+ * @property {string} [waibu.prefix='db'] - Waibu prefix
7
+ * @property {string} [waibu.title='dbModels'] - Waibu title
8
+ * @property {object} [waibuAdmin={}] - Waibu Admin configuration
9
+ * @property {boolean} [waibuAdmin.menuCollapsible=true] - Whether the menu is collapsible
10
+ * @property {string} [waibuAdmin.menuHandler='waibuDb:adminMenu'] - Menu handler
11
+ * @property {object} [waibuMpa={}] - Waibu MPA configuration
12
+ * @property {string} [waibuMpa.icon='database'] - Icon for the MPA
13
+ * @property {object} [dbModel={}] - Database model configuration
14
+ * @property {boolean} [dbModel.count=false] - Whether to count records
15
+ * @property {boolean} [dbModel.patchEnabled=false] - Whether patching is enabled
16
+ * @property {object} [control={}] - Control configuration
17
+ * @property {object} [control.wdbBtnColumns={}] - Configuration for the WDB button columns
18
+ * @property {number} [control.wdbBtnColumns.menuMax=10] - Maximum number of menu items
19
+ * @property {boolean} [enableRestApiForModel=false] - Whether to enable REST API for the model
20
+ */
21
+ const config = {
22
+ waibu: {
23
+ prefix: 'db',
24
+ title: 'dbModels'
25
+ },
26
+ waibuAdmin: {
27
+ menuCollapsible: true,
28
+ menuHandler: 'waibuDb:adminMenu'
29
+ },
30
+ waibuMpa: {
31
+ icon: 'database'
32
+ },
33
+ dbModel: {
34
+ count: false,
35
+ patchEnabled: false
36
+ },
37
+ control: {
38
+ wdbBtnColumns: {
39
+ menuMax: 10
40
+ }
41
+ },
42
+ enableRestApiForModel: false
43
+ }
44
+
45
+ export default config
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes