@simitgroup/simpleapp-generator 1.6.6-i-alpha → 1.6.6-k-alpha

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 (239) hide show
  1. package/ReleaseNote.md +7 -0
  2. package/dist/buildinschemas/docnoformat.js +6 -6
  3. package/dist/buildinschemas/docnoformat.js.map +1 -1
  4. package/dist/buildinschemas/documentevent.js +1 -1
  5. package/dist/buildinschemas/documentevent.js.map +1 -1
  6. package/dist/buildinschemas/organization.js +1 -1
  7. package/dist/buildinschemas/organization.js.map +1 -1
  8. package/dist/buildinschemas/tenant.js +1 -1
  9. package/dist/buildinschemas/tenant.js.map +1 -1
  10. package/dist/buildinschemas/user.js +2 -2
  11. package/dist/buildinschemas/user.js.map +1 -1
  12. package/dist/buildinschemas/webhook.d.ts.map +1 -1
  13. package/dist/buildinschemas/webhook.js +1 -0
  14. package/dist/buildinschemas/webhook.js.map +1 -1
  15. package/dist/framework.d.ts.map +1 -1
  16. package/dist/framework.js +30 -3
  17. package/dist/framework.js.map +1 -1
  18. package/dist/generate.d.ts.map +1 -1
  19. package/dist/generate.js +21 -20
  20. package/dist/generate.js.map +1 -1
  21. package/dist/index.js +0 -0
  22. package/dist/processors/jrxmlbuilder.js +3 -3
  23. package/dist/processors/jrxmlbuilder.js.map +1 -1
  24. package/dist/processors/jsonschemabuilder.d.ts.map +1 -1
  25. package/dist/processors/jsonschemabuilder.js +17 -10
  26. package/dist/processors/jsonschemabuilder.js.map +1 -1
  27. package/dist/type.d.ts +1 -1
  28. package/dist/type.d.ts.map +1 -1
  29. package/package.json +2 -3
  30. package/reset-install.sh +3 -0
  31. package/src/buildinschemas/docnoformat.ts +6 -6
  32. package/src/buildinschemas/documentevent.ts +1 -1
  33. package/src/buildinschemas/organization.ts +1 -1
  34. package/src/buildinschemas/tenant.ts +1 -1
  35. package/src/buildinschemas/user.ts +2 -2
  36. package/src/buildinschemas/webhook.ts +1 -0
  37. package/src/framework.ts +33 -5
  38. package/src/generate.ts +22 -20
  39. package/src/processors/jrxmlbuilder.ts +3 -3
  40. package/src/processors/jsonschemabuilder.ts +27 -14
  41. package/src/type.ts +1 -1
  42. package/templates/basic/nest/controller.ts.eta +6 -5
  43. package/templates/basic/nest/resolver.ts.eta +4 -2
  44. package/templates/basic/nest/service.ts.eta +5 -2
  45. package/templates/basic/nuxt/simpleapp.generate.client.ts.eta +3 -3
  46. package/templates/nest/.gitignore.eta +4 -5
  47. package/templates/nest/src/{app.module.ts.eta → app.module.ts._eta} +2 -2
  48. package/templates/nest/src/{main.ts.eta → main.ts._eta} +2 -2
  49. package/templates/nest/src/printapi/printapi.service.ts.eta +7 -8
  50. package/templates/nest/src/simpleapp/.gitignore.eta +1 -1
  51. package/templates/nest/src/simpleapp/generate/commons/audittrail.service.ts.eta +2 -2
  52. package/templates/nest/src/simpleapp/generate/commons/customkeycloa.guard.ts.eta +14 -12
  53. package/templates/nest/src/simpleapp/generate/commons/customkeycloak.guard.ts.eta +36 -42
  54. package/templates/nest/src/simpleapp/generate/commons/docnogenerator.service.ts.eta +6 -3
  55. package/templates/nest/src/simpleapp/generate/commons/encryption.static.ts.eta +56 -61
  56. package/templates/nest/src/simpleapp/generate/commons/middlewares/tenant.middleware.ts.eta +65 -88
  57. package/templates/nest/src/simpleapp/generate/commons/robotuser.service.ts.eta +10 -9
  58. package/templates/nest/src/simpleapp/generate/commons/roles/roles.guard.ts.eta +10 -3
  59. package/templates/nest/src/simpleapp/generate/commons/runwebhook.service.ts.eta +71 -77
  60. package/templates/nest/src/simpleapp/generate/commons/user.context.ts.eta +439 -293
  61. package/templates/nest/src/simpleapp/generate/processors/autoinc.processor.ts.eta +20 -5
  62. package/templates/nest/src/simpleapp/generate/processors/simpleapp.processor.ts.eta +423 -38
  63. package/templates/nest/src/simpleapp/profile/{profile.controller.ts.eta → profile.controller.ts._eta} +2 -2
  64. package/templates/nest/src/simpleapp/profile/{profile.service.ts.eta → profile.service.ts._eta} +2 -2
  65. package/templates/nest/src/simpleapp/simpleapp.module.ts.eta +15 -4
  66. package/templates/nuxt/assets/css/style.css._eta +74 -28
  67. package/templates/nuxt/components/button/ButtonMultiple.vue._eta +1 -1
  68. package/templates/nuxt/components/calendar/{CalendarByResource.vue.eta → CalendarByResource.vue._eta} +2 -2
  69. package/templates/nuxt/components/calendar/{CalendarInput.vue.eta → CalendarInput.vue._eta} +3 -3
  70. package/templates/nuxt/components/calendar/{CalendarSmall.vue.eta → CalendarSmall.vue._eta} +13 -7
  71. package/templates/nuxt/components/debug/{DebugDocumentData.vue.eta → DebugDocumentData.vue._eta} +4 -5
  72. package/templates/nuxt/components/form/{FormDocnoformat.vue.eta → FormDocnoformat.vue._eta} +2 -1
  73. package/templates/nuxt/components/form/user/{FormUserPermission.vue.eta → FormUserPermission.vue._eta} +6 -0
  74. package/templates/nuxt/components/header/{HeaderBreadcrumb.vue.eta → HeaderBreadcrumb.vue._eta} +5 -5
  75. package/templates/nuxt/components/header/button/{HeaderButtonProfile.vue.eta → HeaderButtonProfile.vue._eta} +2 -2
  76. package/templates/nuxt/components/header/button/task/{HeaderButtonTaskList.vue.eta → HeaderButtonTaskList.vue._eta} +4 -4
  77. package/templates/nuxt/components/image/ImageAvatar.vue.eta +56 -0
  78. package/templates/nuxt/components/image/{ImageOrganization.vue.eta.vue → ImageOrganization.vue.eta} +15 -9
  79. package/templates/nuxt/components/image/{ImageToBase64Uploader.vue.eta.vue → ImageToBase64Uploader.vue.eta} +28 -18
  80. package/templates/nuxt/components/list/{ListDocumentTable.vue.eta → ListDocumentTable.vue._eta} +3 -3
  81. package/templates/nuxt/components/list/{ListItem.vue.eta → ListItem.vue._eta} +2 -2
  82. package/templates/nuxt/components/list/{ListMessages.vue.eta → ListMessages.vue._eta} +8 -2
  83. package/templates/nuxt/components/list/{ListView.vue.eta → ListView.vue._eta} +2 -2
  84. package/templates/nuxt/components/overlay/{OverlayPanelWithToolBar.vue.eta → OverlayPanelWithToolBar.vue._eta} +5 -5
  85. package/templates/nuxt/components/overlay/{OverlaySideBarCrud.vue.eta → OverlaySideBarCrud.vue._eta} +4 -4
  86. package/templates/nuxt/components/overlay/{OverlayViewer.vue.eta → OverlayViewer.vue._eta} +2 -2
  87. package/templates/nuxt/components/page/{PageDocList.vue.eta → PageDocList.vue._eta} +5 -5
  88. package/templates/nuxt/components/renderer/RendererDateAge.vue.eta +19 -0
  89. package/templates/nuxt/components/renderer/{RendererDateTime.vue.eta → RendererDateTime.vue._eta} +2 -2
  90. package/templates/nuxt/components/renderer/{RendererDocHistories.vue.eta → RendererDocHistories.vue._eta} +6 -0
  91. package/templates/nuxt/components/renderer/{RendererForeignKey.vue.eta → RendererForeignKey.vue._eta} +2 -2
  92. package/templates/nuxt/components/renderer/{RendererLink.vue.eta → RendererLink.vue._eta} +2 -2
  93. package/templates/nuxt/components/renderer/{RendererTime.vue.eta → RendererTime.vue._eta} +2 -2
  94. package/templates/nuxt/components/renderer/{RendererViewer.vue.eta → RendererViewer.vue._eta} +2 -2
  95. package/templates/nuxt/components/select/{SelectTemplate.vue.eta → SelectTemplate.vue._eta} +2 -2
  96. package/templates/nuxt/components/session/{SessionBlock.vue.eta → SessionBlock.vue._eta} +2 -2
  97. package/templates/nuxt/components/simpleApp/SimpleAppAutocomplete.vue.eta +55 -55
  98. package/templates/nuxt/components/simpleApp/SimpleAppCalendarInput.vue.eta +13 -11
  99. package/templates/nuxt/components/simpleApp/SimpleAppChildrenList.vue.eta +6 -3
  100. package/templates/nuxt/components/simpleApp/SimpleAppDocumentNo.vue.eta +33 -28
  101. package/templates/nuxt/components/simpleApp/SimpleAppFieldContainer.vue.eta +19 -28
  102. package/templates/nuxt/components/simpleApp/SimpleAppInput.vue.eta +113 -105
  103. package/templates/nuxt/components/simpleApp/SimpleAppInputTable.vue.eta +3 -3
  104. package/templates/nuxt/components/simpleApp/SimpleAppJsonSchemaForm.vue.eta +3 -16
  105. package/templates/nuxt/components/simpleApp/SimpleAppUserPicker.vue.eta +10 -12
  106. package/templates/nuxt/components/table/{TableDocuments.vue.eta → TableDocuments.vue._eta} +2 -2
  107. package/templates/nuxt/components/user/{UserButtonPermissionInfo.vue.eta → UserButtonPermissionInfo.vue._eta} +4 -4
  108. package/templates/nuxt/components/user/{UserInvitation.vue.eta → UserInvitation.vue._eta} +2 -2
  109. package/templates/nuxt/components/user/{UserProfileListItem.vue.eta → UserProfileListItem.vue._eta} +2 -2
  110. package/templates/nuxt/components/user/{UserTenantPicker.vue.eta → UserTenantPicker.vue._eta} +2 -2
  111. package/templates/nuxt/composables/getOpenApi.generate.ts.eta +11 -3
  112. package/templates/nuxt/composables/getUserStore.generate.ts.eta +1 -1
  113. package/templates/nuxt/composables/graphquery.generate.ts.eta +1 -1
  114. package/templates/nuxt/composables/recently.generate.ts.eta +0 -1
  115. package/templates/nuxt/composables/stringHelper.generate.ts.eta +5 -2
  116. package/templates/nuxt/nuxt.config.ts._eta +6 -5
  117. package/templates/nuxt/pages/[xorg]/docnoformat/[id].vue.eta +0 -1
  118. package/templates/nuxt/pages/[xorg]/{docnoformat.vue.eta → docnoformat.vue._eta} +1 -0
  119. package/templates/nuxt/pages/[xorg]/organization/[id].vue.eta +13 -9
  120. package/templates/nuxt/pages/[xorg]/organization/new.vue.eta +10 -12
  121. package/templates/nuxt/pages/[xorg]/{user.vue.eta → user.vue._eta} +2 -2
  122. package/templates/nuxt/pages/index.vue._eta +1 -1
  123. package/templates/nuxt/pages/{profile.vue.eta → profile.vue._eta} +2 -2
  124. package/templates/nuxt/plugins/10.simpleapp-event.ts.eta +6 -0
  125. package/templates/nuxt/plugins/20.simpleapp-userstore.ts.eta +89 -12
  126. package/templates/nuxt/plugins/40.pusher.ts.eta +8 -5
  127. package/templates/nuxt/presets/lara/accordion/index.js +79 -0
  128. package/templates/nuxt/presets/lara/accordioncontent/index.js +3 -0
  129. package/templates/nuxt/presets/lara/accordionheader/index.js +11 -0
  130. package/templates/nuxt/presets/lara/accordionpanel/index.js +18 -0
  131. package/templates/nuxt/presets/lara/autocomplete/index.js +208 -0
  132. package/templates/nuxt/presets/lara/avatar/index.js +43 -0
  133. package/templates/nuxt/presets/lara/avatargroup/index.js +5 -0
  134. package/templates/nuxt/presets/lara/badge/index.js +47 -0
  135. package/templates/nuxt/presets/lara/badgedirective/index.js +43 -0
  136. package/templates/nuxt/presets/lara/blockui/index.js +4 -0
  137. package/templates/nuxt/presets/lara/breadcrumb/index.js +64 -0
  138. package/templates/nuxt/presets/lara/button/index.js +238 -0
  139. package/templates/nuxt/presets/lara/buttongroup/index.js +12 -0
  140. package/templates/nuxt/presets/lara/card/index.js +37 -0
  141. package/templates/nuxt/presets/lara/carousel/index.js +103 -0
  142. package/templates/nuxt/presets/lara/cascadeselect/index.js +199 -0
  143. package/templates/nuxt/presets/lara/checkbox/index.js +104 -0
  144. package/templates/nuxt/presets/lara/chip/index.js +42 -0
  145. package/templates/nuxt/presets/lara/colorpicker/index.js +123 -0
  146. package/templates/nuxt/presets/lara/confirmdialog/index.js +3 -0
  147. package/templates/nuxt/presets/lara/confirmpopup/index.js +56 -0
  148. package/templates/nuxt/presets/lara/contextmenu/index.js +126 -0
  149. package/templates/nuxt/presets/lara/datatable/index.js +403 -0
  150. package/templates/nuxt/presets/lara/dataview/index.js +28 -0
  151. package/templates/nuxt/presets/lara/datepicker/index.js +435 -0
  152. package/templates/nuxt/presets/lara/deferred/index.js +3 -0
  153. package/templates/nuxt/presets/lara/dialog/index.js +148 -0
  154. package/templates/nuxt/presets/lara/divider/index.js +67 -0
  155. package/templates/nuxt/presets/lara/dock/index.js +86 -0
  156. package/templates/nuxt/presets/lara/drawer/index.js +149 -0
  157. package/templates/nuxt/presets/lara/fieldset/index.js +84 -0
  158. package/templates/nuxt/presets/lara/fileupload/index.js +95 -0
  159. package/templates/nuxt/presets/lara/floatlabel/index.js +26 -0
  160. package/templates/nuxt/presets/lara/galleria/index.js +308 -0
  161. package/templates/nuxt/presets/lara/global.js +90 -0
  162. package/templates/nuxt/presets/lara/iconfield/index.js +27 -0
  163. package/templates/nuxt/presets/lara/image/index.js +206 -0
  164. package/templates/nuxt/presets/lara/index.js +234 -0
  165. package/templates/nuxt/presets/lara/inplace/index.js +27 -0
  166. package/templates/nuxt/presets/lara/inputgroup/index.js +5 -0
  167. package/templates/nuxt/presets/lara/inputgroupaddon/index.js +28 -0
  168. package/templates/nuxt/presets/lara/inputmask/index.js +39 -0
  169. package/templates/nuxt/presets/lara/inputnumber/index.js +167 -0
  170. package/templates/nuxt/presets/lara/inputotp/index.js +10 -0
  171. package/templates/nuxt/presets/lara/inputswitch/index.js +80 -0
  172. package/templates/nuxt/presets/lara/inputtext/index.js +54 -0
  173. package/templates/nuxt/presets/lara/knob/index.js +44 -0
  174. package/templates/nuxt/presets/lara/listbox/index.js +117 -0
  175. package/templates/nuxt/presets/lara/megamenu/index.js +198 -0
  176. package/templates/nuxt/presets/lara/menu/index.js +96 -0
  177. package/templates/nuxt/presets/lara/menubar/index.js +176 -0
  178. package/templates/nuxt/presets/lara/message/index.js +92 -0
  179. package/templates/nuxt/presets/lara/metergroup/index.js +96 -0
  180. package/templates/nuxt/presets/lara/multiselect/index.js +201 -0
  181. package/templates/nuxt/presets/lara/orderlist/index.js +13 -0
  182. package/templates/nuxt/presets/lara/organizationchart/index.js +137 -0
  183. package/templates/nuxt/presets/lara/overlaybadge/index.js +18 -0
  184. package/templates/nuxt/presets/lara/paginator/index.js +178 -0
  185. package/templates/nuxt/presets/lara/panel/index.js +91 -0
  186. package/templates/nuxt/presets/lara/panelmenu/index.js +127 -0
  187. package/templates/nuxt/presets/lara/password/index.js +72 -0
  188. package/templates/nuxt/presets/lara/picklist/index.js +52 -0
  189. package/templates/nuxt/presets/lara/popover/index.js +31 -0
  190. package/templates/nuxt/presets/lara/progressbar/index.js +55 -0
  191. package/templates/nuxt/presets/lara/progressspinner/index.js +51 -0
  192. package/templates/nuxt/presets/lara/radiobutton/index.js +104 -0
  193. package/templates/nuxt/presets/lara/rating/index.js +63 -0
  194. package/templates/nuxt/presets/lara/ripple/index.js +6 -0
  195. package/templates/nuxt/presets/lara/scrollpanel/index.js +77 -0
  196. package/templates/nuxt/presets/lara/scrolltop/index.js +26 -0
  197. package/templates/nuxt/presets/lara/select/index.js +240 -0
  198. package/templates/nuxt/presets/lara/selectbutton/index.js +16 -0
  199. package/templates/nuxt/presets/lara/skeleton/index.js +16 -0
  200. package/templates/nuxt/presets/lara/slider/index.js +137 -0
  201. package/templates/nuxt/presets/lara/speeddial/index.js +57 -0
  202. package/templates/nuxt/presets/lara/splitbutton/index.js +19 -0
  203. package/templates/nuxt/presets/lara/splitter/index.js +61 -0
  204. package/templates/nuxt/presets/lara/splitterpanel/index.js +5 -0
  205. package/templates/nuxt/presets/lara/step/index.js +62 -0
  206. package/templates/nuxt/presets/lara/stepitem/index.js +11 -0
  207. package/templates/nuxt/presets/lara/steplist/index.js +3 -0
  208. package/templates/nuxt/presets/lara/steppanels/index.js +3 -0
  209. package/templates/nuxt/presets/lara/stepper/index.js +13 -0
  210. package/templates/nuxt/presets/lara/steps/index.js +111 -0
  211. package/templates/nuxt/presets/lara/tab/index.js +42 -0
  212. package/templates/nuxt/presets/lara/tablist/index.js +8 -0
  213. package/templates/nuxt/presets/lara/tabmenu/index.js +73 -0
  214. package/templates/nuxt/presets/lara/tabpanel/index.js +3 -0
  215. package/templates/nuxt/presets/lara/tabpanels/index.js +3 -0
  216. package/templates/nuxt/presets/lara/tabs/index.js +5 -0
  217. package/templates/nuxt/presets/lara/tabview/index.js +156 -0
  218. package/templates/nuxt/presets/lara/tag/index.js +38 -0
  219. package/templates/nuxt/presets/lara/terminal/index.js +60 -0
  220. package/templates/nuxt/presets/lara/textarea/index.js +39 -0
  221. package/templates/nuxt/presets/lara/tieredmenu/index.js +121 -0
  222. package/templates/nuxt/presets/lara/timeline/index.js +81 -0
  223. package/templates/nuxt/presets/lara/toast/index.js +102 -0
  224. package/templates/nuxt/presets/lara/togglebutton/index.js +45 -0
  225. package/templates/nuxt/presets/lara/toggleswitch/index.js +80 -0
  226. package/templates/nuxt/presets/lara/toolbar/index.js +28 -0
  227. package/templates/nuxt/presets/lara/tooltip/index.js +46 -0
  228. package/templates/nuxt/presets/lara/tree/index.js +101 -0
  229. package/templates/nuxt/presets/lara/treeselect/index.js +102 -0
  230. package/templates/nuxt/presets/lara/treetable/index.js +305 -0
  231. package/templates/nuxt/providers/my-provider.ts.eta +1 -1
  232. package/templates/nuxt/server/api/profile/[...].ts.eta +4 -3
  233. package/templates/nuxt/simpleapp/generate/clients/SimpleAppClient.ts.eta +10 -20
  234. package/templates/nuxt/tailwind.config.ts._eta +4 -15
  235. package/templates/nuxt/types/schema.ts.eta +1 -1
  236. package/templates/nuxt/types/user.ts.eta +6 -1
  237. package/templates/project/jsonschemas/appintegration.json_eta +227 -0
  238. package/templates/project/sharelibs/validate.ts.eta +23 -0
  239. package/templates/nuxt/components/image/ImageAvatar.vue.eta._vue +0 -57
@@ -0,0 +1,102 @@
1
+ export default {
2
+ root: ({ props, state }) => ({
3
+ class: [
4
+ // Display and Position
5
+ 'inline-flex',
6
+ 'relative',
7
+
8
+ // Shape
9
+ 'rounded-md',
10
+
11
+ // Color and Background
12
+ 'bg-surface-0 dark:bg-surface-900',
13
+ 'border',
14
+ { 'border-surface-300 dark:border-surface-600': !props.invalid },
15
+
16
+ // Invalid State
17
+ { 'border-red-500 dark:border-red-400': props.invalid },
18
+
19
+ // Transitions
20
+ 'transition-all',
21
+ 'duration-200',
22
+
23
+ // States
24
+ { 'hover:border-primary': !props.invalid },
25
+ { 'outline-none outline-offset-0 ring ring-primary-400/50 dark:ring-primary-300/50': state.focused },
26
+
27
+ // Misc
28
+ 'cursor-pointer',
29
+ 'select-none',
30
+ { 'opacity-60': props.disabled, 'pointer-events-none': props.disabled, 'cursor-default': props.disabled }
31
+ ]
32
+ }),
33
+ labelContainer: {
34
+ class: ['overflow-hidden flex flex-auto cursor-pointer']
35
+ },
36
+ label: {
37
+ class: [
38
+ 'block leading-[normal]',
39
+
40
+ // Space
41
+ 'p-3',
42
+
43
+ // Color
44
+ 'text-surface-800 dark:text-white/80',
45
+
46
+ // Transition
47
+ 'transition duration-200',
48
+
49
+ // Misc
50
+ 'overflow-hidden whitespace-nowrap cursor-pointer overflow-ellipsis'
51
+ ]
52
+ },
53
+ dropdown: {
54
+ class: [
55
+ // Flexbox
56
+ 'flex items-center justify-center',
57
+ 'shrink-0',
58
+
59
+ // Color and Background
60
+ 'bg-transparent',
61
+ 'text-surface-500',
62
+
63
+ // Size
64
+ 'w-12',
65
+
66
+ // Shape
67
+ 'rounded-tr-md',
68
+ 'rounded-br-md'
69
+ ]
70
+ },
71
+ panel: {
72
+ class: [
73
+ // Position
74
+ 'absolute top-0 left-0',
75
+
76
+ // Shape
77
+ 'border-0 dark:border',
78
+ 'rounded-md',
79
+ 'shadow-md',
80
+
81
+ // Color
82
+ 'bg-surface-0 dark:bg-surface-800',
83
+ 'text-surface-800 dark:text-white/80',
84
+ 'dark:border-surface-700'
85
+ ]
86
+ },
87
+ treeContainer: {
88
+ class: [
89
+ // Sizing
90
+ 'max-h-[200px]',
91
+
92
+ // Misc
93
+ 'overflow-auto'
94
+ ]
95
+ },
96
+ transition: {
97
+ enterFromClass: 'opacity-0 scale-y-[0.8]',
98
+ enterActiveClass: 'transition-[transform,opacity] duration-[120ms] ease-[cubic-bezier(0,0,0.2,1)]',
99
+ leaveActiveClass: 'transition-opacity duration-100 ease-linear',
100
+ leaveToClass: 'opacity-0'
101
+ }
102
+ };
@@ -0,0 +1,305 @@
1
+ export default {
2
+ root: ({ props }) => ({
3
+ class: [
4
+ 'relative',
5
+ {
6
+ 'flex flex-col h-full': props.scrollHeight === 'flex'
7
+ }
8
+ ]
9
+ }),
10
+ mask: {
11
+ class: [
12
+ // Position
13
+ 'absolute',
14
+ 'top-0 left-0',
15
+ 'z-20',
16
+
17
+ // Flex & Alignment
18
+ 'flex items-center justify-center',
19
+
20
+ // Size
21
+ 'w-full h-full',
22
+
23
+ // Color
24
+ 'bg-surface-100/40 dark:bg-surface-800/40',
25
+
26
+ // Transition
27
+ 'transition duration-200'
28
+ ]
29
+ },
30
+ loadingIcon: {
31
+ class: 'w-8 h-8 animate-spin'
32
+ },
33
+ tableContainer: ({ props }) => ({
34
+ class: [
35
+ // Overflow
36
+ {
37
+ 'relative overflow-auto': props.scrollable,
38
+ 'overflow-x-auto': props.resizableColumns
39
+ }
40
+ ]
41
+ }),
42
+ header: ({ props }) => ({
43
+ class: [
44
+ 'font-bold',
45
+
46
+ // Shape
47
+ props.showGridlines ? 'border-x border-t border-b-0' : 'border-y border-x-0',
48
+
49
+ // Spacing
50
+ 'p-4',
51
+
52
+ // Color
53
+ 'bg-surface-50 dark:bg-surface-800',
54
+ 'border-surface-200 dark:border-surface-700',
55
+ 'text-surface-700 dark:text-white/80'
56
+ ]
57
+ }),
58
+ footer: {
59
+ class: [
60
+ // Background, Border & Text
61
+ 'bg-slate-50 text-slate-700',
62
+ 'border border-x-0 border-t-0 border-surface-50',
63
+ // Padding & Font
64
+ 'p-4 font-bold',
65
+ // Dark Mode
66
+ 'dark:bg-surface-900 dark:text-white/70 dark:border-surface-700'
67
+ ]
68
+ },
69
+ table: {
70
+ class: [
71
+ // Table & Width
72
+ 'border-collapse table-fixed w-full '
73
+ ]
74
+ },
75
+ thead: ({ props }) => ({
76
+ class: [
77
+ // Position & Z-index
78
+ {
79
+ 'top-0 z-40 sticky': props.scrollable
80
+ }
81
+ ]
82
+ }),
83
+ tbody: ({ props }) => ({
84
+ class: [
85
+ // Block Display
86
+ {
87
+ block: props.scrollable
88
+ }
89
+ ]
90
+ }),
91
+ tfoot: ({ props }) => ({
92
+ class: [
93
+ // Block Display
94
+ {
95
+ block: props.scrollable
96
+ }
97
+ ]
98
+ }),
99
+ headerRow: ({ props }) => ({
100
+ class: [
101
+ // Flexbox & Width
102
+ {
103
+ 'flex flex-nowrap w-full': props.scrollable
104
+ }
105
+ ]
106
+ }),
107
+ row: ({ context, props }) => ({
108
+ class: [
109
+ // Flex
110
+ { 'flex flex-nowrap w-full': context.scrollable },
111
+
112
+ // Color
113
+ 'dark:text-white/80',
114
+ { 'bg-highlight': context.selected },
115
+ { 'bg-surface-0 text-surface-600 dark:bg-surface-800': !context.selected },
116
+
117
+ // Hover & Flexbox
118
+ {
119
+ 'hover:bg-surface-300/20 hover:text-surface-600': context.selectable && !context.selected
120
+ },
121
+ 'focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 ring-inset dark:focus:ring-primary-300/50',
122
+
123
+ // Transition
124
+ { 'transition duration-200': (props.selectionMode && !context.selected) || props.rowHover }
125
+ ]
126
+ }),
127
+ headerCell: ({ context, props }) => ({
128
+ class: [
129
+ 'font-bold',
130
+
131
+ // Position
132
+ { 'sticky z-40': context.scrollable && context.scrollDirection === 'both' && context.frozen },
133
+
134
+ // Flex & Alignment
135
+ {
136
+ 'flex flex-1 items-center': context.scrollable,
137
+ 'flex-initial shrink-0': context.scrollable && context.scrollDirection === 'both' && !context.frozen
138
+ },
139
+ 'text-left',
140
+
141
+ // Shape
142
+ { 'first:border-l border-y border-r': context?.showGridlines },
143
+ 'border-0 border-b border-solid',
144
+
145
+ // Spacing
146
+ context?.size === 'small' ? 'p-2' : context?.size === 'large' ? 'p-5' : 'p-4',
147
+
148
+ // Color
149
+ (props.sortable === '' || props.sortable) && context.sorted ? 'bg-highlight' : 'bg-surface-50 text-surface-700 dark:text-white/80 dark:bg-surface-800',
150
+ 'border-surface-200 dark:border-surface-700',
151
+
152
+ // States
153
+ { 'hover:bg-surface-100 dark:hover:bg-surface-400/30': (props.sortable === '' || props.sortable) && !context?.sorted },
154
+ 'focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring focus-visible:ring-inset focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50',
155
+
156
+ // Transition
157
+ { 'transition duration-200': props.sortable === '' || props.sortable },
158
+
159
+ // Misc
160
+ {
161
+ 'overflow-hidden relative bg-clip-padding': context.resizable && !context.frozen
162
+ }
163
+ ]
164
+ }),
165
+ column: {
166
+ headerCell: ({ context, props }) => ({
167
+ class: [
168
+ 'font-bold',
169
+
170
+ // Position
171
+ { 'sticky z-40': context.scrollable && context.scrollDirection === 'both' && context.frozen },
172
+
173
+ // Flex & Alignment
174
+ {
175
+ 'flex flex-1 items-center': context.scrollable,
176
+ 'flex-initial shrink-0': context.scrollable && context.scrollDirection === 'both' && !context.frozen
177
+ },
178
+ 'text-left',
179
+
180
+ // Shape
181
+ { 'first:border-l border-y border-r': context?.showGridlines },
182
+ 'border-0 border-b border-solid',
183
+
184
+ // Spacing
185
+ context?.size === 'small' ? 'p-2' : context?.size === 'large' ? 'p-5' : 'p-4',
186
+
187
+ // Color
188
+ (props.sortable === '' || props.sortable) && context.sorted ? 'bg-highlight' : 'bg-surface-50 text-surface-700 dark:text-white/80 dark:bg-surface-800',
189
+ 'border-surface-200 dark:border-surface-700',
190
+
191
+ // States
192
+ { 'hover:bg-surface-100 dark:hover:bg-surface-400/30': (props.sortable === '' || props.sortable) && !context?.sorted },
193
+ 'focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring focus-visible:ring-inset focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50',
194
+
195
+ // Transition
196
+ { 'transition duration-200': props.sortable === '' || props.sortable },
197
+
198
+ // Misc
199
+ {
200
+ 'overflow-hidden relative bg-clip-padding': context.resizable && !context.frozen
201
+ }
202
+ ]
203
+ }),
204
+ bodyCell: ({ context }) => ({
205
+ class: [
206
+ // Position
207
+ {
208
+ sticky: context.scrollable && context.scrollDirection === 'both' && context.frozen
209
+ },
210
+
211
+ // Flex & Alignment
212
+ {
213
+ 'flex flex-1 items-center': context.scrollable,
214
+ 'flex-initial shrink-0': context.scrollable && context.scrollDirection === 'both' && !context.frozen
215
+ },
216
+ 'text-left',
217
+
218
+ // Shape
219
+ 'border-0 border-b border-solid',
220
+ 'border-surface-200 dark:border-surface-700',
221
+ {
222
+ 'border-x-0 border-l-0': !context.showGridlines
223
+ },
224
+ { 'first:border-l border-r border-b': context?.showGridlines },
225
+
226
+ // Spacing
227
+ context?.size === 'small' ? 'p-2' : context?.size === 'large' ? 'p-5' : 'p-4',
228
+
229
+ // Misc
230
+ {
231
+ 'cursor-pointer': context.selectable,
232
+ sticky: context.scrollable && context.scrollDirection === 'both' && context.frozen,
233
+ 'border-x-0 border-l-0': !context.showGridlines
234
+ }
235
+ ]
236
+ }),
237
+ bodyCellContent: 'flex items-center gap-2',
238
+ rowToggleButton: {
239
+ class: [
240
+ 'relative',
241
+
242
+ // Flex & Alignment
243
+ 'inline-flex items-center justify-center',
244
+ 'text-left align-middle',
245
+
246
+ // Spacing
247
+ 'm-0 mr-2 p-0',
248
+
249
+ // Size
250
+ 'w-8 h-8',
251
+
252
+ // Shape
253
+ 'border-0 rounded-full',
254
+
255
+ // Color
256
+ 'text-surface-500 dark:text-white/70',
257
+ 'bg-transparent',
258
+
259
+ // States
260
+ 'hover:bg-surface-50 dark:hover:bg-surface-700',
261
+ 'focus-visible:outline-none focus-visible:outline-offset-0',
262
+ 'focus-visible:ring focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50',
263
+
264
+ // Transition
265
+ 'transition duration-200',
266
+
267
+ // Misc
268
+ 'overflow-hidden',
269
+ 'cursor-pointer select-none'
270
+ ]
271
+ },
272
+ sortIcon: ({ context }) => ({
273
+ class: ['ml-2 inline-block', context.sorted ? 'text-inherit' : 'fill-surface-700 dark:fill-white/70']
274
+ }),
275
+ columnResizer: {
276
+ class: [
277
+ 'block',
278
+
279
+ // Position
280
+ 'absolute top-0 right-0',
281
+
282
+ // Sizing
283
+ 'w-2 h-full',
284
+
285
+ // Spacing
286
+ 'm-0 p-0',
287
+
288
+ // Color
289
+ 'border border-transparent',
290
+
291
+ // Misc
292
+ 'cursor-col-resize'
293
+ ]
294
+ },
295
+ transition: {
296
+ enterFromClass: 'opacity-0 scale-y-[0.8]',
297
+ enterActiveClass: 'transition-[transform,opacity] duration-[120ms] ease-[cubic-bezier(0,0,0.2,1)]',
298
+ leaveActiveClass: 'transition-opacity duration-100 ease-linear',
299
+ leaveToClass: 'opacity-0'
300
+ }
301
+ },
302
+ columnResizeIndicator: {
303
+ class: 'absolute hidden w-[2px] z-20 bg-primary'
304
+ }
305
+ };
@@ -11,7 +11,7 @@ export const getImage: ProviderGetImage = (
11
11
 
12
12
  if (!baseURL) {
13
13
  // also support runtime config
14
- baseURL = useRuntimeConfig().public.API_URL
14
+ baseURL = useRuntimeConfig().public.apiUrl
15
15
  }
16
16
 
17
17
  const operations = operationsGenerator(modifiers)
@@ -8,6 +8,7 @@
8
8
  import axios from 'axios';
9
9
  import { getServerSession } from '#auth'
10
10
  import type { Session } from 'next-auth';
11
+ import { pathJoin } from '~/server/utils/path';
11
12
 
12
13
  export default defineEventHandler(async (event:any) => {
13
14
  type additionalprops = {accessToken?:string}
@@ -45,7 +46,7 @@ export default defineEventHandler(async (event:any) => {
45
46
  // }
46
47
 
47
48
  const frontEndRes = event.node.res;
48
-
49
+
49
50
  const url = process.env.SIMPLEAPP_BACKEND_URL + `/profile/${documentLink}`;
50
51
  // console.warn('backend server-----',req.method,url,forwardData)
51
52
 
@@ -61,7 +62,7 @@ export default defineEventHandler(async (event:any) => {
61
62
  }
62
63
 
63
64
  if(documentLink=='avatar' ){
64
- axiosConfig.url = process.env.AVATAR_URL
65
+ axiosConfig.url = pathJoin([useRuntimeConfig().public.avatarUrl, documentLink]);
65
66
  delete axiosConfig.params
66
67
  }
67
68
  // console.log("axiosConfig",axiosConfig)
@@ -124,7 +125,7 @@ export default defineEventHandler(async (event:any) => {
124
125
  resolve(res.data);
125
126
  }
126
127
 
127
- }).catch((error) => {
128
+ }).catch((error) => {
128
129
  if(!error?.response){
129
130
  console.log("backend server no response ",error.code)
130
131
  reject({
@@ -4,13 +4,11 @@
4
4
  * last change 2024-03-08
5
5
  * Author: Ks Tan
6
6
  */
7
- import Ajv from 'ajv';
8
- import addFormats from 'ajv-formats';
9
- import addErrors from 'ajv-errors';
10
7
  import { ref } from 'vue';
11
8
  import type { Ref } from 'vue';
12
9
  import type { AxiosResponse } from 'axios';
13
10
  import {SearchBody,TextSearchBody,Notification,NotificationStatus,SchemaType,FormActions} from '~/types'
11
+ import { getValidateService } from '~/simpleapp/generate/sharelibs/validate';
14
12
 
15
13
  // import { useToast, } from 'primevue/usetoast';
16
14
  // import type { ToastMessageOptions } from 'primevue/toast';
@@ -135,7 +133,7 @@ export class SimpleAppClient<
135
133
  documentName:this.getDocName(),
136
134
  summary:'Record create failed',
137
135
  status:NotificationStatus.error,
138
- data:errors.response.data
136
+ data:errors.response.data.statusMessage
139
137
  })
140
138
  console.error('error:create',errors.response.data)
141
139
  setTimeout(()=>{
@@ -185,7 +183,7 @@ export class SimpleAppClient<
185
183
  documentName:this.getDocName(),
186
184
  summary:'Record update failed',
187
185
  status:NotificationStatus.error,
188
- data:errors.response.data
186
+ data:errors.response.data.statusMessage
189
187
  })
190
188
  // console.error('error:update---',errors,",---",errors.message)
191
189
  // if(this.event){
@@ -226,7 +224,7 @@ export class SimpleAppClient<
226
224
  documentName:this.getDocName(),
227
225
  summary:'Record patch failed',
228
226
  status:NotificationStatus.error,
229
- data:errors.response.data
227
+ data:errors.response.data.statusMessage
230
228
  })
231
229
  // console.error('error:update---',errors,",---",errors.message)
232
230
  // if(this.event){
@@ -268,7 +266,7 @@ export class SimpleAppClient<
268
266
  documentName:this.getDocName(),
269
267
  summary:'Record delete failed',
270
268
  status:NotificationStatus.error,
271
- data:errors.response.data
269
+ data:errors.response.data.statusMessage
272
270
  })
273
271
  console.error(errors.response.data)
274
272
  setTimeout(()=>{
@@ -294,19 +292,7 @@ export class SimpleAppClient<
294
292
  return true;
295
293
  }
296
294
  validateFailed() {
297
- const ajv = new Ajv({ allErrors: true });
298
- addFormats(ajv);
299
- addErrors(ajv)
300
-
301
- ajv.addFormat('tel',/^$|^\d{7,15}$/gm)
302
- ajv.addFormat('text',/.*$/)
303
- ajv.addFormat('html',/.*$/)
304
- ajv.addFormat('documentno',/.*$/)
305
- ajv.addFormat('money',/.*$/)
306
-
307
- ajv.addKeyword({ keyword: 'x-foreignkey', schemaType: 'string' });
308
- ajv.addKeyword({ keyword: 'x-simpleapp-config', schemaType: 'object' });
309
-
295
+ const ajv = getValidateService();
310
296
 
311
297
  this.errorlist.value = {};
312
298
  this.hook('pre-validation', this.data.value);
@@ -352,6 +338,10 @@ export class SimpleAppClient<
352
338
  }
353
339
 
354
340
  async runFullTextSearh(body:TextSearchBody) {
341
+ if(!this.docapi.runFullTextSearch){
342
+ return [];
343
+ }
344
+
355
345
  const response = await this.docapi.runFullTextSearch(body)
356
346
  return response.data
357
347
  }
@@ -16,24 +16,14 @@ export default <Partial<Config>>{
16
16
  "./layouts/*.{vue,js,ts,jsx,tsx,css}",
17
17
  "./pages/**/*.{vue,js,ts,jsx,tsx}",
18
18
  "./pages/*.{vue,js,ts,jsx,tsx}",
19
- "./node_modules/primevue/**/*.{vue,js,ts,jsx,tsx}"
19
+ "./node_modules/primevue/**/*.{vue,js,ts,jsx,tsx}",
20
+ "./presets/**/*.{js,vue,ts}",
20
21
  ],
22
+ plugins: [require('tailwindcss-primeui')],
21
23
  theme: {
22
24
  extend:{
23
25
  colors:{
24
- primary:{
25
- '50': '#f0f9ff',
26
- '100': '#e0f2fe',
27
- '200': '#bae6fd',
28
- '300': '#93c5fd',
29
- '400': '#38bdf8',
30
- '500': '#0ea5e9',
31
- '600': '#0284c7',
32
- '700': '#0369a1',
33
- '800': '#075985',
34
- '900': '#0c4a6e',
35
- '950': '#082f49',
36
- },
26
+
37
27
  secondary:{
38
28
  '50': '#f0fdf4',
39
29
  '100': '#dcfce7',
@@ -78,6 +68,5 @@ export default <Partial<Config>>{
78
68
  }
79
69
  }
80
70
  },
81
- plugins: [],
82
71
  darkMode: 'class',
83
72
  }
@@ -196,5 +196,5 @@ export type SchemaFields = {
196
196
  default?: JSONSchema7Type | undefined;
197
197
  readOnly?: boolean | undefined;
198
198
  writeOnly?: boolean | undefined;
199
- example?: JSONSchema7Type | undefined;
199
+ examples?: JSONSchema7Type[] | undefined;
200
200
  }
@@ -85,5 +85,10 @@ export type UserProfile = {
85
85
  groups: string[]
86
86
  currentGroup:string
87
87
  time: string
88
- moreProps: any
88
+ moreProps: any
89
+ package: 'free' | 'lite' | 'pro' | 'enterprise' | 'enterprisePlus'
90
+ appintegration: {
91
+ einvoice: boolean
92
+ simbiz6: boolean
93
+ }
89
94
  }