@simitgroup/simpleapp-generator 1.6.6-h-alpha → 1.6.6-j-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 (185) hide show
  1. package/ReleaseNote.md +13 -1
  2. package/dist/buildinschemas/message.d.ts +3 -0
  3. package/dist/buildinschemas/message.d.ts.map +1 -0
  4. package/dist/buildinschemas/message.js +34 -0
  5. package/dist/buildinschemas/message.js.map +1 -0
  6. package/dist/buildinschemas/webhook.d.ts.map +1 -1
  7. package/dist/buildinschemas/webhook.js +1 -0
  8. package/dist/buildinschemas/webhook.js.map +1 -1
  9. package/dist/buildinschemas/webhookhistory.d.ts +3 -0
  10. package/dist/buildinschemas/webhookhistory.d.ts.map +1 -0
  11. package/dist/buildinschemas/webhookhistory.js +44 -0
  12. package/dist/buildinschemas/webhookhistory.js.map +1 -0
  13. package/dist/createproject.js +138 -0
  14. package/dist/createproject.js.map +1 -0
  15. package/dist/framework.d.ts.map +1 -1
  16. package/dist/framework.js +28 -3
  17. package/dist/framework.js.map +1 -1
  18. package/dist/generate-allow-changebackend.js +305 -0
  19. package/dist/generate-allow-changebackend.js.map +1 -0
  20. package/dist/index.js +0 -0
  21. package/dist/index2.js +118 -0
  22. package/dist/index2.js.map +1 -0
  23. package/dist/installdependency.js +20 -0
  24. package/dist/installdependency.js.map +1 -0
  25. package/dist/installnest.js +2 -0
  26. package/dist/installnest.js.map +1 -0
  27. package/dist/installnuxt.js +2 -0
  28. package/dist/installnuxt.js.map +1 -0
  29. package/dist/processors/groupsbuilder.js +2 -0
  30. package/dist/processors/groupsbuilder.js.map +1 -0
  31. package/dist/schematype/baseschema.js +25 -0
  32. package/dist/schematype/baseschema.js.map +1 -0
  33. package/dist/schematype/default.js +2 -0
  34. package/dist/schematype/default.js.map +1 -0
  35. package/dist/schematype/index.js +12 -0
  36. package/dist/schematype/index.js.map +1 -0
  37. package/dist/schematype/primarymasterdata.js +38 -0
  38. package/dist/schematype/primarymasterdata.js.map +1 -0
  39. package/dist/schematype/simple.js +24 -0
  40. package/dist/schematype/simple.js.map +1 -0
  41. package/dist/schematype/simplemasterdata.js +31 -0
  42. package/dist/schematype/simplemasterdata.js.map +1 -0
  43. package/dist/schematype/transaction.js +74 -0
  44. package/dist/schematype/transaction.js.map +1 -0
  45. package/package.json +1 -1
  46. package/src/buildinschemas/webhook.ts +1 -0
  47. package/src/framework.ts +31 -4
  48. package/templates/basic/nest/controller.ts.eta +6 -5
  49. package/templates/basic/nest/resolver.ts.eta +4 -2
  50. package/templates/basic/nest/service.ts.eta +5 -2
  51. package/templates/nest/.env._eta +1 -1
  52. package/templates/nest/src/simpleapp/generate/commons/middlewares/tenant.middleware.ts.eta +2 -2
  53. package/templates/nest/src/simpleapp/generate/commons/runwebhook.service.ts.eta +99 -107
  54. package/templates/nest/src/simpleapp/generate/commons/user.context.ts.eta +2 -2
  55. package/templates/nest/src/simpleapp/generate/processors/simpleapp.processor.ts.eta +3 -15
  56. package/templates/nuxt/assets/css/style.css._eta +74 -28
  57. package/templates/nuxt/components/calendar/CalendarInput.vue.eta +1 -1
  58. package/templates/nuxt/components/calendar/CalendarSmall.vue.eta +7 -7
  59. package/templates/nuxt/components/debug/DebugDocumentData.vue.eta +2 -3
  60. package/templates/nuxt/components/header/HeaderBreadcrumb.vue.eta +3 -3
  61. package/templates/nuxt/components/header/button/task/HeaderButtonTaskList.vue.eta +2 -2
  62. package/templates/nuxt/components/list/ListDocumentTable.vue.eta +1 -1
  63. package/templates/nuxt/components/list/ListMessages.vue.eta +2 -2
  64. package/templates/nuxt/components/overlay/OverlayPanelWithToolBar.vue.eta +3 -3
  65. package/templates/nuxt/components/overlay/OverlaySideBarCrud.vue.eta +2 -2
  66. package/templates/nuxt/components/page/PageDocList.vue.eta +3 -3
  67. package/templates/nuxt/components/renderer/RendererDateAge.vue.eta +19 -0
  68. package/templates/nuxt/components/simpleApp/SimpleAppCalendarInput.vue.eta +4 -4
  69. package/templates/nuxt/components/simpleApp/SimpleAppDocumentNo.vue.eta +3 -3
  70. package/templates/nuxt/components/simpleApp/SimpleAppInput.vue.eta +2 -3
  71. package/templates/nuxt/components/simpleApp/SimpleAppJsonSchemaForm.vue.eta +2 -15
  72. package/templates/nuxt/components/user/UserButtonPermissionInfo.vue.eta +2 -2
  73. package/templates/nuxt/nuxt.config.ts._eta +6 -5
  74. package/templates/nuxt/pages/index.vue._eta +1 -1
  75. package/templates/nuxt/plugins/40.pusher.ts.eta +8 -2
  76. package/templates/nuxt/presets/lara/accordion/index.js +79 -0
  77. package/templates/nuxt/presets/lara/accordioncontent/index.js +3 -0
  78. package/templates/nuxt/presets/lara/accordionheader/index.js +11 -0
  79. package/templates/nuxt/presets/lara/accordionpanel/index.js +18 -0
  80. package/templates/nuxt/presets/lara/autocomplete/index.js +208 -0
  81. package/templates/nuxt/presets/lara/avatar/index.js +43 -0
  82. package/templates/nuxt/presets/lara/avatargroup/index.js +5 -0
  83. package/templates/nuxt/presets/lara/badge/index.js +47 -0
  84. package/templates/nuxt/presets/lara/badgedirective/index.js +43 -0
  85. package/templates/nuxt/presets/lara/blockui/index.js +4 -0
  86. package/templates/nuxt/presets/lara/breadcrumb/index.js +64 -0
  87. package/templates/nuxt/presets/lara/button/index.js +238 -0
  88. package/templates/nuxt/presets/lara/buttongroup/index.js +12 -0
  89. package/templates/nuxt/presets/lara/card/index.js +37 -0
  90. package/templates/nuxt/presets/lara/carousel/index.js +103 -0
  91. package/templates/nuxt/presets/lara/cascadeselect/index.js +199 -0
  92. package/templates/nuxt/presets/lara/checkbox/index.js +104 -0
  93. package/templates/nuxt/presets/lara/chip/index.js +42 -0
  94. package/templates/nuxt/presets/lara/colorpicker/index.js +123 -0
  95. package/templates/nuxt/presets/lara/confirmdialog/index.js +3 -0
  96. package/templates/nuxt/presets/lara/confirmpopup/index.js +56 -0
  97. package/templates/nuxt/presets/lara/contextmenu/index.js +126 -0
  98. package/templates/nuxt/presets/lara/datatable/index.js +403 -0
  99. package/templates/nuxt/presets/lara/dataview/index.js +28 -0
  100. package/templates/nuxt/presets/lara/datepicker/index.js +435 -0
  101. package/templates/nuxt/presets/lara/deferred/index.js +3 -0
  102. package/templates/nuxt/presets/lara/dialog/index.js +148 -0
  103. package/templates/nuxt/presets/lara/divider/index.js +67 -0
  104. package/templates/nuxt/presets/lara/dock/index.js +86 -0
  105. package/templates/nuxt/presets/lara/drawer/index.js +149 -0
  106. package/templates/nuxt/presets/lara/fieldset/index.js +84 -0
  107. package/templates/nuxt/presets/lara/fileupload/index.js +95 -0
  108. package/templates/nuxt/presets/lara/floatlabel/index.js +26 -0
  109. package/templates/nuxt/presets/lara/galleria/index.js +308 -0
  110. package/templates/nuxt/presets/lara/global.js +90 -0
  111. package/templates/nuxt/presets/lara/iconfield/index.js +27 -0
  112. package/templates/nuxt/presets/lara/image/index.js +206 -0
  113. package/templates/nuxt/presets/lara/index.js +234 -0
  114. package/templates/nuxt/presets/lara/inplace/index.js +27 -0
  115. package/templates/nuxt/presets/lara/inputgroup/index.js +5 -0
  116. package/templates/nuxt/presets/lara/inputgroupaddon/index.js +28 -0
  117. package/templates/nuxt/presets/lara/inputmask/index.js +39 -0
  118. package/templates/nuxt/presets/lara/inputnumber/index.js +167 -0
  119. package/templates/nuxt/presets/lara/inputotp/index.js +10 -0
  120. package/templates/nuxt/presets/lara/inputswitch/index.js +80 -0
  121. package/templates/nuxt/presets/lara/inputtext/index.js +54 -0
  122. package/templates/nuxt/presets/lara/knob/index.js +44 -0
  123. package/templates/nuxt/presets/lara/listbox/index.js +117 -0
  124. package/templates/nuxt/presets/lara/megamenu/index.js +198 -0
  125. package/templates/nuxt/presets/lara/menu/index.js +96 -0
  126. package/templates/nuxt/presets/lara/menubar/index.js +176 -0
  127. package/templates/nuxt/presets/lara/message/index.js +92 -0
  128. package/templates/nuxt/presets/lara/metergroup/index.js +96 -0
  129. package/templates/nuxt/presets/lara/multiselect/index.js +201 -0
  130. package/templates/nuxt/presets/lara/orderlist/index.js +13 -0
  131. package/templates/nuxt/presets/lara/organizationchart/index.js +137 -0
  132. package/templates/nuxt/presets/lara/overlaybadge/index.js +18 -0
  133. package/templates/nuxt/presets/lara/paginator/index.js +178 -0
  134. package/templates/nuxt/presets/lara/panel/index.js +91 -0
  135. package/templates/nuxt/presets/lara/panelmenu/index.js +127 -0
  136. package/templates/nuxt/presets/lara/password/index.js +72 -0
  137. package/templates/nuxt/presets/lara/picklist/index.js +52 -0
  138. package/templates/nuxt/presets/lara/popover/index.js +31 -0
  139. package/templates/nuxt/presets/lara/progressbar/index.js +55 -0
  140. package/templates/nuxt/presets/lara/progressspinner/index.js +51 -0
  141. package/templates/nuxt/presets/lara/radiobutton/index.js +104 -0
  142. package/templates/nuxt/presets/lara/rating/index.js +63 -0
  143. package/templates/nuxt/presets/lara/ripple/index.js +6 -0
  144. package/templates/nuxt/presets/lara/scrollpanel/index.js +77 -0
  145. package/templates/nuxt/presets/lara/scrolltop/index.js +26 -0
  146. package/templates/nuxt/presets/lara/select/index.js +240 -0
  147. package/templates/nuxt/presets/lara/selectbutton/index.js +16 -0
  148. package/templates/nuxt/presets/lara/skeleton/index.js +16 -0
  149. package/templates/nuxt/presets/lara/slider/index.js +137 -0
  150. package/templates/nuxt/presets/lara/speeddial/index.js +57 -0
  151. package/templates/nuxt/presets/lara/splitbutton/index.js +19 -0
  152. package/templates/nuxt/presets/lara/splitter/index.js +61 -0
  153. package/templates/nuxt/presets/lara/splitterpanel/index.js +5 -0
  154. package/templates/nuxt/presets/lara/step/index.js +62 -0
  155. package/templates/nuxt/presets/lara/stepitem/index.js +11 -0
  156. package/templates/nuxt/presets/lara/steplist/index.js +3 -0
  157. package/templates/nuxt/presets/lara/steppanels/index.js +3 -0
  158. package/templates/nuxt/presets/lara/stepper/index.js +13 -0
  159. package/templates/nuxt/presets/lara/steps/index.js +111 -0
  160. package/templates/nuxt/presets/lara/tab/index.js +42 -0
  161. package/templates/nuxt/presets/lara/tablist/index.js +8 -0
  162. package/templates/nuxt/presets/lara/tabmenu/index.js +73 -0
  163. package/templates/nuxt/presets/lara/tabpanel/index.js +3 -0
  164. package/templates/nuxt/presets/lara/tabpanels/index.js +3 -0
  165. package/templates/nuxt/presets/lara/tabs/index.js +5 -0
  166. package/templates/nuxt/presets/lara/tabview/index.js +156 -0
  167. package/templates/nuxt/presets/lara/tag/index.js +38 -0
  168. package/templates/nuxt/presets/lara/terminal/index.js +60 -0
  169. package/templates/nuxt/presets/lara/textarea/index.js +39 -0
  170. package/templates/nuxt/presets/lara/tieredmenu/index.js +121 -0
  171. package/templates/nuxt/presets/lara/timeline/index.js +81 -0
  172. package/templates/nuxt/presets/lara/toast/index.js +102 -0
  173. package/templates/nuxt/presets/lara/togglebutton/index.js +45 -0
  174. package/templates/nuxt/presets/lara/toggleswitch/index.js +80 -0
  175. package/templates/nuxt/presets/lara/toolbar/index.js +28 -0
  176. package/templates/nuxt/presets/lara/tooltip/index.js +46 -0
  177. package/templates/nuxt/presets/lara/tree/index.js +101 -0
  178. package/templates/nuxt/presets/lara/treeselect/index.js +102 -0
  179. package/templates/nuxt/presets/lara/treetable/index.js +305 -0
  180. package/templates/nuxt/simpleapp/generate/clients/SimpleAppClient.ts.eta +2 -16
  181. package/templates/nuxt/tailwind.config.ts._eta +4 -15
  182. package/templates/project/sharelibs/validate.ts.eta +23 -0
  183. /package/templates/nuxt/components/image/{ImageAvatar.vue.eta._vue → ImageAvatar.vue.eta} +0 -0
  184. /package/templates/nuxt/components/image/{ImageOrganization.vue.eta.vue → ImageOrganization.vue.eta} +0 -0
  185. /package/templates/nuxt/components/image/{ImageToBase64Uploader.vue.eta.vue → ImageToBase64Uploader.vue.eta} +0 -0
@@ -60,6 +60,7 @@ body {
60
60
  @apply font-medium text-gray-50 dark:text-gray-300 border
61
61
  }
62
62
 
63
+ /*
63
64
  .btn-primary {
64
65
  @apply btn bg-primary-600 hover:bg-primary-400 dark:!bg-primary-700 dark:hover:bg-primary-800
65
66
  }
@@ -75,34 +76,79 @@ body {
75
76
  .btn-warn {
76
77
  @apply btn bg-warning-600 hover:bg-warning-400
77
78
  }
78
-
79
-
80
-
81
-
82
- .p-component-overlay-enter {
83
- animation: p-component-overlay-enter-animation 150ms forwards;
79
+ */
80
+
81
+ /* Primary and Surface Palettes */
82
+ :root {
83
+ --p-primary-50: #ecfdf5;
84
+ --p-primary-100: #d1fae5;
85
+ --p-primary-200: #a7f3d0;
86
+ --p-primary-300: #6ee7b7;
87
+ --p-primary-400: #34d399;
88
+ --p-primary-500: #10b981;
89
+ --p-primary-600: #059669;
90
+ --p-primary-700: #047857;
91
+ --p-primary-800: #065f46;
92
+ --p-primary-900: #064e3b;
93
+ --p-primary-950: #022c22;
94
+ --p-surface-0: #ffffff;
95
+ --p-surface-50: #f8fafc;
96
+ --p-surface-100: #f1f5f9;
97
+ --p-surface-200: #e2e8f0;
98
+ --p-surface-300: #cbd5e1;
99
+ --p-surface-400: #94a3b8;
100
+ --p-surface-500: #64748b;
101
+ --p-surface-600: #475569;
102
+ --p-surface-700: #334155;
103
+ --p-surface-800: #1e293b;
104
+ --p-surface-900: #0f172a;
105
+ --p-surface-950: #020617;
106
+ --p-content-border-radius: 6px;
107
+ --p-primary: var(--p-primary-500);
108
+ --p-icon-size: 1rem;
109
+ }
110
+
111
+ /* Light Mode */
112
+ :root {
113
+ --p-primary-color: var(--p-primary-500);
114
+ --p-primary-contrast-color: var(--p-surface-0);
115
+ --p-primary-hover-color: var(--p-primary-600);
116
+ --p-primary-active-color: var(--p-primary-700);
117
+ --p-content-border-color: var(--p-surface-200);
118
+ --p-content-hover-background: var(--p-surface-100);
119
+ --p-content-hover-color: var(--p-surface-800);
120
+ --p-highlight-background: var(--p-primary-50);
121
+ --p-highlight-color: var(--p-primary-700);
122
+ --p-highlight-focus-background: var(--p-primary-100);
123
+ --p-highlight-focus-color: var(--p-primary-800);
124
+ --p-text-color: var(--p-surface-700);
125
+ --p-text-hover-color: var(--p-surface-800);
126
+ --p-text-muted-color: var(--p-surface-500);
127
+ --p-text-hover-muted-color: var(--p-surface-600);
84
128
  }
85
129
 
86
- .p-component-overlay-leave {
87
- animation: p-component-overlay-leave-animation 150ms forwards;
88
- }
89
-
90
- .p-component-overlay {
91
- @keyframes p-component-overlay-enter-animation {
92
- from {
93
- background-color: transparent;
94
- }
95
- to {
96
- background-color: var(--maskbg);
97
- }
98
- }
99
-
100
- @keyframes p-component-overlay-leave-animation {
101
- from {
102
- background-color: var(--maskbg);
103
- }
104
- to {
105
- background-color: transparent;
106
- }
107
- }
130
+ /*
131
+ * Dark Mode
132
+ * Change the .p-dark to match the darkMode in tailwind.config.
133
+ * For example;
134
+ * darkMode: ['selector', '[class*="app-dark"]']
135
+ * should match;
136
+ * :root.app-dark
137
+ */
138
+ :root.p-dark {
139
+ --p-primary-color: var(--p-primary-400);
140
+ --p-primary-contrast-color: var(--p-surface-900);
141
+ --p-primary-hover-color: var(--p-primary-300);
142
+ --p-primary-active-color: var(--p-primary-200);
143
+ --p-content-border-color: var(--p-surface-700);
144
+ --p-content-hover-background: var(--p-surface-800);
145
+ --p-content-hover-color: var(--p-surface-0);
146
+ --p-highlight-background: color-mix(in srgb, var(--p-primary-400), transparent 84%);
147
+ --p-highlight-color: rgba(255,255,255,.87);
148
+ --p-highlight-focus-background: color-mix(in srgb, var(--p-primary-400), transparent 76%);
149
+ --p-highlight-focus-color: rgba(255,255,255,.87);
150
+ --p-text-color: var(--p-surface-0);
151
+ --p-text-hover-color: var(--p-surface-0);
152
+ --p-text-muted-color: var(--p-surface-400);
153
+ --p-text-hover-muted-color: var(--p-surface-300);
108
154
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="flex flex-col">
3
3
  <label v-if="label" :for="inputid">{{ label }}</label>
4
- <Calendar
4
+ <DatePicker
5
5
  v-model="modelValue"
6
6
  class="w-full"
7
7
  :inputid="inputid"
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <Calendar
2
+ <DatePicker
3
3
  v-model="selectedDate"
4
4
  inline
5
5
  @update:modelValue="chooseDate"
@@ -33,10 +33,10 @@
33
33
  />
34
34
  </div>
35
35
  </template>
36
- </Calendar>
36
+ </DatePicker>
37
37
  </template>
38
38
  <script setup lang="ts" generic="T">
39
- import { CalendarDateSlotOptions,CalendarMonthChangeEvent } from "primevue/calendar";
39
+ import { DatePickerDateSlotOptions, DatePickerMonthChangeEvent } from "primevue/datepicker";
40
40
 
41
41
  import {
42
42
  CalEventType,
@@ -76,7 +76,7 @@ const disableDays=computed(()=>{
76
76
  })
77
77
  })
78
78
 
79
- function isHoliday(date:CalendarDateSlotOptions){
79
+ function isHoliday(date: DatePickerDateSlotOptions) {
80
80
 
81
81
  for(let i = 0 ; i<props.holidays.length;i++){
82
82
  const item = props.holidays[i]
@@ -111,13 +111,13 @@ const getEventQty = (date:CalendarDateSlotOptions)=>{
111
111
  const recordlength = props.items.filter(item=>item.start==checkdate).length
112
112
  return recordlength
113
113
  }
114
- const viewChange = (event: CalendarMonthChangeEvent) => {
115
- emits("viewChange", event);
114
+ const viewChange = (event: DatePickerMonthChangeEvent) => {
115
+ emits("viewChange", event);
116
116
  };
117
117
 
118
118
 
119
119
  onMounted(() => {
120
- offdays.value = getCurrentBranch()?.branch.offdays ?? [];
120
+ offdays.value = getCurrentBranch()?.branch.offdays ?? [];
121
121
  });
122
122
  </script>
123
123
  <style >
@@ -7,7 +7,7 @@
7
7
  <i class="pi pi-code"></i>
8
8
  <span>{{ label }}</span>
9
9
  </div>
10
- <Sidebar
10
+ <Drawer
11
11
  v-model:visible="visible"
12
12
  :pt="{ root: { class: 'w-5/6' } }"
13
13
  class="text-red-100"
@@ -23,7 +23,7 @@
23
23
  </pre
24
24
  >
25
25
  </template>
26
- </Sidebar>
26
+ </Drawer>
27
27
  </div>
28
28
  </template>
29
29
 
@@ -37,7 +37,6 @@
37
37
  // import Panel from 'primevue/panel';
38
38
  // import ScrollPanel from 'primevue/scrollpanel';
39
39
  import Dialog from "primevue/dialog";
40
- import Sidebar from "primevue/sidebar";
41
40
 
42
41
  import { ref } from "vue";
43
42
  const modelValue = defineModel();
@@ -5,7 +5,7 @@
5
5
  * last change 2023-10-28
6
6
  * Author: Ks Tan
7
7
  */
8
- import OverlayPanel from 'primevue/overlaypanel';
8
+ import Popover from 'primevue/popover';
9
9
  const op = ref()
10
10
 
11
11
  const home = ref({
@@ -63,7 +63,7 @@ const getBranches = ()=>{
63
63
  </NuxtLink>
64
64
  <div v-else>
65
65
  <span class="cursor-pointer dark:text-white" @click="showSwitcher">{{ item.label }}</span>
66
- <OverlayPanel ref="op">
66
+ <Popover ref="op">
67
67
  <div>
68
68
  <ul class="flex flex-col">
69
69
  <li v-for="b in getBranches()" class="p-1 route-link-list ">
@@ -73,7 +73,7 @@ const getBranches = ()=>{
73
73
  </li>
74
74
  </ul>
75
75
  </div>
76
- </OverlayPanel>
76
+ </Popover>
77
77
  </div>
78
78
 
79
79
  </template>
@@ -4,12 +4,12 @@
4
4
  <Badge :value="taskqty" severity="danger"></Badge>
5
5
  </i>
6
6
 
7
- <Sidebar v-model:visible="visible" position="right" :modal="false" :dismissable="false">
7
+ <Drawer v-model:visible="visible" position="right" :modal="false" :dismissable="false">
8
8
  <template #header>
9
9
  <div class="text text-lg font-bold">{{ t('mytasks') }}</div>
10
10
  </template>
11
11
  <HeaderButtonTaskItem v-for="task in tasklist" :task="task" @click="viewTask"></HeaderButtonTaskItem>
12
- </Sidebar>
12
+ </Drawer>
13
13
  <Dialog v-model:visible="dialogvisible"
14
14
  @update:visible="closeDialog"
15
15
  :pt="{root:{class:'w-1/2 h-5/6'}}"
@@ -63,7 +63,7 @@
63
63
  * Author: Ks Tan
64
64
  */
65
65
  // import { CellSetting } from "~/types";
66
- import { FilterMatchMode } from "primevue/api";
66
+ import { FilterMatchMode } from "@primevue/core/api";
67
67
  import DataTable from "primevue/datatable";
68
68
  import Column from "primevue/column";
69
69
  import renderComponent from "~/components/renderer";
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div>
3
- <Sidebar v-model:visible="messagesvisible" position="right" :header="t('messages')">
3
+ <Drawer v-model:visible="messagesvisible" position="right" :header="t('messages')">
4
4
  <ListView :list="list" #default="{ item, index }" @click="openMessage">
5
5
  <div class="flex flex-col">
6
6
  <TextBold v-if="!item.read">{{ item.messageTitle }}</TextBold>
@@ -29,7 +29,7 @@
29
29
  </template>
30
30
  </Dialog>
31
31
  <ConfirmPopup></ConfirmPopup>
32
- </Sidebar>
32
+ </Drawer>
33
33
  </div>
34
34
  </template>
35
35
  <script setup lang="ts">
@@ -1,12 +1,12 @@
1
1
  <template>
2
- <Sidebar
2
+ <Drawer
3
3
  :position="position ?? 'right'"
4
4
  v-if="showDialog"
5
5
  v-model:visible="showDialog"
6
6
  modal
7
7
  :show-close-icon="false"
8
8
  :dismissable="dismissable"
9
- :pt="{root:{class:'w-2/3 border-0 border-l border-l-gray-500'}}"
9
+ :pt="{root:{class:'!w-2/3 border-0 border-l border-l-gray-500'}}"
10
10
  #container
11
11
  >
12
12
  <div class="overflow-y-scroll">
@@ -25,7 +25,7 @@
25
25
  <slot name="default"></slot>
26
26
  </div>
27
27
  </div>
28
- </Sidebar>
28
+ </Drawer>
29
29
  </template>
30
30
  <script lang="ts" setup>
31
31
  /**
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <Sidebar
2
+ <Drawer
3
3
  position="right"
4
4
  v-if="showDialog"
5
5
  v-model:visible="showDialog"
@@ -16,7 +16,7 @@
16
16
  <slot name="default"></slot>
17
17
  </div>
18
18
  </div>
19
- </Sidebar>
19
+ </Drawer>
20
20
  </template>
21
21
  <script lang="ts" setup>
22
22
  /**
@@ -17,19 +17,19 @@
17
17
  <ListDocument
18
18
  v-if="recordlist"
19
19
  @click="showDialogForm"
20
- :recordlist="recordlist as T[]"
20
+ :recordlist="recordlist"
21
21
  :unique-key="uniqueKey"
22
22
  :document-title="documentTitle"
23
23
  >
24
24
  <template #default="{ index, item }">
25
- <slot name="mobileList" :index="index" :item="item as T"></slot>
25
+ <slot name="mobileList" :index="index" :item="item"></slot>
26
26
  </template>
27
27
  </ListDocument>
28
28
  </div>
29
29
  <div v-else class="simpleapp-crudsimple">
30
30
  <ListDocumentTable
31
31
  v-if="recordlist"
32
- :value="recordlist as T[]"
32
+ :value="recordlist"
33
33
  :title="doc.getDocName()"
34
34
  :unique-key="<string>uniqueKey"
35
35
  :document-title="<string>documentTitle"
@@ -0,0 +1,19 @@
1
+ <template>
2
+ <span v-if="modelValue">
3
+ {{ getDayJs()().to(getDayJs()(modelValue)) }}
4
+ </span>
5
+ <span v-else-if="value">
6
+ {{ getDayJs()().to(getDayJs()(value)) }}
7
+ </span>
8
+ <span v-else>-</span>
9
+ </template>
10
+ <script lang="ts" setup>
11
+ /**
12
+ * This file was automatically generated by simpleapp generator during initialization.
13
+ * DONT CHANGE THIS FILE CAUSE IT OVERRIDE
14
+ * last change 2024-06-08
15
+ * author: Ks Tan
16
+ */
17
+ const modelValue = defineModel<Date | string>();
18
+ const props = defineProps<{ value?: Date | string }>();
19
+ </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <Calendar
2
+ <DatePicker
3
3
  :pt="pt"
4
4
  :dateFormat="getPrimevueCalendarDateFormat()"
5
5
  :inputId="uuid"
@@ -12,19 +12,19 @@
12
12
  :showTime="showtime"
13
13
  :timeOnly="timeOnly"
14
14
  hourFormat="12"
15
- v-bind="componentProps as CalendarProps"
15
+ v-bind="componentProps"
16
16
  />
17
17
  </template>
18
18
  <script setup lang="ts">
19
19
  // :date-format="getDateFormat()"
20
- import { CalendarProps } from "primevue/calendar";
20
+ import { DatePickerProps } from "primevue/datepicker";
21
21
  const props = defineProps<{
22
22
  pt: any;
23
23
  uuid: string;
24
24
  placeholder?: string;
25
25
  setting: any;
26
26
  readonly?: boolean;
27
- componentProps?: CalendarProps;
27
+ componentProps?: DatePickerProps;
28
28
  type: "date" | "time" | "datetime";
29
29
  }>();
30
30
 
@@ -23,7 +23,7 @@
23
23
  >
24
24
  <i class="pi pi-angle-down"></i>
25
25
  </button>
26
- <OverlayPanel ref="op">
26
+ <Popover ref="op">
27
27
  <div class="m-4">
28
28
  <ul>
29
29
  <li v-for="docno in docFormatlist" class="hover-list-primary p-2">
@@ -34,7 +34,7 @@
34
34
  </li>
35
35
  </ul>
36
36
  </div>
37
- </OverlayPanel>
37
+ </Popover>
38
38
  </span>
39
39
  <!-- {{ Object.getOwnPropertyNames(setting) }} -->
40
40
  </div>
@@ -47,7 +47,7 @@
47
47
  * Author: Ks Tan
48
48
  */
49
49
  import { ForeignKey } from "~/types";
50
- import OverlayPanel from "primevue/overlaypanel";
50
+ import Popover from "primevue/popover";
51
51
  import InputText from "primevue/inputtext";
52
52
  import { DocNoFormat } from "~/types";
53
53
  const props = defineProps<{
@@ -345,7 +345,7 @@
345
345
  import { autocompletetype } from "~/types";
346
346
  import moment from "moment";
347
347
  import AutoComplete, { AutoCompleteProps } from "primevue/autocomplete";
348
- import Calendar, { CalendarProps } from "primevue/calendar";
348
+ import { DatePickerProps } from "primevue/datepicker";
349
349
  import Checkbox, { CheckboxProps } from "primevue/checkbox";
350
350
  import Chips, { ChipsProps } from "primevue/chips";
351
351
  import SimpleAppDocumentNo from "./SimpleAppDocumentNo.vue";
@@ -359,7 +359,6 @@ import MultiSelect, { MultiSelectProps } from "primevue/multiselect";
359
359
  import Password, { PasswordProps } from "primevue/password";
360
360
  import RadioButton, { RadioButtonProps } from "primevue/radiobutton";
361
361
  import Rating, { RatingProps } from "primevue/rating";
362
- import Slider, { SliderProps } from "primevue/slider";
363
362
  import Textarea, { TextareaProps } from "primevue/textarea";
364
363
  import Editor, { EditorProps } from "primevue/editor";
365
364
  import { SimpleAppInputType } from "~/types";
@@ -390,7 +389,7 @@ const props = withDefaults(
390
389
  | InputTextProps
391
390
  | TextareaProps
392
391
  | DropdownProps
393
- | CalendarProps
392
+ | DatePickerProps
394
393
  | RatingProps;
395
394
  }>(),
396
395
  { type: "text" },
@@ -12,9 +12,7 @@
12
12
  * Author: Ks Tan
13
13
  */
14
14
  import type { JSONSchema7,JSONSchema7Definition } from 'json-schema';
15
- import Ajv from 'ajv';
16
- import addFormats from 'ajv-formats';
17
- import addErrors from 'ajv-errors';
15
+ import { getValidateService } from "~/simpleapp/generate/sharelibs/validate";
18
16
  import _ from 'lodash'
19
17
 
20
18
  const props = defineProps<{
@@ -130,18 +128,7 @@ import _ from 'lodash'
130
128
 
131
129
 
132
130
  const validate=(callback:Function) => {
133
- const ajv = new Ajv({ allErrors: true });
134
- addFormats(ajv);
135
- addErrors(ajv)
136
-
137
- ajv.addFormat('tel',/^$|^\d{7,15}$/gm)
138
- ajv.addFormat('text',/.*$/)
139
- ajv.addFormat('html',/.*$/)
140
- ajv.addFormat('documentno',/.*$/)
141
-
142
- ajv.addKeyword({ keyword: 'x-foreignkey', schemaType: 'string' });
143
- ajv.addKeyword({ keyword: 'x-simpleapp-config', schemaType: 'object' });
144
-
131
+ const ajv = getValidateService();
145
132
 
146
133
  // this.errorlist.value = {};
147
134
  // this.hook('pre-validation', this.data.value);
@@ -3,7 +3,7 @@
3
3
  <button class="" @click="previewPermission">
4
4
  <i class="pi pi-question-circle"></i>
5
5
  </button>
6
- <Sidebar
6
+ <Drawer
7
7
  v-model:visible="showpermissioninfo"
8
8
  modal
9
9
  :pt="{ root: { class: 'w-2/3' } }"
@@ -86,7 +86,7 @@
86
86
  </div>
87
87
  </div>
88
88
  </div>
89
- </Sidebar>
89
+ </Drawer>
90
90
  </div>
91
91
  </template>
92
92
  <script setup lang="ts">
@@ -72,7 +72,7 @@ export default defineNuxtConfig({
72
72
  '@nuxtjs/i18n',
73
73
  'dayjs-nuxt',
74
74
  '@sidebase/nuxt-auth',
75
- 'nuxt-primevue',
75
+ '@primevue/nuxt-module',
76
76
  '@nuxtjs/apollo',
77
77
  // '@nuxtjs/pwa', //cannot turn on, will cause nuxt cant start
78
78
  // "nuxt-security", //temporary avoid nuxt-security cause cors
@@ -125,7 +125,10 @@ export default defineNuxtConfig({
125
125
  options: {
126
126
  ripple: true,
127
127
  inputStyle: 'filled',
128
-
128
+ unstyled: true,
129
+ ptOptions: {
130
+ mergeProps: true,
131
+ },
129
132
  },
130
133
  components: {
131
134
  include: '*',
@@ -134,9 +137,7 @@ export default defineNuxtConfig({
134
137
  directives: {
135
138
  include: ['Ripple', 'Tooltip', 'Badge', 'FocusTrap']
136
139
  },
137
- cssLayerOrder: 'tailwind-base, primevue, tailwind-utilities',
138
- importPT: { as: 'SimpleAppPT', from: path.resolve(__dirname, './assets/primevue/passthrough.ts') },
139
-
140
+ importPT: { from: '../presets/lara/'},
140
141
 
141
142
  },
142
143
  // pinia: {
@@ -7,7 +7,7 @@
7
7
  */
8
8
  const alltenants = ref<any[]>([])
9
9
  const totaltenant = ref(0)
10
- const list = (await getPorfileApi().getAllTenants()).data as any[];
10
+ const list = (await getProfileApi().getAllTenants()).data as any[];
11
11
  if(list.length==0 || list.length>1) navigateTo('/picktenant')
12
12
  else navigateTo (`/${list[0].permissions[0].xOrg}`)
13
13
 
@@ -9,10 +9,16 @@ import Pusher from 'pusher-js';
9
9
  export default defineNuxtPlugin( async(nuxtApp) => {
10
10
  const pusherkey = (useRuntimeConfig().app.PUSHER_KEY ?? '') as string
11
11
  const pushercluster = (useRuntimeConfig().app.PUSHER_CLUSTER ?? '') as string
12
- const pusher = new Pusher(pusherkey, { cluster: pushercluster,});
12
+ let pusher = null;
13
+ if (pusherkey && pushercluster){
14
+ pusher = new Pusher(pusherkey, {
15
+ cluster: pushercluster
16
+ });
17
+ }
18
+
13
19
  return {
14
20
  provide: {
15
- pusher:pusher
21
+ pusher: pusher
16
22
  }
17
23
  }
18
24
  });
@@ -0,0 +1,79 @@
1
+ export default {
2
+ // For PrimeVue 3
3
+ accordiontab: {
4
+ root: {
5
+ class: 'mb-1'
6
+ },
7
+ header: ({ props }) => ({
8
+ class: [
9
+ // State
10
+ { 'select-none pointer-events-none cursor-default opacity-60': props?.disabled }
11
+ ]
12
+ }),
13
+ headerAction: ({ context }) => ({
14
+ class: [
15
+ //Font
16
+ 'font-bold',
17
+ 'leading-none',
18
+
19
+ // Alignments
20
+ 'flex items-center',
21
+ 'relative',
22
+
23
+ // Sizing
24
+ 'p-5',
25
+
26
+ // Shape
27
+ 'rounded-t-md',
28
+ { 'rounded-br-md rounded-bl-md': !context.active, 'rounded-br-0 rounded-bl-0': context.active },
29
+
30
+ // Color
31
+ 'border border-surface-200 dark:border-surface-700',
32
+ 'bg-surface-50 dark:bg-surface-800',
33
+ 'text-surface-600 dark:text-surface-0/80',
34
+ { 'text-surface-900': context.active },
35
+
36
+ // Transition
37
+ 'transition duration-200 ease-in-out',
38
+ 'transition-shadow duration-200',
39
+
40
+ // States
41
+ 'hover:bg-surface-100 dark:hover:bg-surface-700/40',
42
+ 'hover:text-surface-900',
43
+ 'focus:outline-none focus:outline-offset-0 focus-visible:ring focus-visible:ring-primary-400/50 ring-inset dark:focus-visible:ring-primary-300/50', // Focus
44
+
45
+ // Misc
46
+ 'cursor-pointer no-underline select-none'
47
+ ]
48
+ }),
49
+ headerIcon: {
50
+ class: 'inline-block mr-2'
51
+ },
52
+ headerTitle: {
53
+ class: 'leading-none'
54
+ },
55
+ content: {
56
+ class: [
57
+ // Spacing
58
+ 'p-5',
59
+
60
+ //Shape
61
+ 'rounded-tl-none rounded-tr-none rounded-br-lg rounded-bl-lg',
62
+ 'border-t-0',
63
+
64
+ // Color
65
+ 'bg-surface-0 dark:bg-surface-800',
66
+ 'border border-surface-200 dark:border-surface-700',
67
+ 'text-surface-700 dark:text-surface-0/80'
68
+ ]
69
+ },
70
+ transition: {
71
+ enterFromClass: 'max-h-0',
72
+ enterActiveClass: 'overflow-hidden transition-[max-height] duration-1000 ease-[cubic-bezier(0.42,0,0.58,1)]',
73
+ enterToClass: 'max-h-[1000px]',
74
+ leaveFromClass: 'max-h-[1000px]',
75
+ leaveActiveClass: 'overflow-hidden transition-[max-height] duration-[450ms] ease-[cubic-bezier(0,1,0,1)]',
76
+ leaveToClass: 'max-h-0'
77
+ }
78
+ }
79
+ };
@@ -0,0 +1,3 @@
1
+ export default {
2
+ content: 'p-5 bg-surface-0 dark:bg-surface-900 border border-t-0 border-surface-200 dark:border-surface-700 text-surface-700 dark:text-surface-0/80'
3
+ };
@@ -0,0 +1,11 @@
1
+ export default {
2
+ root: ({ context }) => ({
3
+ class: [
4
+ 'flex items-center justify-between font-bold leading-none p-5 border border-surface-200 dark:border-surface-700 bg-surface-50 dark:bg-surface-800 text-surface-600 dark:text-surface-0/80 transition duration-200 ease-in-out',
5
+ {
6
+ 'focus-visible:outline-none focus-visible:border-primary-500 dark:focus-visible:border-primary-400 focus-visible:ring-2 focus-visible:ring-primary-400/20 dark:focus-visible:ring-primary-300/20': !context.disabled
7
+ }
8
+ ]
9
+ }),
10
+ toggleIcon: 'text-surface-600 dark:text-surface-0/80'
11
+ };