@simitgroup/simpleapp-generator 1.3.1-alpha → 1.3.2-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 (209) hide show
  1. package/dist/generate.js +5 -1
  2. package/dist/generate.js.map +1 -1
  3. package/package.json +1 -1
  4. package/src/generate.ts +5 -1
  5. package/templates/basic/nest/apischema.ts.eta +2 -3
  6. package/templates/basic/nest/controller.ts.eta +3 -4
  7. package/templates/basic/nest/default.ts.eta +6 -0
  8. package/templates/basic/nest/jsonschema.ts.eta +3 -4
  9. package/templates/basic/nest/model.ts.eta +3 -5
  10. package/templates/basic/nest/processor.ts.eta +3 -4
  11. package/templates/basic/nest/service.ts.eta +8 -1
  12. package/templates/basic/nest/type.ts.eta +3 -4
  13. package/templates/basic/nuxt/default.ts.eta +6 -0
  14. package/templates/basic/nuxt/pages.form.vue.eta +2 -1
  15. package/templates/basic/nuxt/simpleapp.generate.client.ts.eta +3 -4
  16. package/templates/nest/.env._eta +2 -1
  17. package/templates/nest/.gitignore.eta +5 -0
  18. package/templates/nest/src/simpleapp/.gitignore.eta +5 -0
  19. package/templates/nest/src/simpleapp/apischemas/index.ts._eta +6 -1
  20. package/templates/nest/src/simpleapp/generate/apischemas/index.ts.eta +7 -0
  21. package/templates/nest/src/simpleapp/generate/apischemas/simpleapp.apischema.ts.eta +1 -1
  22. package/templates/nest/src/simpleapp/generate/workflow/formschema/index.ts.eta +6 -0
  23. package/templates/nest/src/simpleapp/generate/workflow/workflow.apischema.ts.eta +6 -0
  24. package/templates/nest/src/simpleapp/generate/workflow/workflow.config.ts.eta +6 -0
  25. package/templates/nest/src/simpleapp/generate/workflow/workflow.controller.ts.eta +6 -0
  26. package/templates/nest/src/simpleapp/generate/workflow/workflow.delegate.ts.eta +6 -0
  27. package/templates/nest/src/simpleapp/generate/workflow/workflow.service.ts.eta +2 -4
  28. package/templates/nest/src/simpleapp/generate/workflow/workflow.type.ts.eta +4 -5
  29. package/templates/nest/src/simpleapp/generate/workflow/workflow.userservice.ts.eta +6 -0
  30. package/templates/nest/src/simpleapp/profile/profile.apischema.ts.eta +1 -1
  31. package/templates/nest/src/simpleapp/profile/profile.controller.ts.eta +1 -1
  32. package/templates/nest/src/simpleapp/profile/profile.service.ts.eta +1 -1
  33. package/templates/nest/src/simpleapp/profile/profile.types.ts.eta +1 -1
  34. package/templates/nest/src/simpleapp/services/autoinc.service.ts.eta +1 -1
  35. package/templates/nest/src/simpleapp/services/branch.service.ts.eta +1 -1
  36. package/templates/nest/src/simpleapp/services/docno.service.ts.eta +1 -1
  37. package/templates/nest/src/simpleapp/services/org.service.ts.eta +1 -1
  38. package/templates/nest/src/simpleapp/services/perm.service.ts.eta +1 -1
  39. package/templates/nest/src/simpleapp/services/tenant.service.ts.eta +1 -1
  40. package/templates/nest/src/simpleapp/services/user.service.ts.etax +1 -1
  41. package/templates/nest/src/simpleapp/types/index.ts._eta +6 -1
  42. package/templates/nest/src/simpleapp/workflows/listeners/simpleapp.listener.ts._eta +4 -5
  43. package/templates/nest/test/app.e2e-spec.ts.eta +6 -0
  44. package/templates/nest/test/setting.ts.eta +6 -0
  45. package/templates/nuxt/.env._eta +2 -1
  46. package/templates/nuxt/.gitignore.eta +5 -0
  47. package/templates/nuxt/{app.vue.eta → app.vue._eta} +14 -14
  48. package/templates/nuxt/assets/css/calendar.css._eta +6 -1
  49. package/templates/nuxt/assets/css/listview.css._eta +17 -0
  50. package/templates/nuxt/assets/css/style.css._eta +6 -4
  51. package/templates/nuxt/assets/css/tailwind.css._eta +6 -0
  52. package/templates/nuxt/assets/primevue/passthrough.ts._eta +13 -8
  53. package/templates/nuxt/components/button/ButtonDanger.vue._eta +16 -4
  54. package/templates/nuxt/components/button/ButtonDefault.vue._eta +17 -4
  55. package/templates/nuxt/components/button/ButtonMultiple.vue._eta +8 -2
  56. package/templates/nuxt/components/button/ButtonPrimary.vue._eta +17 -5
  57. package/templates/nuxt/components/button/ButtonText.vue._eta +21 -0
  58. package/templates/nuxt/components/button/ButtonWarning.vue._eta +17 -5
  59. package/templates/nuxt/components/calendar/CalendarByResource.vue.eta +7 -3
  60. package/templates/nuxt/components/calendar/CalendarSmall.vue.eta +6 -0
  61. package/templates/nuxt/components/debug/DebugDocumentData.vue.eta +3 -3
  62. package/templates/nuxt/components/event/EventDecision.vue._eta +3 -3
  63. package/templates/nuxt/components/event/EventDocumentViewer.vue._eta +3 -3
  64. package/templates/nuxt/components/event/EventNotification.vue._eta +3 -3
  65. package/templates/nuxt/components/form/FormBranch.vue.eta +4 -3
  66. package/templates/nuxt/components/header/HeaderBar.vue._eta +7 -1
  67. package/templates/nuxt/components/header/HeaderBreadcrumb.vue.eta +6 -0
  68. package/templates/nuxt/components/header/HeaderSelectBranch.vue.eta +6 -0
  69. package/templates/nuxt/components/header/button/HeaderButtonHome.vue.eta +6 -1
  70. package/templates/nuxt/components/header/button/HeaderButtonLogout.vue.eta +9 -1
  71. package/templates/nuxt/components/header/button/HeaderButtonMenuPicker.vue._eta +7 -0
  72. package/templates/nuxt/components/header/button/HeaderButtonProfile.vue.eta +6 -0
  73. package/templates/nuxt/components/header/button/task/HeaderButtonTaskItem.vue.eta +7 -0
  74. package/templates/nuxt/components/header/button/task/HeaderButtonTaskList.vue.eta +6 -0
  75. package/templates/nuxt/components/list/ListDocument.vue.eta +6 -0
  76. package/templates/nuxt/components/list/ListDocumentTable.vue.eta +6 -0
  77. package/templates/nuxt/components/list/ListView.vue.eta +60 -47
  78. package/templates/nuxt/components/mobile/MobileToolbar.vue.eta +9 -3
  79. package/templates/nuxt/components/overlay/OverlayPanelWithToolBar.vue.eta +44 -0
  80. package/templates/nuxt/components/overlay/OverlaySideBarCrud.vue.eta +10 -1
  81. package/templates/nuxt/components/overlay/OverlayViewer.vue.eta +7 -1
  82. package/templates/nuxt/components/page/PageDocList.vue.eta +23 -14
  83. package/templates/nuxt/components/renderer/index.ts._eta +3 -3
  84. package/templates/nuxt/components/session/SessionBlock.vue.eta +6 -0
  85. package/templates/nuxt/components/simpleApp/SimpleAppAutocomplete.vue.eta +7 -1
  86. package/templates/nuxt/components/simpleApp/SimpleAppDocumentNo.vue.eta +6 -0
  87. package/templates/nuxt/components/simpleApp/SimpleAppFieldContainer.vue.eta +6 -0
  88. package/templates/nuxt/components/simpleApp/SimpleAppForm.vue.eta +7 -2
  89. package/templates/nuxt/components/simpleApp/SimpleAppFormToolBar.vue.eta +21 -17
  90. package/templates/nuxt/components/simpleApp/SimpleAppInput.vue.eta +6 -0
  91. package/templates/nuxt/components/simpleApp/SimpleAppInputTable.vue.eta +6 -1
  92. package/templates/nuxt/components/simpleApp/SimpleAppJsonSchemaForm.vue.eta +6 -0
  93. package/templates/nuxt/components/table/TableDocuments.vue.eta +6 -0
  94. package/templates/nuxt/components/text/TextDanger.vue._eta +8 -0
  95. package/templates/nuxt/components/text/TextSubtitle.vue._eta +8 -0
  96. package/templates/nuxt/components/text/TextTitle.vue._eta +8 -0
  97. package/templates/nuxt/components/user/UserButtonCreateTenant.vue.eta +6 -0
  98. package/templates/nuxt/components/user/UserButtonPermissionInfo.vue.eta +6 -0
  99. package/templates/nuxt/components/user/UserInvitation.vue.eta +22 -16
  100. package/templates/nuxt/components/user/UserProfileListItem.vue.eta +6 -1
  101. package/templates/nuxt/components/user/UserTenantPicker.vue.eta +6 -1
  102. package/templates/nuxt/components/workflow/forms/dynamicfield.vue._eta +7 -0
  103. package/templates/nuxt/components/workflow/forms/index.ts._eta +7 -0
  104. package/templates/nuxt/components/workflow/forms/simpleapprove.vue._eta +6 -0
  105. package/templates/nuxt/composables/date.generate.ts.eta +6 -3
  106. package/templates/nuxt/composables/docformat.generate.ts.eta +6 -0
  107. package/templates/nuxt/composables/getDocument.generate.ts.eta +6 -0
  108. package/templates/nuxt/composables/getTenant.generate.ts.eta +6 -0
  109. package/templates/nuxt/composables/getUserStore.generate.ts.eta +6 -0
  110. package/templates/nuxt/composables/goTo.generate.ts.eta +6 -0
  111. package/templates/nuxt/composables/logout.generate.ts.eta +6 -0
  112. package/templates/nuxt/composables/notifications.generate.ts.eta +6 -0
  113. package/templates/nuxt/composables/refreshDocumentList.generate.ts.eta +6 -0
  114. package/templates/nuxt/composables/roles.generate.ts.eta +6 -0
  115. package/templates/nuxt/composables/screensize.generate.ts.eta +6 -0
  116. package/templates/nuxt/composables/stringHelper.generate.ts.eta +6 -0
  117. package/templates/nuxt/composables/themes.generate.ts.eta +6 -0
  118. package/templates/nuxt/composables/workflow.generate.ts.eta +6 -0
  119. package/templates/nuxt/error.vue._eta +6 -1
  120. package/templates/nuxt/i18n.config.ts.eta +6 -0
  121. package/templates/nuxt/lang/cn.ts._eta +6 -0
  122. package/templates/nuxt/lang/en.ts.eta +1 -0
  123. package/templates/nuxt/layouts/default.vue._eta +6 -0
  124. package/templates/nuxt/layouts/loginlayout.vue._eta +9 -1
  125. package/templates/nuxt/layouts/mobile.vue._eta +6 -0
  126. package/templates/nuxt/middleware/30.acl.global.ts.eta +1 -1
  127. package/templates/nuxt/nuxt.config.ts._eta +4 -5
  128. package/templates/nuxt/pages/[xorg]/docnoformat/[doctype]/[id].vue.eta +4 -5
  129. package/templates/nuxt/pages/[xorg]/docnoformat/[doctype]/new.vue.eta +7 -0
  130. package/templates/nuxt/pages/[xorg]/docnoformat/[doctype].vue.eta +6 -1
  131. package/templates/nuxt/pages/[xorg]/docnoformat/index.vue.eta +6 -1
  132. package/templates/nuxt/pages/[xorg]/docnoformat.vue.eta +4 -6
  133. package/templates/nuxt/pages/[xorg]/index.vue._eta +4 -5
  134. package/templates/nuxt/pages/[xorg]/organization/viewer.vue.eta +8 -0
  135. package/templates/nuxt/pages/[xorg]/organization.vue.eta +6 -1
  136. package/templates/nuxt/pages/[xorg]/profile.vue.eta +6 -0
  137. package/templates/nuxt/pages/[xorg]/reports/index.vue._eta +18 -0
  138. package/templates/nuxt/pages/[xorg]/user/[id].vue.eta +4 -5
  139. package/templates/nuxt/pages/[xorg]/user/form.vue.eta +6 -1
  140. package/templates/nuxt/pages/[xorg]/user/index.vue.eta +4 -5
  141. package/templates/nuxt/pages/[xorg]/user/new.vue.eta +4 -5
  142. package/templates/nuxt/pages/[xorg]/user/viewer.vue.eta +4 -5
  143. package/templates/nuxt/pages/[xorg]/user.vue.eta +4 -4
  144. package/templates/nuxt/pages/index.vue._eta +4 -4
  145. package/templates/nuxt/pages/login.vue._eta +4 -4
  146. package/templates/nuxt/pages/profile.vue.eta +8 -1
  147. package/templates/nuxt/pages/relogin.vue.eta +6 -0
  148. package/templates/nuxt/plugins/20.simpleapp-userstore.ts.eta +1 -1
  149. package/templates/nuxt/plugins/50.simpleapp-client.ts.eta +1 -1
  150. package/templates/nuxt/server/api/[xorg]/[...].ts.eta +1 -1
  151. package/templates/nuxt/server/api/auth/[...].ts.eta +1 -1
  152. package/templates/nuxt/server/api/auth/logout.ts.eta +1 -1
  153. package/templates/nuxt/server/api/profile/[...].ts.eta +1 -2
  154. package/templates/nuxt/server/api/profile/index.ts.eta +1 -1
  155. package/templates/nuxt/simpleapp/generate/clients/SimpleAppClient.ts.eta +2 -4
  156. package/templates/nuxt/simpleapp/generate/commons/documents.ts.eta +1 -1
  157. package/templates/nuxt/simpleapp/generate/commons/groups.ts.eta +1 -1
  158. package/templates/nuxt/simpleapp/generate/commons/roles.ts.eta +1 -1
  159. package/templates/nuxt/simpleapp/generate/defaults/index.ts.eta +7 -0
  160. package/templates/nuxt/simpleapp/generate/types/index.ts.eta +7 -0
  161. package/templates/nuxt/simpleapp/workflows/forms/index.ts._eta +6 -0
  162. package/templates/nuxt/simpleapp/workflows/forms/simpleapprove.jsonschema.ts._eta +6 -0
  163. package/templates/nuxt/tailwind.config.ts._eta +6 -0
  164. package/templates/nuxt/types/calendar.ts.eta +2 -3
  165. package/templates/nuxt/types/documentlist.ts.eta +3 -3
  166. package/templates/nuxt/types/events.ts.eta +2 -2
  167. package/templates/nuxt/types/index.ts._eta +4 -5
  168. package/templates/nuxt/types/listview.ts.eta +2 -2
  169. package/templates/nuxt/types/notifications.ts.eta +2 -2
  170. package/templates/nuxt/types/others.ts.eta +2 -2
  171. package/templates/nuxt/types/schema.ts.eta +2 -2
  172. package/templates/nuxt/types/simpleappinput.ts.eta +2 -2
  173. package/templates/nuxt/types/user.ts.eta +2 -2
  174. package/templates/nuxt/types/workflow.ts.eta +2 -2
  175. package/templates/project/lang/default._json +1 -1
  176. package/templates/project/sharelibs/hello.ts._eta +6 -0
  177. package/templates/project/sharelibs/index.ts.eta +5 -0
  178. package/tsconfig.tsbuildinfo +1 -1
  179. package/templates/nuxt/components/simpleApp/pending/SimpleAppAutocomplete.vue +0 -135
  180. package/templates/nuxt/components/simpleApp/pending/SimpleAppAutocompletemulti.vue +0 -73
  181. package/templates/nuxt/components/simpleApp/pending/SimpleAppCalendar.vue +0 -55
  182. package/templates/nuxt/components/simpleApp/pending/SimpleAppCheckbox.vue +0 -29
  183. package/templates/nuxt/components/simpleApp/pending/SimpleAppChip.vue +0 -28
  184. package/templates/nuxt/components/simpleApp/pending/SimpleAppColor.vue +0 -41
  185. package/templates/nuxt/components/simpleApp/pending/SimpleAppDocumentNo.vue +0 -90
  186. package/templates/nuxt/components/simpleApp/pending/SimpleAppDynamicInput.vue +0 -29
  187. package/templates/nuxt/components/simpleApp/pending/SimpleAppEditor.vue +0 -31
  188. package/templates/nuxt/components/simpleApp/pending/SimpleAppInputTable.vue +0 -83
  189. package/templates/nuxt/components/simpleApp/pending/SimpleAppList.vue +0 -38
  190. package/templates/nuxt/components/simpleApp/pending/SimpleAppListmulti.vue +0 -41
  191. package/templates/nuxt/components/simpleApp/pending/SimpleAppNumber.vue +0 -43
  192. package/templates/nuxt/components/simpleApp/pending/SimpleAppPassword.vue +0 -41
  193. package/templates/nuxt/components/simpleApp/pending/SimpleAppRadio.vue +0 -42
  194. package/templates/nuxt/components/simpleApp/pending/SimpleAppRating.vue +0 -41
  195. package/templates/nuxt/components/simpleApp/pending/SimpleAppSelect.vue +0 -48
  196. package/templates/nuxt/components/simpleApp/pending/SimpleAppSelectmulti.vue +0 -39
  197. package/templates/nuxt/components/simpleApp/pending/SimpleAppSlider.vue +0 -42
  198. package/templates/nuxt/components/simpleApp/pending/SimpleAppSwitch.vue +0 -30
  199. package/templates/nuxt/components/simpleApp/pending/SimpleAppText.vue +0 -59
  200. package/templates/nuxt/components/simpleApp/pending/SimpleAppTextarea.vue +0 -41
  201. package/templates/nuxt/components/simpleApp/pending/SimpleAppValue.vue +0 -86
  202. package/templates/nuxt/components/simpleApp/pending/helper.ts-backup +0 -90
  203. package/templates/nuxt/components/simpleApp/pending/type.ts-backup +0 -32
  204. package/templates/nuxt/components/suspended/CrudNestedDoc.vue.eta +0 -172
  205. package/templates/nuxt/components/suspended/CrudSimple.vue.eta +0 -181
  206. package/templates/nuxt/components/suspended/Menus.vue.eta +0 -58
  207. package/templates/nuxt/components/suspended/Spinner.vue.eta +0 -9
  208. package/templates/nuxt/lang/df.ts.etaxxxx +0 -16
  209. package/templates/project/sharelibs/hello.ts.eta +0 -1
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
3
+ * --remove-this-line-to-prevent-override--
4
+ * last change 2024-02-22
5
+ * author: Ks Tan
6
+ */
7
+ .listview-item a {
8
+ @apply block
9
+ }
10
+ /* :hover.listview-item a */
11
+ .listview-item:active a{
12
+ @apply dark:bg-primary-950 bg-primary-300
13
+ }
14
+
15
+ .listview-item a.router-link-exact-active{
16
+ @apply dark:bg-gray-700 bg-primary-200
17
+ }
@@ -1,3 +1,9 @@
1
+ /**
2
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
3
+ * --remove-this-line-to-prevent-override--
4
+ * last change 2024-02-22
5
+ * author: Ks Tan
6
+ */
1
7
 
2
8
  [disabled] ,[readonly]{
3
9
  @apply bg-gray-300 dark:bg-gray-600
@@ -32,10 +38,6 @@ body {
32
38
  @apply text-black hover:text-secondary-200 dark:hover:text-primary-400
33
39
  }
34
40
 
35
- .router-link-exact-active{
36
- @apply text-primary-100 dark:text-primary-600 block
37
- }
38
-
39
41
  .invisible{
40
42
  display: none;
41
43
  }
@@ -1,3 +1,9 @@
1
+ /**
2
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
3
+ * --remove-this-line-to-prevent-override--
4
+ * last change 2024-02-22
5
+ * author: Ks Tan
6
+ */
1
7
  /* tailwind.css */
2
8
  @layer tailwind-base {
3
9
  @tailwind base;
@@ -1,7 +1,12 @@
1
+ /**
2
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
3
+ * --remove-this-line-to-prevent-override--
4
+ * last change 2024-02-22
5
+ * author: Ks Tan
6
+ */
1
7
  import { usePassThrough } from "primevue/passthrough";
2
8
  import Tailwind from "primevue/passthrough/tailwind";
3
9
 
4
-
5
10
  const CustomTailwind = usePassThrough(
6
11
  Tailwind,
7
12
  {
@@ -45,7 +50,7 @@ const CustomTailwind = usePassThrough(
45
50
  },
46
51
  button:{root:{class: 'focus:outline-none transition duration-150 ease-in-out rounded p-2 m-1 border dark:border-gray-600'}},
47
52
  dialog:{
48
- root:{class:[' w-full max-h-full max-w-full md:h-3/4 lg:h-1/2 p-2']},
53
+ root:{class:[' w-full max-h-full max-w-full md:h-3/4 lg:h-1/2 border m-2 rounded-lg']},
49
54
  header:{class: 'p-dialog-header flex items-center text-2xl justify-between shrink-0 bg-white text-gray-800 border-t-0 rounded-tl-lg rounded-tr-lg p-6 dark:bg-gray-900 dark:text-white/80'},
50
55
  content:{class:'p-dialog-content overflow-y-auto bg-white text-gray-700 px-6 pb-8 pt-0 dark:bg-gray-900 dark:text-white/80 rounded-bl-lg rounded-br-lg h-full'}
51
56
  },
@@ -73,12 +78,12 @@ const CustomTailwind = usePassThrough(
73
78
  header:{class:'dark:text-white text-2xl p-2'},
74
79
  content:{class:'p-0 pt-0 h-full w-full grow overflow-y-auto'}
75
80
  },
76
- panel: {
77
- root:{class:['border']},
78
- title: {class: ['leading-none font-light text-2xl']},
79
- header:{class:['bg bg-gray-200 h-10 content-middle']},
80
- content:{class:['']}
81
- },
81
+ // panel: {
82
+ // root:{class:['p-0']},
83
+ // title: {class: ['leading-none font-light text-2xl']},
84
+ // header:{style:'padding: 0.7rem;'},
85
+ // content:{class:[' dark:bg-gray-600']}
86
+ // },
82
87
  breadcrumb:{
83
88
  root:{class:''}
84
89
  },
@@ -1,6 +1,18 @@
1
1
  <template>
2
- <!-- this component allow modify -->
3
- <Button class="btn-danger">
4
- <slot></slot>
5
- </Button>
2
+ <Button class="btn-danger"
3
+ @touchcancel="onActivate" @click="onActivate">
4
+ <slot></slot>
5
+ </Button>
6
6
  </template>
7
+ <script setup lang="ts">
8
+ /**
9
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
10
+ * --remove-this-line-to-prevent-override--
11
+ * last change 2024-02-22
12
+ * author: Ks Tan
13
+ */
14
+ const emits = defineEmits(['click'])
15
+ const onActivate=(e:Event)=>{
16
+ emits('click',e)
17
+ }
18
+ </script>
@@ -1,5 +1,18 @@
1
1
  <template>
2
- <Button class="dark:text-white">
3
- <slot></slot>
4
- </Button>
5
- </template>
2
+ <Button class="dark:text-white"
3
+ @touchcancel="onActivate" @click="onActivate">
4
+ <slot></slot>
5
+ </Button>
6
+ </template>
7
+ <script setup lang="ts">
8
+ /**
9
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
10
+ * --remove-this-line-to-prevent-override--
11
+ * last change 2024-02-22
12
+ * author: Ks Tan
13
+ */
14
+ const emits = defineEmits(['click'])
15
+ const onActivate=(e:Event)=>{
16
+ emits('click',e)
17
+ }
18
+ </script>
@@ -1,14 +1,20 @@
1
1
  <template>
2
2
  <div v-for="o in options">
3
- <ButtonPrimary v-if="value == o.value" @click="switchButton(o.value)">{{
3
+ <ButtonPrimary v-if="value == o.value" @touchend="switchButton(o.value)" @click="switchButton(o.value)">{{
4
4
  o.label
5
5
  }}</ButtonPrimary>
6
- <ButtonDefault v-else @click="switchButton(o.value)">{{
6
+ <ButtonDefault v-else @touchend="switchButton(o.value)" @click="switchButton(o.value)">{{
7
7
  o.label
8
8
  }}</ButtonDefault>
9
9
  </div>
10
10
  </template>
11
11
  <script setup lang="ts">
12
+ /**
13
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
14
+ * --remove-this-line-to-prevent-override--
15
+ * last change 2024-02-22
16
+ * author: Ks Tan
17
+ */
12
18
  type keyvalue = { label: string; value: string };
13
19
  const emits = defineEmits(["switch"]);
14
20
  const props = defineProps<{
@@ -1,6 +1,18 @@
1
1
  <template>
2
- <!-- this component allow modify -->
3
- <Button class="btn-primary">
4
- <slot></slot>
5
- </Button>
6
- </template>
2
+ <Button class="btn-primary"
3
+ @touchcancel="onActivate" @click="onActivate">
4
+ <slot></slot>
5
+ </Button>
6
+ </template>
7
+ <script setup lang="ts">
8
+ /**
9
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
10
+ * --remove-this-line-to-prevent-override--
11
+ * last change 2024-02-22
12
+ * author: Ks Tan
13
+ */
14
+ const emits = defineEmits(['click'])
15
+ const onActivate=(e:Event)=>{
16
+ emits('click',e)
17
+ }
18
+ </script>
@@ -0,0 +1,21 @@
1
+ <template>
2
+ <Button
3
+ @touchcancel="onActivate" @click="onActivate"
4
+ class="border-none dark:text-white active:text-primary-600 click:bg-gray-600"
5
+ >
6
+ <slot></slot>
7
+ </Button>
8
+ </template>
9
+ <script setup lang="ts">
10
+ /**
11
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
12
+ * --remove-this-line-to-prevent-override--
13
+ * last change 2024-02-22
14
+ * author: Ks Tan
15
+ */
16
+ const emits = defineEmits(['click'])
17
+
18
+ const onActivate=(e:Event)=>{
19
+ emits('click',e)
20
+ }
21
+ </script>
@@ -1,6 +1,18 @@
1
1
  <template>
2
- <!-- this component allow modify -->
3
- <Button class="btn-warn">
4
- <slot></slot>
5
- </Button>
6
- </template>
2
+ <Button class="btn-warn"
3
+ @touchcancel="onActivate" @click="onActivate">
4
+ <slot></slot>
5
+ </Button>
6
+ </template>
7
+ <script setup lang="ts">
8
+ /**
9
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
10
+ * --remove-this-line-to-prevent-override--
11
+ * last change 2024-02-22
12
+ * author: Ks Tan
13
+ */
14
+ const emits = defineEmits(['click'])
15
+ const onActivate=(e:Event)=>{
16
+ emits('click',e)
17
+ }
18
+ </script>
@@ -1,6 +1,5 @@
1
1
  <template>
2
- <VueCal
3
-
2
+ <VueCal
4
3
  :id="id"
5
4
  ref="vueresourcecal"
6
5
  :disable-views="['years', 'year', 'month', 'week']"
@@ -65,7 +64,12 @@
65
64
  </VueCal>
66
65
  </template>
67
66
  <script setup lang="ts" generic="T">
68
-
67
+ /**
68
+ * This file was automatically generated by simpleapp generator during initialization.
69
+ * IT IS NOT CHANGABLE
70
+ * last change 2024-02-22
71
+ * author: Ks Tan
72
+ */
69
73
 
70
74
  import "vue-cal/dist/vuecal.css";
71
75
  import VueCal, { Event, SplitDaysAttributes } from "vue-cal";
@@ -39,6 +39,12 @@
39
39
  </vue-cal>
40
40
  </template>
41
41
  <script lang="ts" setup generic="T">
42
+ /**
43
+ * This file was automatically generated by simpleapp generator during initialization.
44
+ * IT IS NOT CHANGABLE
45
+ * last change 2024-02-22
46
+ * author: Ks Tan
47
+ */
42
48
  import VueCal, { Event, SplitDaysAttributes } from "vue-cal";
43
49
  import { CalEventType,CalRightClickEvent,OffDay } from '~/types'
44
50
 
@@ -20,9 +20,9 @@
20
20
 
21
21
  <script setup lang="ts">
22
22
  /**
23
- * This file was automatically generated by simpleapp generator during initialization.
24
- * DO NOT MODIFY IT BY HAND.
25
- * last change 2023-09-09
23
+ * This file was automatically generated by simpleapp generator during initialization.
24
+ * IT IS NOT CHANGABLE
25
+ * last change 2024-02-22
26
26
  * author: Ks Tan
27
27
  */
28
28
  // import Panel from 'primevue/panel';
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
2
  /**
3
- * This file was automatically generated by simpleapp generator during initialization.
4
- * IT WONT OVERRIDE AND YOU CAN MODIFY IT.
5
- * last change 2023-09-09
3
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
4
+ * --remove-this-line-to-prevent-override--
5
+ * last change 2024-02-22
6
6
  * author: Ks Tan
7
7
  */
8
8
  import {Notification, EventType} from '~/types'
@@ -34,9 +34,9 @@
34
34
  </template>
35
35
  <script setup lang="ts">
36
36
  /**
37
- * This file was automatically generated by simpleapp generator during initialization.
38
- * IT WONT OVERRIDE AND YOU CAN MODIFY IT.
39
- * last change 2024-01-27
37
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
38
+ * --remove-this-line-to-prevent-override--
39
+ * last change 2024-02-22
40
40
  * author: Ks Tan
41
41
  */
42
42
  import { onKeyStroke } from "@vueuse/core";
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
2
  /**
3
- * This file was automatically generated by simpleapp generator during initialization.
4
- * IT WONT OVERRIDE AND YOU CAN MODIFY IT.
5
- * last change 2023-09-09
3
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
4
+ * --remove-this-line-to-prevent-override--
5
+ * last change 2024-02-22
6
6
  * author: Ks Tan
7
7
  */
8
8
  import {Notification, NotificationStatus} from '~/types'
@@ -41,9 +41,10 @@
41
41
 
42
42
  <script setup lang="ts">
43
43
  /**
44
- * This file was automatically generated by simpleapp generator.
45
- * last change 2024-02-16
46
- * Author: Ks Tan
44
+ * This file was automatically generated by simpleapp generator during initialization.
45
+ * IT IS NOT CHANGABLE
46
+ * last change 2024-02-22
47
+ * author: Ks Tan
47
48
  */
48
49
  import { SimpleAppInputType, FormCrudEvent } from "~/types";
49
50
  import { Branch } from "~/simpleapp/generate/types";
@@ -41,8 +41,14 @@
41
41
 
42
42
  <!-- </header> -->
43
43
  </template>
44
-
45
44
  <script setup lang="ts">
45
+ /**
46
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
47
+ * --remove-this-line-to-prevent-override--
48
+ * last change 2024-02-22
49
+ * author: Ks Tan
50
+ */
51
+
46
52
  import _ from 'lodash'
47
53
  //import ButtonMenuPicker from "./ButtonMenuPicker.vue"
48
54
 
@@ -1,4 +1,10 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * This file was automatically generated by simpleapp generator. Every
4
+ * MODIFICATION OVERRIDE BY GENERATEOR
5
+ * last change 2023-10-28
6
+ * Author: Ks Tan
7
+ */
2
8
  import OverlayPanel from 'primevue/overlaypanel';
3
9
  const op = ref()
4
10
 
@@ -1,4 +1,10 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * This file was automatically generated by simpleapp generator. Every
4
+ * MODIFICATION OVERRIDE BY GENERATEOR
5
+ * last change 2023-10-28
6
+ * Author: Ks Tan
7
+ */
2
8
  import _ from 'lodash'
3
9
  import {ref} from 'vue'
4
10
 
@@ -9,7 +9,12 @@
9
9
  </button>
10
10
  </template>
11
11
  <script setup lang="ts">
12
-
12
+ /**
13
+ * This file was automatically generated by simpleapp generator during initialization.
14
+ * It is NOT CHANGABLE.
15
+ * last change 2024-02-22
16
+ * author: Ks Tan
17
+ */
13
18
  const goHome = () =>{
14
19
 
15
20
  if(getCurrentXorg()){
@@ -6,4 +6,12 @@
6
6
  <span>logout</span>
7
7
 
8
8
  </button>
9
- </template>
9
+ </template>
10
+ <script lang="ts" setup>
11
+ /**
12
+ * This file was automatically generated by simpleapp generator. Every
13
+ * MODIFICATION OVERRIDE BY GENERATEOR
14
+ * last change 2023-10-28
15
+ * Author: Ks Tan
16
+ */
17
+ </script>
@@ -1,4 +1,11 @@
1
1
  <script lang="ts" setup>
2
+ /**
3
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
4
+ * --remove-this-line-to-prevent-override--
5
+ * last change 2024-02-22
6
+ * author: Ks Tan
7
+ */
8
+
2
9
  import Dialog from 'primevue/dialog';
3
10
  // import {ref} from 'vue'
4
11
  import {MenuData} from '~/types'
@@ -1,4 +1,10 @@
1
1
  <script setup lang="ts">
2
+ /**
3
+ * This file was automatically generated by simpleapp generator. Every
4
+ * MODIFICATION OVERRIDE BY GENERATEOR
5
+ * last change 2023-10-28
6
+ * Author: Ks Tan
7
+ */
2
8
  import Avatar from 'primevue/avatar';
3
9
  import Dropdown from 'primevue/dropdown';
4
10
  import OverlayPanel from 'primevue/overlaypanel';
@@ -12,6 +12,13 @@
12
12
  </div>
13
13
  </template>
14
14
  <script setup lang="ts">
15
+ /**
16
+ * This file was automatically generated by simpleapp generator. Every
17
+ * MODIFICATION OVERRIDE BY GENERATEOR
18
+ * last change 2023-10-28
19
+ * Author: Ks Tan
20
+ */
21
+
15
22
  defineEmits(['click'])
16
23
  const props = defineProps<{
17
24
  task:any
@@ -36,6 +36,12 @@
36
36
  </button>
37
37
  </template>
38
38
  <script setup lang="ts">
39
+ /**
40
+ * This file was automatically generated by simpleapp generator. Every
41
+ * MODIFICATION OVERRIDE BY GENERATEOR
42
+ * last change 2023-10-28
43
+ * Author: Ks Tan
44
+ */
39
45
  import {UserTaskType,NotificationStatus} from '~/types'
40
46
  import { useDialog } from 'primevue/usedialog';
41
47
  import * as forms from '~/simpleapp/workflows/forms'
@@ -15,6 +15,12 @@
15
15
  </ListView>
16
16
  </template>
17
17
  <script setup lang="ts" generic="T extends { [key: string]: any }">
18
+ /**
19
+ * This file was automatically generated by simpleapp generator. Every
20
+ * MODIFICATION OVERRIDE BY GENERATEOR
21
+ * last change 2023-10-28
22
+ * Author: Ks Tan
23
+ */
18
24
  import { SearchBody } from "~/types";
19
25
  const emits = defineEmits(["click"]);
20
26
  const props = defineProps<{
@@ -53,6 +53,12 @@
53
53
  </DataTable>
54
54
  </template>
55
55
  <script setup lang="ts" generic="T">
56
+ /**
57
+ * This file was automatically generated by simpleapp generator. Every
58
+ * MODIFICATION OVERRIDE BY GENERATEOR
59
+ * last change 2023-10-28
60
+ * Author: Ks Tan
61
+ */
56
62
  // import { CellSetting } from "~/types";
57
63
  import { FilterMatchMode } from "primevue/api";
58
64
  import DataTable from "primevue/datatable";
@@ -1,6 +1,6 @@
1
1
  <template>
2
- <div class="relative ">
3
- <div v-if="withFilter" class="flex flex-row ">
2
+ <div class="relative">
3
+ <div v-if="withFilter" class="flex flex-row">
4
4
  <InputText
5
5
  placeholder="search"
6
6
  v-model="searchvalue"
@@ -11,18 +11,34 @@
11
11
  ><i class="pi pi-plus"></i
12
12
  ></ButtonPrimary>
13
13
  </div>
14
- <div v-if="showIndex" class="flex flex-col text-sm fixed left-1 top-1/5 text-primary-600 dark:text-primary-400 p-1 z-10 rounded border bg-white dark:bg-black opacity-90">
15
- <A :href="'#'+l" v-for="l in allLetters">{{ l }}</A>
14
+
15
+ <div
16
+ v-if="showIndex"
17
+ class="flex flex-col fixed left-1 top-1/5 gap-2 z-10 rounded border bg-white dark:bg-black opacity-90"
18
+ >
19
+ <NuxtLink
20
+ class="text-primary-600 dark:text-primary-400 text-lg p-2"
21
+ :url="'#' + l"
22
+ v-for="l in allLetters"
23
+ >{{ l }}</NuxtLink
24
+ >
16
25
  </div>
17
-
18
- <div v-if="filterlist && filterlist.length > 0">
19
- <div >
20
- <div v-for="(item, index) in filterlist" :class="isMobile() ? '' : 'overflow overflow-y-scroll overflow-auto '">
21
- <div class="w-full bg-gray-400 dark:bg-gray-500 p-1 pl-2 top-0 sticky opacity-90" v-if="showIndex && titleField && showCategoryBar(item[titleField][0])">
22
- <a :id="item[titleField][0]">{{ item[titleField][0] }}</a></div>
23
- <div :class="getSelectedCSS(item)">
24
- <NuxtLink :to="url ? `${url}/${item[idField]}` : undefined">
25
-
26
+
27
+ <div v-if="filterlist && filterlist.length > 0">
28
+ <div>
29
+ <div v-for="(item, index) in filterlist">
30
+ <!-- :class="isMobile() ? '' : 'overflow overflow-y-scroll overflow-auto '" -->
31
+ <div :id="titleField && item[titleField][0]"></div>
32
+ <div
33
+ class="w-full bg-gray-400 dark:bg-gray-500 p-1 pl-2 top-0 sticky opacity-90"
34
+ v-if="
35
+ showIndex && titleField && showCategoryBar(item[titleField][0])
36
+ "
37
+ >
38
+ <span>{{ item[titleField][0] }}</span>
39
+ </div>
40
+ <div class=" border-l-none border-r-none listview-item border-t-2 dark:border-t-gray-700 hover:" >
41
+ <NuxtLink :to="url ? `${url}/${item[idField]}` : undefined" class="p-2">
26
42
  <slot name="default" :item="item" :index="index">
27
43
  <div class="flex flex-row">
28
44
  <div class="flex-1 mr-2 dark:text-white">
@@ -40,7 +56,7 @@
40
56
  </div>
41
57
  <div v-else>
42
58
  <div
43
- class="w-full h-20 p-2 border-l-none border-r-none hover-list-primary"
59
+ class="w-full h-20 p-2 border-l-none border-r-none "
44
60
  >
45
61
  <slot name="nodata">
46
62
  <div class="border-round border-1 surface-border p-4 surface-card">
@@ -52,6 +68,12 @@
52
68
  </div>
53
69
  </template>
54
70
  <script setup lang="ts" generic="T extends { [key: string]: any }">
71
+ /**
72
+ * This file was automatically generated by simpleapp generator. Every
73
+ * MODIFICATION OVERRIDE BY GENERATEOR
74
+ * last change 2023-10-28
75
+ * Author: Ks Tan
76
+ */
55
77
  import { ref } from "vue";
56
78
  import { ListItem } from "~/types/listview";
57
79
  const props = withDefaults(
@@ -63,14 +85,14 @@ const props = withDefaults(
63
85
  subTitleField?: string;
64
86
  withFilter?: boolean;
65
87
  withAddNew?: boolean;
66
- showIndex?:boolean
88
+ showIndex?: boolean;
67
89
  }>(),
68
90
  {
69
91
  idField: "_id",
70
92
  },
71
93
  );
72
- const letters =ref<string[]> ([])
73
- let lastchar=''
94
+ const letters = ref<string[]>([]);
95
+ let lastchar = "";
74
96
 
75
97
  const emits = defineEmits(["add"]);
76
98
  const searchvalue = ref("");
@@ -99,39 +121,30 @@ const filterlist = computed(() => {
99
121
 
100
122
  return newlist;
101
123
  });
102
- const getSelectedCSS = (item: T) => {
103
- if (selecteditem.value == item.code) {
104
- return "p-2 border-l-none border-r-none bg-sky-200 border-t-2";
105
- } else {
106
- return "p-2 border-l-none border-r-none hover-list-primary border-t-2 dark:border-t-gray-700";
107
- }
108
- };
109
124
 
110
125
 
111
- const allLetters = computed(()=>{
112
- console.log('props.titleFieldprops.titleField',props.titleField,props.list)
113
- if(props.titleField && props.list){
114
-
115
- return props.list.filter((item)=>{
116
- const titlevalue:string = item[props.titleField as keyof typeof item]
117
- if(titlevalue[0]!=lastchar){
118
- lastchar = item[props.titleField as keyof typeof item][0]
119
- return true
120
- }
121
- }).map(item=>item[props.titleField as keyof typeof item][0])
122
-
123
- }else{
124
- return []
126
+ const allLetters = computed(() => {
127
+ if (props.titleField && props.list) {
128
+ return props.list
129
+ .filter((item) => {
130
+ const titlevalue: string = item[props.titleField as keyof typeof item];
131
+ if (titlevalue[0] != lastchar) {
132
+ lastchar = item[props.titleField as keyof typeof item][0];
133
+ return true;
134
+ }
135
+ })
136
+ .map((item) => item[props.titleField as keyof typeof item][0]);
137
+ } else {
138
+ return [];
125
139
  }
140
+ });
126
141
 
127
- })
128
-
129
- const showCategoryBar=(letter:string)=>{
130
- if(lastchar!=letter){
131
- lastchar=letter
132
- return true
133
- }else{
134
- return false
142
+ const showCategoryBar = (letter: string) => {
143
+ if (lastchar != letter && letter.length > 0) {
144
+ lastchar = letter;
145
+ return true;
146
+ } else {
147
+ return false;
135
148
  }
136
- }
149
+ };
137
150
  </script>