adminforth 2.5.2 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/commands/createApp/templates/index.ts.hbs +7 -0
  2. package/commands/createCustomComponent/configLoader.js +3 -0
  3. package/dist/dataConnectors/baseConnector.d.ts.map +1 -1
  4. package/dist/dataConnectors/baseConnector.js +16 -3
  5. package/dist/dataConnectors/baseConnector.js.map +1 -1
  6. package/dist/dataConnectors/mongo.d.ts.map +1 -1
  7. package/dist/dataConnectors/mongo.js +13 -6
  8. package/dist/dataConnectors/mongo.js.map +1 -1
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +19 -8
  12. package/dist/index.js.map +1 -1
  13. package/dist/modules/codeInjector.d.ts.map +1 -1
  14. package/dist/modules/codeInjector.js +20 -3
  15. package/dist/modules/codeInjector.js.map +1 -1
  16. package/dist/modules/configValidator.d.ts.map +1 -1
  17. package/dist/modules/configValidator.js +48 -1
  18. package/dist/modules/configValidator.js.map +1 -1
  19. package/dist/modules/restApi.d.ts.map +1 -1
  20. package/dist/modules/restApi.js +145 -25
  21. package/dist/modules/restApi.js.map +1 -1
  22. package/dist/modules/styles.d.ts +450 -13
  23. package/dist/modules/styles.d.ts.map +1 -1
  24. package/dist/modules/styles.js +506 -31
  25. package/dist/modules/styles.js.map +1 -1
  26. package/dist/modules/utils.d.ts +1 -0
  27. package/dist/modules/utils.d.ts.map +1 -1
  28. package/dist/modules/utils.js +9 -0
  29. package/dist/modules/utils.js.map +1 -1
  30. package/dist/spa/index.html +1 -1
  31. package/dist/spa/src/App.vue +21 -11
  32. package/dist/spa/src/afcl/Button.vue +3 -3
  33. package/dist/spa/src/afcl/Checkbox.vue +21 -13
  34. package/dist/spa/src/afcl/CountryFlag.vue +4 -1
  35. package/dist/spa/src/{components/CustomDatePicker.vue → afcl/DatePicker.vue} +95 -9
  36. package/dist/spa/src/afcl/Dialog.vue +6 -6
  37. package/dist/spa/src/afcl/Dropzone.vue +10 -10
  38. package/dist/spa/src/afcl/Input.vue +4 -4
  39. package/dist/spa/src/afcl/ProgressBar.vue +7 -7
  40. package/dist/spa/src/afcl/Select.vue +51 -21
  41. package/dist/spa/src/afcl/Skeleton.vue +6 -6
  42. package/dist/spa/src/afcl/Table.vue +11 -11
  43. package/dist/spa/src/afcl/Toggle.vue +32 -0
  44. package/dist/spa/src/afcl/Tooltip.vue +1 -1
  45. package/dist/spa/src/afcl/VerticalTabs.vue +3 -3
  46. package/dist/spa/src/afcl/index.ts +2 -1
  47. package/dist/spa/src/components/AcceptModal.vue +6 -6
  48. package/dist/spa/src/components/Breadcrumbs.vue +5 -5
  49. package/dist/spa/src/components/ColumnValueInput.vue +28 -9
  50. package/dist/spa/src/components/ColumnValueInputWrapper.vue +2 -1
  51. package/dist/spa/src/components/CustomDateRangePicker.vue +9 -8
  52. package/dist/spa/src/components/CustomRangePicker.vue +32 -3
  53. package/dist/spa/src/components/Filters.vue +76 -31
  54. package/dist/spa/src/components/GroupsTable.vue +7 -7
  55. package/dist/spa/src/components/ResourceForm.vue +61 -26
  56. package/dist/spa/src/components/ResourceListTable.vue +28 -29
  57. package/dist/spa/src/components/ResourceListTableVirtual.vue +25 -27
  58. package/dist/spa/src/components/ShowTable.vue +8 -6
  59. package/dist/spa/src/components/SingleSkeletLoader.vue +6 -6
  60. package/dist/spa/src/components/SkeleteLoader.vue +1 -1
  61. package/dist/spa/src/components/ThreeDotsMenu.vue +5 -5
  62. package/dist/spa/src/components/Toast.vue +2 -7
  63. package/dist/spa/src/components/ValueRenderer.vue +4 -4
  64. package/dist/spa/src/controls/BoolToggle.vue +34 -0
  65. package/dist/spa/src/spa_types/core.ts +7 -0
  66. package/dist/spa/src/stores/core.ts +1 -1
  67. package/dist/spa/src/types/Back.ts +71 -10
  68. package/dist/spa/src/types/Common.ts +12 -7
  69. package/dist/spa/src/utils.ts +209 -0
  70. package/dist/spa/src/views/CreateView.vue +4 -4
  71. package/dist/spa/src/views/EditView.vue +3 -3
  72. package/dist/spa/src/views/ListView.vue +13 -18
  73. package/dist/spa/src/views/LoginView.vue +22 -24
  74. package/dist/spa/src/views/ResourceParent.vue +1 -1
  75. package/dist/spa/src/views/ShowView.vue +3 -3
  76. package/dist/types/Back.d.ts +55 -8
  77. package/dist/types/Back.d.ts.map +1 -1
  78. package/dist/types/Back.js.map +1 -1
  79. package/dist/types/Common.d.ts +11 -6
  80. package/dist/types/Common.d.ts.map +1 -1
  81. package/dist/types/Common.js.map +1 -1
  82. package/package.json +1 -1
@@ -6,30 +6,32 @@
6
6
  <input
7
7
  ref="inputEl"
8
8
  type="text"
9
- :readonly="readonly"
9
+ :readonly="readonly || searchDisabled"
10
10
  v-model="search"
11
11
  @click="inputClick"
12
12
  @input="inputInput"
13
- class="block w-full pl-3 pr-10 py-2.5 border border-gray-300 rounded-md leading-5 bg-gray-50 placeholder-gray-500 sm:text-sm transition duration-150 ease-in-out dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white focus:ring-lightPrimary focus:border-lightPrimary dark:focus:ring-darkPrimary dark:focus:border-darkPrimary"
13
+ class="block w-full pl-3 pr-10 py-2.5 border border-lightDropownButtonsBorder rounded-md leading-5 bg-lightDropdownButtonsBackground
14
+ placeholder-lightDropdownButtonsPlaceholderText text-lightDropdownButtonsText sm:text-sm transition duration-150 ease-in-out dark:bg-darkDropdownButtonsBackground dark:border-darkDropdownButtonsBorder dark:placeholder-darkDropdownButtonsPlaceholderText
15
+ dark:text-darkDropdownButtonsText focus:ring-lightPrimary focus:border-lightPrimary dark:focus:ring-darkPrimary dark:focus:border-darkPrimary"
14
16
  autocomplete="off" data-custom="no-autofill"
15
17
  :placeholder="
16
18
  selectedItems.length && !multiple ? '' : (showDropdown ? $t('Search') : placeholder || $t('Select...'))
17
19
  "
18
20
  />
19
21
 
20
- <div v-if="!multiple && selectedItems.length" class="absolute pointer-events-none inset-y-0 left-2 flex items-center pr-2 px-1">
22
+ <div v-if="!multiple && selectedItems.length" class="text-lightDropdownButtonsText dark:text-darkDropdownButtonsText absolute pointer-events-none inset-y-0 left-2 flex items-center pr-2 px-1">
21
23
  <slot
22
24
  name="selected-item"
23
25
  :option="selectedItems[0]"
24
26
  ></slot>
25
- <span v-if="!$slots['selected-item']" class="text-lightPrimary dark:text-white font-medium ">
27
+ <span v-if="!$slots['selected-item']" class="text-lightDropdownButtonsText dark:text-darkDropdownButtonsText font-medium ">
26
28
  {{ selectedItems[0]?.label }}
27
29
  </span>
28
30
  </div>
29
31
 
30
32
  <div class="absolute inset-y-0 right-2 flex items-center pointer-events-none">
31
33
  <!-- triangle icon -->
32
- <IconCaretDownSolid class="h-5 w-5 text-lightPrimary dark:text-gray-400 opacity-50 transition duration-150 ease-in"
34
+ <IconCaretDownSolid class="h-5 w-5 text-lightPrimary dark:text-darkPrimary opacity-50 transition duration-150 ease-in"
33
35
  :class="{ 'transform rotate-180': showDropdown }"
34
36
  />
35
37
  </div>
@@ -37,18 +39,19 @@
37
39
  <teleport to="body" v-if="teleportToBody && showDropdown">
38
40
  <div ref="dropdownEl" :style="getDropdownPosition" :class="{'shadow-none': isTop}"
39
41
  class="fixed z-[5] w-full bg-white shadow-lg dark:shadow-black dark:bg-gray-700
40
- dark:border-gray-600 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm max-h-48">
42
+ dark:border-gray-600 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm max-h-48"
43
+ @scroll="handleDropdownScroll">
41
44
  <div
42
45
  v-for="item in filteredItems"
43
46
  :key="item.value"
44
- class="px-4 py-2 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-400"
45
- :class="{ 'bg-lightPrimaryOpacity dark:bg-darkPrimaryOpacity': selectedItems.includes(item) }"
47
+ class="px-4 py-2 cursor-pointer hover:bg-lightDropdownOptionsHoverBackground dark:hover:bg-darkDropdownOptionsHoverBackground text-lightDropdownOptionsText dark:text-darkDropdownOptionsText"
48
+ :class="{ 'bg-lightDropdownPicked dark:bg-darkDropdownPicked': selectedItems.includes(item) }"
46
49
  @click="toogleItem(item)"
47
50
  >
48
51
  <slot name="item" :option="item"></slot>
49
52
  <label v-if="!$slots.item" :for="item.value">{{ item.label }}</label>
50
53
  </div>
51
- <div v-if="!filteredItems.length" class="px-4 py-2 cursor-pointer text-gray-400 dark:text-gray-300">
54
+ <div v-if="!filteredItems.length" class="px-4 py-2 cursor-pointer text-lightDropdownOptionsText dark:text-darkDropdownOptionsText">
52
55
  {{ options.length ? $t('No results found') : $t('No items here') }}
53
56
  </div>
54
57
 
@@ -59,22 +62,23 @@
59
62
  </teleport>
60
63
 
61
64
  <div v-if="!teleportToBody && showDropdown" ref="dropdownEl" :style="dropdownStyle" :class="{'shadow-none': isTop}"
62
- class="absolute z-10 mt-1 w-full bg-white shadow-lg dark:shadow-black dark:bg-gray-700
63
- dark:border-gray-600 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm max-h-48">
65
+ class="absolute z-10 mt-1 w-full bg-lightDropdownOptionsBackground shadow-lg text-lightDropdownButtonsText dark:shadow-black dark:bg-darkDropdownOptionsBackground
66
+ dark:border-gray-600 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm max-h-48"
67
+ @scroll="handleDropdownScroll">
64
68
  <div
65
69
  v-for="item in filteredItems"
66
70
  :key="item.value"
67
- class="px-4 py-2 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-400"
68
- :class="{ 'bg-lightPrimaryOpacity dark:bg-darkPrimaryOpacity': selectedItems.includes(item) }"
71
+ class="px-4 py-2 cursor-pointer text-lightDropdownOptionsText hover:bg-lightDropdownOptionsHoverBackground dark:hover:bg-darkDropdownOptionsHoverBackground dark:text-darkDropdownOptionsText"
72
+ :class="{ 'bg-lightDropdownPicked dark:bg-darkDropdownPicked': selectedItems.includes(item) }"
69
73
  @click="toogleItem(item)"
70
74
  >
71
75
  <slot name="item" :option="item"></slot>
72
76
  <label v-if="!$slots.item" :for="item.value">{{ item.label }}</label>
73
77
  </div>
74
- <div v-if="!filteredItems.length" class="px-4 py-2 cursor-pointer text-gray-400 dark:text-gray-300">
78
+ <div v-if="!filteredItems.length" class="px-4 py-2 cursor-pointer text-lightDropdownOptionsText dark:text-darkDropdownOptionsText">
75
79
  {{ options.length ? $t('No results found') : $t('No items here') }}
76
80
  </div>
77
- <div v-if="$slots['extra-item']" class="px-4 py-2 dark:text-gray-400">
81
+ <div v-if="$slots['extra-item']" class="px-4 py-2 dark:text-darkDropdownOptionsText">
78
82
  <slot name="extra-item"></slot>
79
83
  </div>
80
84
 
@@ -86,12 +90,12 @@
86
90
  <template v-for="item in selectedItems" :key="`afcl-select-${item.value}`">
87
91
  <slot name="selected-item" :item="item"></slot>
88
92
  <div v-if="!$slots['selected-item']"
89
- class="bg-lightPrimaryOpacity text-lightPrimary text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-darkPrimaryOpacity dark:text-darkPrimary">
93
+ class="bg-lightDropdownMultipleSelectBackground text-lightDropdownMultipleSelectText text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-darkDropdownMultipleSelectBackground dark:text-darkDropdownMultipleSelectText">
90
94
  <span>{{ item.label }}</span>
91
95
  <button
92
96
  type="button"
93
97
  @click="toogleItem(item)"
94
- class="z-index-100 flex-shrink-0 ml-1 h-4 w-4 -mr-1 rounded-full inline-flex items-center justify-center text-gray-400 hover:text-gray-500 focus:outline-none focus:text-gray-500 focus:bg-gray-100"
98
+ class="z-index-100 flex-shrink-0 ml-1 h-4 w-4 -mr-1 rounded-full inline-flex items-center justify-center text-lightDropdownMultipleSelectIcon hover:text-lightDropdownMultipleSelectIconHover dark:text-darkDropdownMultipleSelectIcon dark:hover:text-darkDropdownMultipleSelectIconHover focus:outline-none focus:text-lightDropdownMultipleSelectIconFocus focus:bg-lightDropdownMultipleSelectIconFocusBackground dark:focus:text-darkDropdownMultipleSelectIconFocus dark:focus:bg-darkDropdownMultipleSelectIconFocusBackground"
95
99
  >
96
100
  <span class="sr-only">{{ $t('Remove item') }}</span>
97
101
  <svg class="h-2 w-2" stroke="currentColor" fill="none" viewBox="0 0 8 8">
@@ -110,7 +114,7 @@
110
114
  </template>
111
115
 
112
116
  <script setup lang="ts">
113
- import { ref, computed, onMounted, onUnmounted, watch, type Ref } from 'vue';
117
+ import { ref, computed, onMounted, onUnmounted, watch, nextTick, type Ref } from 'vue';
114
118
  import { IconCaretDownSolid } from '@iconify-prerendered/vue-flowbite';
115
119
  import { useElementSize } from '@vueuse/core'
116
120
 
@@ -131,13 +135,17 @@ const props = defineProps({
131
135
  type: Boolean,
132
136
  default: false,
133
137
  },
138
+ searchDisabled: {
139
+ type: Boolean,
140
+ default: false,
141
+ },
134
142
  teleportToBody: {
135
143
  type: Boolean,
136
144
  default: false,
137
145
  },
138
146
  });
139
147
 
140
- const emit = defineEmits(['update:modelValue']);
148
+ const emit = defineEmits(['update:modelValue', 'scroll-near-end', 'search']);
141
149
 
142
150
  const search = ref('');
143
151
  const showDropdown = ref(false);
@@ -158,6 +166,9 @@ function inputInput() {
158
166
  selectedItems.value = [];
159
167
  emit('update:modelValue', null);
160
168
  }
169
+ if (!props.searchDisabled) {
170
+ emit('search', search.value);
171
+ }
161
172
  }
162
173
 
163
174
  function updateFromProps() {
@@ -175,7 +186,7 @@ function updateFromProps() {
175
186
  }
176
187
  }
177
188
 
178
- function inputClick() {
189
+ async function inputClick() {
179
190
  if (props.readonly) return;
180
191
  // Toggle local dropdown
181
192
  showDropdown.value = !showDropdown.value;
@@ -183,6 +194,11 @@ function inputClick() {
183
194
  if (!showDropdown.value && !search.value) {
184
195
  search.value = '';
185
196
  }
197
+
198
+ if(props.teleportToBody){
199
+ await nextTick();
200
+ handleScroll();
201
+ }
186
202
  }
187
203
 
188
204
  watch(
@@ -220,6 +236,15 @@ const handleScroll = () => {
220
236
  }
221
237
  };
222
238
 
239
+ const handleDropdownScroll = (event: Event) => {
240
+ const target = event.target as HTMLElement;
241
+ const threshold = 10; // pixels from bottom
242
+
243
+ if (target.scrollTop + target.clientHeight >= target.scrollHeight - threshold) {
244
+ emit('scroll-near-end');
245
+ }
246
+ };
247
+
223
248
  onMounted(() => {
224
249
  updateFromProps();
225
250
 
@@ -240,7 +265,12 @@ onMounted(() => {
240
265
  });
241
266
 
242
267
  const filteredItems = computed(() => {
243
- return props.options.filter(item =>
268
+
269
+ if (props.searchDisabled) {
270
+ return props.options || [];
271
+ }
272
+
273
+ return (props.options || []).filter((item: any) =>
244
274
  item.label.toLowerCase().includes(search.value.toLowerCase())
245
275
  );
246
276
  });
@@ -1,20 +1,20 @@
1
1
  <template>
2
- <div v-if="type === 'image'" role="status" class="flex animate-pulse items-center justify-center bg-gray-300 rounded dark:bg-gray-700">
3
- <svg class="w-10 h-10 text-gray-200 dark:text-gray-600" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 18">
2
+ <div v-if="type === 'image'" role="status" class="flex animate-pulse items-center justify-center bg-lightSkeletonBackgroundColor rounded dark:bg-darkSkeletonBackgroundColor">
3
+ <svg class="w-10 h-10 text-lightSkeletonIconColor dark:text-darkSkeletonIconColor" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 18">
4
4
  <path d="M18 0H2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2Zm-5.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm4.376 10.481A1 1 0 0 1 16 15H4a1 1 0 0 1-.895-1.447l3.5-7A1 1 0 0 1 7.468 6a.965.965 0 0 1 .9.5l2.775 4.757 1.546-1.887a1 1 0 0 1 1.618.1l2.541 4a1 1 0 0 1 .028 1.011Z"/>
5
5
  </svg>
6
6
  </div>
7
- <div v-else-if="type === 'video'" role="status" class="flex items-center justify-center max-w-sm bg-gray-300 rounded-lg animate-pulse dark:bg-gray-700">
8
- <svg class="w-10 h-10 text-gray-200 dark:text-gray-600" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 20">
7
+ <div v-else-if="type === 'video'" role="status" class="flex items-center justify-center max-w-sm bg-lightSkeletonBackgroundColor rounded-lg animate-pulse dark:bg-darkSkeletonBackgroundColor">
8
+ <svg class="w-10 h-10 text-lightSkeletonIconColor dark:text-darkSkeletonIconColor" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 20">
9
9
  <path d="M5 5V.13a2.96 2.96 0 0 0-1.293.749L.879 3.707A2.98 2.98 0 0 0 .13 5H5Z"/>
10
10
  <path d="M14.066 0H7v5a2 2 0 0 1-2 2H0v11a1.97 1.97 0 0 0 1.934 2h12.132A1.97 1.97 0 0 0 16 18V2a1.97 1.97 0 0 0-1.934-2ZM9 13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2Zm4 .382a1 1 0 0 1-1.447.894L10 13v-2l1.553-1.276a1 1 0 0 1 1.447.894v2.764Z"/>
11
11
  </svg>
12
12
  <span class="sr-only">Loading...</span>
13
13
  </div>
14
- <svg v-else-if="type === 'avatar'" class="me-3 animate-pulse text-gray-200 dark:text-gray-700" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
14
+ <svg v-else-if="type === 'avatar'" class="me-3 animate-pulse text-lightSkeletonIconColor dark:text-darkSkeletonBackgroundColor" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
15
15
  <path d="M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"/>
16
16
  </svg>
17
- <div v-else role="status" class="flex items-center justify-center animate-pulse bg-gray-200 rounded-full dark:bg-gray-700">
17
+ <div v-else role="status" class="flex items-center justify-center animate-pulse bg-lightSkeletonIconColor rounded-full dark:bg-darkSkeletonBackgroundColor">
18
18
  <span class="sr-only">Loading...</span>
19
19
  </div>
20
20
  </template>
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
 
3
3
  <div class="afcl-table-container relative overflow-x-auto shadow-md sm:rounded-lg">
4
- <table class="afcl-table w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
5
- <thead class="afcl-table-thread text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
4
+ <table class="afcl-table w-full text-sm text-left rtl:text-right text-lightTableText dark:text-darkTableText">
5
+ <thead class="afcl-table-thread text-xs text-lightTableHeadingText uppercase bg-lightTableHeadingBackground dark:bg-darkTableHeadingBackground dark:text-darkTableHeadingText">
6
6
  <tr>
7
7
  <th scope="col" class="px-6 py-3"
8
8
  v-for="column in columns"
@@ -19,8 +19,8 @@
19
19
  <tr
20
20
  v-for="(item, index) in dataPage"
21
21
  :class="{
22
- 'afcl-table-body odd:bg-white odd:dark:bg-gray-900 even:bg-gray-50 even:dark:bg-gray-800': evenHighlights,
23
- 'border-b dark:border-gray-700': index !== dataPage.length - 1 || totalPages > 1,
22
+ 'afcl-table-body odd:bg-lightTableOddBackground odd:dark:bg-darkTableOddBackground even:bg-lightTableEvenBackground even:dark:bg-darkTableEvenBackground': evenHighlights,
23
+ 'border-b border-lightTableBorder dark:border-darkTableBorder': index !== dataPage.length - 1 || totalPages > 1,
24
24
  }"
25
25
  >
26
26
  <td class="px-6 py-4"
@@ -38,15 +38,15 @@
38
38
  </tr>
39
39
  </tbody>
40
40
  </table>
41
- <nav class="afcl-table-pagination-container flex items-center flex-column flex-wrap md:flex-row justify-between p-4"
41
+ <nav class="afcl-table-pagination-container bg-lightTableBackground dark:bg-darkTableBackground flex items-center flex-column flex-wrap md:flex-row justify-between p-4"
42
42
  v-if="totalPages > 1"
43
43
  :aria-label="$t('Table navigation')">
44
44
  <i18n-t
45
- keypath="Showing {from} to {to} of {total}" tag="span" class="afcl-table-pagination-text text-sm font-normal text-gray-500 dark:text-gray-400 mb-4 md:mb-0 block w-full md:inline md:w-auto"
45
+ keypath="Showing {from} to {to} of {total}" tag="span" class="afcl-table-pagination-text text-sm font-normal text-lightTablePaginationText dark:text-darkTablePaginationText mb-4 md:mb-0 block w-full md:inline md:w-auto"
46
46
  >
47
- <template #from><span class="font-semibold text-gray-900 dark:text-white">{{ Math.min((currentPage - 1) * props.pageSize + 1, props.data.length) }}</span></template>
48
- <template #to><span class="font-semibold text-gray-900 dark:text-white">{{ Math.min(currentPage * props.pageSize, props.data.length) }}</span></template>
49
- <template #total><span class="font-semibold text-gray-900 dark:text-white">{{ props.data.length }}</span></template>
47
+ <template #from><span class="font-semibold text-lightTablePaginationNumeration dark:text-darkTablePaginationNumeration">{{ Math.min((currentPage - 1) * props.pageSize + 1, props.data.length) }}</span></template>
48
+ <template #to><span class="font-semibold text-lightTablePaginationNumeration dark:text-darkTablePaginationNumeration">{{ Math.min(currentPage * props.pageSize, props.data.length) }}</span></template>
49
+ <template #total><span class="font-semibold text-lightTablePaginationNumeration dark:text-darkTablePaginationNumeration">{{ props.data.length }}</span></template>
50
50
  </i18n-t>
51
51
 
52
52
  <ul class="afcl-table-pagination-list inline-flex -space-x-px rtl:space-x-reverse text-sm h-8">
@@ -55,8 +55,8 @@
55
55
  @click.prevent="switchPage(page)"
56
56
  :aria-current="page === page ? 'page' : undefined"
57
57
  :class='{
58
- "afcl-table-pagination-button text-blue-600 bg-lightPrimary text-lightPrimaryContrast dark:bg-darkPrimary dark:text-darkPrimaryContrast hover:opacity-90": page === currentPage,
59
- "text-gray-500 border bg-white border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white": page !== currentPage,
58
+ "afcl-table-pagination-button text-blue-600 bg-lightActivePaginationButtonBackground text-lightActivePaginationButtonText dark:bg-darkActivePaginationButtonBackground dark:text-darkActivePaginationButtonText hover:opacity-90": page === currentPage,
59
+ "text-lightUnactivePaginationButtonText border bg-lightUnactivePaginationButtonBackground border-lightUnactivePaginationButtonBorder hover:bg-lightUnactivePaginationButtonHoverBackground hover:text-lightUnactivePaginationButtonHoverText dark:bg-darkUnactivePaginationButtonBackground dark:border-darkUnactivePaginationButtonBorder dark:text-darkUnactivePaginationButtonText dark:hover:bg-darkUnactivePaginationButtonHoverBackground dark:hover:text-darkUnactivePaginationButtonHoverText": page !== currentPage,
60
60
  "rounded-s-lg ms-0": page === 1,
61
61
  "rounded-e-lg": page === totalPages,
62
62
  }'
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <label class="inline-flex items-center cursor-pointer bor" :class="{'opacity-50' : props.disabled}">
3
+ <input :id="id"
4
+ type="checkbox"
5
+ value="" class="sr-only peer"
6
+ :disabled="props.disabled"
7
+ :checked="props.modelValue"
8
+ @change="$emit('update:modelValue', $event.target.checked)"
9
+ >
10
+ <div class="border border-lightToggleBorderUnactive relative min-w-11 min-h-6 bg-lightToggleBgUnactive peer-focus:outline-none peer-focus:ring-4
11
+ peer-focus:ring-lightToggleRing dark:peer-focus:ring-darkToggleRing rounded-full peer dark:bg-darkToggleBgUnactive
12
+ peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:top-[2px] peer-checked:border-none
13
+ peer-checked:after:border-lightToggleBorderActive after:content-[''] after:absolute after:top-[1px]
14
+ after:start-[2px] after:bg-lightToggleCircleUnactive peer-checked:after:bg-lightToggleCircleActive dark:after:bg-darkToggleCircleUnactive after:border-lightToggleBgUnactive dark:after:border-darkToggleBgUnactive after:border after:rounded-full
15
+ after:h-5 after:w-5 after:transition-all dark:border-darkToggleBorderUnactive peer-checked:bg-lightToggleBgActive
16
+ dark:peer-checked:bg-darkToggleBgActive dark:peer-checked:after:border-darkToggleBorderActive dark:peer-checked:after:bg-darkToggleCircleActive">
17
+ </div>
18
+ <label :for="id" class="cursor-pointer ms-3 text-sm font-medium text-lightToggleText dark:text-darkToggleText">
19
+ <slot></slot>
20
+ </label>
21
+ </label>
22
+ </template>
23
+
24
+ <script setup lang="ts">
25
+ const props = defineProps({
26
+ modelValue: Boolean,
27
+ disabled: Boolean,
28
+ });
29
+
30
+ defineEmits(['update:modelValue']);
31
+ const id = `afcb-${Math.random().toString(36).substring(7)}`
32
+ </script>
@@ -4,7 +4,7 @@
4
4
  </div>
5
5
  <div
6
6
  role="tooltip"
7
- class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700"
7
+ class="absolute z-20 invisible inline-block px-3 py-2 text-sm font-medium text-lightTooltipText dark:darkTooltipText transition-opacity duration-300 bg-lightTooltipBackground rounded-lg shadow-sm opacity-0 tooltip dark:bg-darkTooltipBackground"
8
8
  ref="tooltip"
9
9
  >
10
10
  <slot name="tooltip"></slot>
@@ -1,19 +1,19 @@
1
1
  <template>
2
2
  <div class="md:flex">
3
- <ul class="flex-column space-y space-y-4 text-sm font-medium text-gray-500 dark:text-gray-400 md:me-4 mb-4 md:mb-0">
3
+ <ul class="flex-column space-y space-y-4 text-sm font-medium text-lightVerticalTabsText dark:text-darkVerticalTabsText md:me-4 mb-4 md:mb-0">
4
4
  <li v-for="tab in tabs" :key="`${tab}-tab-controll`">
5
5
  <a
6
6
  href="#"
7
7
  @click="activeTab = tab"
8
8
  class="inline-flex items-center px-4 py-3 rounded-lg w-full"
9
- :class="tab === activeTab ? 'text-lightPrimaryContrast bg-lightPrimary active dark:bg-darkPrimary' : 'text-gray-500 dark:text-gray-400 hover:text-gray-700 bg-gray-50 hover:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-700 dark:hover:text-white'"
9
+ :class="tab === activeTab ? 'text-lightVerticalTabsTextActive bg-lightVerticalTabsBackgroundActive active dark:bg-darkVerticalTabsBackgroundActive dark:text-darkVerticalTabsTextActive' : 'text-lightVerticalTabsText dark:text-darkVerticalTabsText hover:text-lightVerticalTabsTextHover bg-lightVerticalTabsBackground hover:bg-lightVerticalTabsBackgroundHover dark:bg-darkVerticalTabsBackground dark:hover:bg-darkVerticalTabsBackgroundHover dark:hover:darkVerticalTabsTextHover'"
10
10
  aria-current="page"
11
11
  >
12
12
  <slot :name="`tab:${tab}`"></slot>
13
13
  </a>
14
14
  </li>
15
15
  </ul>
16
- <div class="ps-6 text-medium text-gray-500 dark:text-gray-400 w-full ">
16
+ <div class="ps-6 text-medium text-lightVerticalTabsSlotText dark:text-darkVerticalTabsSlotText w-full ">
17
17
  <slot :name="activeTab"></slot>
18
18
  </div>
19
19
  </div>
@@ -20,5 +20,6 @@ export { default as Dialog } from './Dialog.vue';
20
20
  export { default as MixedChart } from './MixedChart.vue';
21
21
  export { default as CountryFlag } from './CountryFlag.vue';
22
22
  export { default as JsonViewer } from './JsonViewer.vue';
23
-
23
+ export { default as Toggle } from './Toggle.vue';
24
+ export { default as DatePicker } from './DatePicker.vue';
24
25
 
@@ -8,22 +8,22 @@ const modalStore = useModalStore();
8
8
  <Teleport to="body">
9
9
  <div v-if="modalStore.isOpened" class="bg-gray-900/50 dark:bg-gray-900/80 overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-full max-h-full">
10
10
  <div class="relative p-4 w-full max-w-md max-h-full top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 " >
11
- <div class="afcl-confirmation-container relative bg-white rounded-lg shadow dark:bg-gray-700 dark:shadow-black">
12
- <button type="button"@click="modalStore.togleModal" class="absolute top-3 end-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white" >
11
+ <div class="afcl-confirmation-container relative bg-lightAcceptModalBackground rounded-lg shadow dark:bg-darkAcceptModalBackground dark:shadow-black">
12
+ <button type="button"@click="modalStore.togleModal" class="absolute top-3 end-2.5 text-lightAcceptModalCloseIcon bg-transparent hover:bg-lightAcceptModalCloseIconHoverBackground hover:text-lightAcceptModalCloseIconHover rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:text-darkAcceptModalCloseIcon dark:hover:bg-darkAcceptModalCloseIconHoverBackground dark:hover:text-darkAcceptModalCloseIconHover" >
13
13
  <svg class="w-3 h-3" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
14
14
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
15
15
  </svg>
16
16
  <span class="sr-only">{{ $t('Close modal') }}</span>
17
17
  </button>
18
18
  <div class="p-4 md:p-5 text-center">
19
- <svg class="mx-auto mb-4 text-gray-400 w-12 h-12 dark:text-gray-200" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
19
+ <svg class="mx-auto mb-4 text-lightAcceptModalWarningIcon w-12 h-12 dark:text-darkAcceptModalWarningIcon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
20
20
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 11V6m0 8h.01M19 10a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
21
21
  </svg>
22
- <h3 class="afcl-confirmation-title mb-5 text-lg font-normal text-gray-500 dark:text-gray-400">{{ modalStore?.modalContent?.content }}</h3>
23
- <button @click="()=>{ modalStore.onAcceptFunction(true);modalStore.togleModal()}" type="button" class="afcl-confirmation-accept-button text-white bg-red-600 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center">
22
+ <h3 class="afcl-confirmation-title mb-5 text-lg font-normal text-lightAcceptModalText dark:text-darkAcceptModalText">{{ modalStore?.modalContent?.content }}</h3>
23
+ <button @click="()=>{ modalStore.onAcceptFunction(true);modalStore.togleModal()}" type="button" class="afcl-confirmation-accept-button text-lightAcceptModalConfirmButtonText bg-lightAcceptModalConfirmButtonBackground hover:bg-lightAcceptModalConfirmButtonBackgroundHover focus:ring-4 focus:outline-none focus:ring-lightAcceptModalConfirmButtonFocus font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center dark:text-darkAcceptModalConfirmButtonText dark:bg-darkAcceptModalConfirmButtonBackground dark:hover:bg-darkAcceptModalConfirmButtonBackgroundHover dark:focus:ring-darkAcceptModalConfirmButtonFocus">
24
24
  {{ modalStore?.modalContent?.acceptText }}
25
25
  </button>
26
- <button @click="()=>{modalStore.onAcceptFunction(false);modalStore.togleModal()}" type="button" class="afcl-confirmation-cancel-button py-2.5 px-5 ms-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-lightPrimary focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700">{{ modalStore?.modalContent?.cancelText }}</button>
26
+ <button @click="()=>{modalStore.onAcceptFunction(false);modalStore.togleModal()}" type="button" class="afcl-confirmation-cancel-button py-2.5 px-5 ms-3 text-sm font-medium text-lightAcceptModalCancelButtonText focus:outline-none bg-lightAcceptModalCancelButtonBackground rounded-lg border border-lightAcceptModalCancelButtonBorder hover:bg-lightAcceptModalCancelButtonBackgroundHover hover:text-lightPrimary focus:z-10 focus:ring-4 focus:ring-lightAcceptModalCancelButtonFocus dark:focus:ring-darkAcceptModalCancelButtonFocus dark:bg-darkAcceptModalCancelButtonBackground dark:text-darkAcceptModalCancelButtonText dark:border-darkAcceptModalCancelButtonBorder dark:hover:text-darkAcceptModalCancelButtonTextHover dark:hover:bg-darkAcceptModalCancelButtonBackgroundHover">{{ modalStore?.modalContent?.cancelText }}</button>
27
27
  </div>
28
28
  </div>
29
29
  </div>
@@ -2,7 +2,7 @@
2
2
  <nav class="flex" aria-label="Breadcrumb">
3
3
  <ol class="inline-flex items-center space-x-1 md:space-x-2 rtl:space-x-reverse flex-wrap">
4
4
  <li class="inline-flex items-center">
5
- <RouterLink :to="{name: 'home'}" class="inline-flex items-center text-sm font-medium text-gray-700 hover:text-lightPrimary dark:text-gray-400 dark:hover:text-white">
5
+ <RouterLink :to="{name: 'home'}" class="inline-flex items-center text-sm font-medium text-lightBreadcrumbsHomepageText hover:text-lightBreadcrumbsHomepageTextHover dark:text-darkBreadcrumbsHomepageText dark:hover:text-darkBreadcrumbsHomepageTextHover">
6
6
  <svg class="w-3 h-3 me-2.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
7
7
  <path d="m19.707 9.293-2-2-7-7a1 1 0 0 0-1.414 0l-7 7-2 2a1 1 0 0 0 1.414 1.414L2 10.414V18a2 2 0 0 0 2 2h3a1 1 0 0 0 1-1v-4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v4a1 1 0 0 0 1 1h3a2 2 0 0 0 2-2v-7.586l.293.293a1 1 0 0 0 1.414-1.414Z"/>
8
8
  </svg>
@@ -11,19 +11,19 @@
11
11
  </li>
12
12
  <li>
13
13
  <div class="flex items-center">
14
- <svg class="rtl:rotate-180 w-3 h-3 text-gray-400 mx-1" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
14
+ <svg class="rtl:rotate-180 w-3 h-3 text-lightBreadcrumbsArrowIcon dark:text-darkBreadcrumbsArrowIcon mx-1" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
15
15
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 9 4-4-4-4"/>
16
16
  </svg>
17
- <RouterLink :to="{name: 'resource-list', params: { resourceId: $route.params.resourceId }}" class="text-sm font-medium text-gray-500 md:ms-2 dark:text-gray-400">{{ coreStore.resourceById[$route.params.resourceId]?.label }}</RouterLink>
17
+ <RouterLink :to="{name: 'resource-list', params: { resourceId: $route.params.resourceId }}" class="text-sm font-medium text-lightBreadcrumbsText md:ms-2 dark:text-darkBreadcrumbsText">{{ coreStore.resourceById[$route.params.resourceId]?.label }}</RouterLink>
18
18
  </div>
19
19
  </li>
20
20
 
21
21
  <li v-if="$route.params.primaryKey">
22
22
  <div class="flex items-center">
23
- <svg class="rtl:rotate-180 w-3 h-3 text-gray-400 mx-1" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
23
+ <svg class="rtl:rotate-180 w-3 h-3 text-lightBreadcrumbsArrowIcon dark:text-darkBreadcrumbsArrowIcon mx-1" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
24
24
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 9 4-4-4-4"/>
25
25
  </svg>
26
- <span class="ms-1 text-sm font-medium text-gray-500 md:ms-2 dark:text-gray-400
26
+ <span class="ms-1 text-sm font-medium text-lightBreadcrumbsText md:ms-2 dark:text-darkBreadcrumbsText
27
27
  max-w-80 truncate">
28
28
  {{ $route.name === 'resource-edit' ? $t('Edit') : $t('Show') }} {{ coreStore.record?._label }}</span>
29
29
  </div>
@@ -19,12 +19,26 @@
19
19
  ref="input"
20
20
  class="w-full min-w-24"
21
21
  :options="columnOptions[column.name] || []"
22
+ :searchDisabled="!column.foreignResource.searchableFields"
23
+ @scroll-near-end="loadMoreOptions && loadMoreOptions(column.name)"
24
+ @search="(searchTerm) => {
25
+ if (column.foreignResource.searchableFields && onSearchInput && onSearchInput[column.name]) {
26
+ onSearchInput[column.name](searchTerm);
27
+ }
28
+ }"
22
29
  teleportToBody
23
30
  :placeholder = "columnOptions[column.name]?.length ?$t('Select...'): $t('There are no options available')"
24
31
  :modelValue="value"
25
32
  :readonly="(column.editReadonly && source === 'edit') || readonly"
26
33
  @update:modelValue="$emit('update:modelValue', $event)"
27
- />
34
+ >
35
+ <template #extra-item v-if="columnLoadingState && columnLoadingState[column.name]?.loading">
36
+ <div class="text-center text-gray-400 dark:text-gray-300 py-2 flex items-center justify-center gap-2">
37
+ <Spinner class="w-4 h-4" />
38
+ {{ $t('Loading...') }}
39
+ </div>
40
+ </template>
41
+ </Select>
28
42
  <Select
29
43
  v-else-if="column.enum"
30
44
  ref="input"
@@ -60,7 +74,7 @@
60
74
  :modelValue="value"
61
75
  @update:modelValue="$emit('update:modelValue', $event)"
62
76
  />
63
- <CustomDatePicker
77
+ <DatePicker
64
78
  v-else-if="['datetime', 'date', 'time'].includes(type || column.type)"
65
79
  ref="input"
66
80
  :column="column"
@@ -87,7 +101,7 @@
87
101
  <textarea
88
102
  v-else-if="['text', 'richtext'].includes(type || column.type)"
89
103
  ref="input"
90
- class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white focus:ring-lightPrimary focus:border-lightPrimary dark:focus:ring-darkPrimary dark:focus:border-darkPrimary"
104
+ class="bg-lightInputBackground border border-lightInputBorder text-lightInputText placeholder-lightInputPlaceholderText text-sm rounded-lg block w-full p-2.5 dark:bg-darkInputBackground dark:border-darkInputBorder dark:placeholder-darkInputPlaceholderText dark:text-darkInputText dark:border-darkInputBorder focus:ring-lightInputFocusRing focus:border-lightInputFocusBorder dark:focus:ring-darkInputFocusRing dark:focus:border-darkInputFocusBorder"
91
105
  :placeholder="$t('Text')"
92
106
  :value="value"
93
107
  @input="$emit('update:modelValue', $event.target.value)"
@@ -96,7 +110,7 @@
96
110
  <textarea
97
111
  v-else-if="['json'].includes(type || column.type)"
98
112
  ref="input"
99
- class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white focus:ring-lightPrimary focus:border-lightPrimary dark:focus:ring-darkPrimary dark:focus:border-darkPrimary"
113
+ class="bg-lightInputBackground border border-lightInputBorder text-lightInputText placeholder-lightInputPlaceholderText text-sm rounded-lg block w-full p-2.5 dark:bg-darkInputBackground dark:border-darkInputBorder dark:placeholder-darkInputPlaceholderText dark:text-darkInputText dark:border-darkInputBorder focus:ring-lightInputFocusRing focus:border-lightInputFocusBorder dark:focus:ring-darkInputFocusRing dark:focus:border-darkInputFocusBorder"
100
114
  :placeholder="$t('Text')"
101
115
  :value="value"
102
116
  @input="$emit('update:modelValue', $event.target.value)"
@@ -123,7 +137,7 @@
123
137
  class="h-6 inset-y-2 right-0 flex items-center px-2 pt-4 z-index-100 focus:outline-none"
124
138
  @click="$emit('delete')"
125
139
  >
126
- <IconTrashBinSolid class="w-6 h-6 text-gray-400"/>
140
+ <IconTrashBinSolid class="w-6 h-6 text-lightInputIcons dark:text-darkInputIcons"/>
127
141
  </button>
128
142
  <button
129
143
  v-else-if="column.masked"
@@ -131,18 +145,19 @@
131
145
  @click="$emit('update:unmasked')"
132
146
  class="h-6 inset-y-2 right-0 flex items-center px-2 pt-4 z-index-100 focus:outline-none"
133
147
  >
134
- <IconEyeSolid class="w-6 h-6 text-gray-400" v-if="!unmasked[column.name]"/>
135
- <IconEyeSlashSolid class="w-6 h-6 text-gray-400" v-else />
148
+ <IconEyeSolid class="w-6 h-6 text-lightInputIcons dark:text-darkInputIcons" v-if="!unmasked[column.name]"/>
149
+ <IconEyeSlashSolid class="w-6 h-6 text-lightInputIcons dark:text-darkInputIcons" v-else />
136
150
  </button>
137
151
  </div>
138
152
  </template>
139
153
 
140
154
  <script setup lang="ts">
141
155
  import { IconEyeSlashSolid, IconEyeSolid, IconTrashBinSolid } from '@iconify-prerendered/vue-flowbite';
142
- import CustomDatePicker from "@/components/CustomDatePicker.vue";
156
+ import DatePicker from "@/afcl/DatePicker.vue";
143
157
  import Select from '@/afcl/Select.vue';
144
158
  import Input from '@/afcl/Input.vue';
145
- import { ref } from 'vue';
159
+ import Spinner from '@/afcl/Spinner.vue';
160
+ import { ref, inject } from 'vue';
146
161
  import { getCustomComponent } from '@/utils';
147
162
  import { useI18n } from 'vue-i18n';
148
163
  import { useCoreStore } from '@/stores/core';
@@ -171,6 +186,10 @@
171
186
  }
172
187
  );
173
188
 
189
+ const columnLoadingState = inject('columnLoadingState', {} as any);
190
+ const onSearchInput = inject('onSearchInput', {} as any);
191
+ const loadMoreOptions = inject('loadMoreOptions', (() => {}) as any);
192
+
174
193
  const input = ref(null);
175
194
 
176
195
  const getBooleanOptions = (column: any) => {
@@ -13,6 +13,7 @@
13
13
  :currentValues="currentValues"
14
14
  :mode="mode"
15
15
  :columnOptions="columnOptions"
16
+ :unmasked="unmasked"
16
17
  :deletable="!column.editReadonly"
17
18
  @update:modelValue="setCurrentValue(column.name, $event, arrayItemIndex)"
18
19
  @update:unmasked="$emit('update:unmasked', column.name)"
@@ -26,7 +27,7 @@
26
27
  v-if="!column.editReadonly"
27
28
  type="button"
28
29
  @click="addArrayItem"
29
- class="flex items-center py-1 px-3 me-2 text-sm font-medium rounded-default text-gray-900 focus:outline-none bg-white rounded border border-gray-300 hover:bg-gray-100 hover:text-lightPrimary focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700"
30
+ class="flex items-center py-1 px-3 me-2 text-sm font-medium rounded-default text-lightInputText focus:outline-none bg-lightInputBackground rounded border border-lightInputBorder hover:bg-lightInputBackgroundHover hover:text-lightInputTextHover hover:border-lightInputBorderHover focus:z-10 focus:ring-4 focus:ring-lightInputFocusRing dark:focus:ring-darkInputFocusRing dark:bg-darkInputBackground dark:text-darkInputText dark:border-darkInputBorder dark:hover:darkInputTextHover dark:hover:bg-darkInputHover"
30
31
  :class="{'mt-2': currentValues[column.name].length}"
31
32
  >
32
33
  <IconPlusOutline class="w-4 h-4 me-2"/>
@@ -3,21 +3,21 @@
3
3
  <div class="mx-auto grid grid-cols-2 gap-4 mb-2" :class="{hidden: column.type === 'time'}">
4
4
  <div class="relative">
5
5
  <div class="absolute inset-y-0 end-0 top-0 flex items-center pe-3.5 pointer-events-none">
6
- <IconCalendar class="w-4 h-4 text-gray-500 dark:text-gray-400"/>
6
+ <IconCalendar class="w-4 h-4 text-lightDatePickerIcon dark:text-darkDatePickerIcon"/>
7
7
  </div>
8
8
 
9
9
  <input ref="datepickerStartEl" type="text"
10
- class="bg-gray-50 border leading-none border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
10
+ class="bg-lightDatePickerButtonBackground border leading-none border-lightDatePickerButtonBorder text-lightDatePickerButtonText placeholder-lightDatePickerPlaceHolder text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-darkDatePickerButtonBackground dark:border-darkDatePickerButtonBorder dark:placeholder-darkDatePickerPlaceHolder dark:text-darkDatePickerButtonText dark:focus:ring-blue-500 dark:focus:border-blue-500"
11
11
  :placeholder="$t('From')">
12
12
  </div>
13
13
 
14
14
  <div class="relative">
15
15
  <div class="absolute inset-y-0 end-0 top-0 flex items-center pe-3.5 pointer-events-none">
16
- <IconCalendar class="w-4 h-4 text-gray-500 dark:text-gray-400"/>
16
+ <IconCalendar class="w-4 h-4 text-lightDatePickerIcon dark:text-darkDatePickerIcon"/>
17
17
  </div>
18
18
 
19
19
  <input ref="datepickerEndEl" type="text"
20
- class="bg-gray-50 border leading-none border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
20
+ class="bg-lightDatePickerButtonBackground border leading-none border-lightDatePickerButtonBorder text-lightDatePickerButtonText placeholder-lightDatePickerPlaceHolder text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-darkDatePickerButtonBackground dark:border-darkDatePickerButtonBorder dark:placeholder-darkDatePickerPlaceHolder dark:text-darkDatePickerButtonText dark:focus:ring-blue-500 dark:focus:border-blue-500"
21
21
  :placeholder="$t('To')">
22
22
  </div>
23
23
  </div>
@@ -27,11 +27,11 @@
27
27
  <div>
28
28
  <div class="relative">
29
29
  <div class="absolute inset-y-0 end-0 top-0 flex items-center pe-3.5 pointer-events-none">
30
- <IconTime class="w-4 h-4 text-gray-500 dark:text-gray-400 bg-white dark:bg-gray-700"/>
30
+ <IconTime class="w-4 h-4 text-lightDatePickerIcon dark:text-darkDatePickerIcon bg-lightDatePickerButtonBackground dark:bg-darkDatePickerButtonBackground"/>
31
31
  </div>
32
32
 
33
33
  <input v-model="startTime" type="time" id="start-time"
34
- class="bg-gray-50 border leading-none border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
34
+ class="bg-lightDatePickerButtonBackground border leading-none border-lightDatePickerButtonBorder text-lightDatePickerButtonText placeholder-lightDatePickerPlaceHolder text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-darkDatePickerButtonBackground dark:border-darkDatePickerButtonBorder dark:placeholder-darkDatePickerPlaceHolder dark:text-darkDatePickerButtonText dark:focus:ring-blue-500 dark:focus:border-blue-500"
35
35
  value="00:00" required/>
36
36
  </div>
37
37
  </div>
@@ -39,11 +39,11 @@
39
39
  <div>
40
40
  <div class="relative">
41
41
  <div class="absolute inset-y-0 end-0 top-0 flex items-center pe-3.5 pointer-events-none">
42
- <IconTime class="w-4 h-4 text-gray-500 dark:text-gray-400 bg-white dark:bg-gray-700"/>
42
+ <IconTime class="w-4 h-4 text-lightDatePickerIcon dark:text-darkDatePickerIcon bg-lightDatePickerButtonBackground dark:bg-darkDatePickerButtonBackground"/>
43
43
  </div>
44
44
 
45
45
  <input v-model="endTime" type="time" id="end-time"
46
- class="bg-gray-50 border leading-none border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
46
+ class="bg-lightDatePickerButtonBackground border leading-none border-lightDatePickerButtonBorder text-lightDatePickerButtonText placeholder-lightDatePickerPlaceHolder text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-darkDatePickerButtonBackground dark:border-darkDatePickerButtonBorder dark:placeholder-darkDatePickerPlaceHolder dark:text-darkDatePickerButtonText dark:focus:ring-blue-500 dark:focus:border-blue-500"
47
47
  value="00:00" required/>
48
48
  </div>
49
49
  </div>
@@ -172,6 +172,7 @@ function updateFromProps() {
172
172
  if (!props.valueEnd) {
173
173
  datepickerEndEl.value.value = '';
174
174
  endTime.value = '';
175
+ endDate.value = '';
175
176
  } else if (props.column.type === 'time') {
176
177
  endTime.value = props.valueEnd;
177
178
  } else {