adminforth 1.2.46 → 1.2.47
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.
- package/dist/modules/codeInjector.js +1 -1
- package/dist/modules/utils.js +0 -1
- package/dist/spa/spa/src/components/CustomDatePicker.vue +3 -1
- package/dist/spa/spa/src/components/ResourceForm.vue +7 -4
- package/modules/codeInjector.ts +1 -1
- package/modules/utils.ts +0 -1
- package/package.json +1 -1
- package/spa/src/components/CustomDatePicker.vue +3 -1
- package/spa/src/components/ResourceForm.vue +7 -4
|
@@ -404,7 +404,7 @@ class CodeInjector {
|
|
|
404
404
|
const pluginPackages = [];
|
|
405
405
|
// for every installed plugin generate packages
|
|
406
406
|
for (const plugin of this.adminforth.activatedPlugins) {
|
|
407
|
-
console.log('🔧 Checking packages for plugin', plugin.customFolderPath);
|
|
407
|
+
process.env.HEAVY_DEBUG && console.log('🔧 Checking packages for plugin', plugin.constructor.name, plugin.customFolderPath);
|
|
408
408
|
const [lockHash, packages] = yield this.packagesFromNpm(plugin.customFolderPath);
|
|
409
409
|
if (packages.length) {
|
|
410
410
|
pluginPackages.push({
|
package/dist/modules/utils.js
CHANGED
|
@@ -244,7 +244,6 @@ export function createRGBA(color, opacity) {
|
|
|
244
244
|
else if (color.startsWith("rgba")) {
|
|
245
245
|
//add opacity to existing rgba color
|
|
246
246
|
const rgb = color.match(/[\d.]+/g);
|
|
247
|
-
console.log('rgb', rgb);
|
|
248
247
|
return `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, ${Number(rgb[3]) * opacity})`;
|
|
249
248
|
}
|
|
250
249
|
else if (color.startsWith("rgb")) {
|
|
@@ -99,11 +99,13 @@ const start = computed(() => {
|
|
|
99
99
|
return date.utc().toISOString();
|
|
100
100
|
})
|
|
101
101
|
|
|
102
|
-
function updateFromProps() {
|
|
102
|
+
async function updateFromProps() {
|
|
103
103
|
if (!props.valueStart) {
|
|
104
104
|
datepickerStartEl.value.value = '';
|
|
105
105
|
startTime.value = '';
|
|
106
106
|
} else {
|
|
107
|
+
// wait ref to initialize
|
|
108
|
+
await (new Promise(resolve => setTimeout(resolve, 0)));
|
|
107
109
|
datepickerObject.value.setDate(dayjs(props.valueStart).format('DD MMM YYYY'));
|
|
108
110
|
startTime.value = dayjs(props.valueStart).format('HH:mm:ss')
|
|
109
111
|
}
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
</thead>
|
|
18
18
|
<tbody>
|
|
19
19
|
<tr v-for="column, i in editableColumns" :key="column.name"
|
|
20
|
+
v-if="currentValues !== null"
|
|
20
21
|
class="bg-ligftForm dark:bg-gray-800 border-b dark:border-gray-700"
|
|
21
22
|
>
|
|
22
23
|
<td class="px-6 py-4 whitespace-nowrap flex items-center"> <!--align-top-->
|
|
@@ -168,7 +169,7 @@ const mode = computed(() => props.record && Object.keys(props.record).length ?
|
|
|
168
169
|
|
|
169
170
|
const emit = defineEmits(['update:record', 'update:isValid']);
|
|
170
171
|
|
|
171
|
-
const currentValues = ref(
|
|
172
|
+
const currentValues = ref(null);
|
|
172
173
|
|
|
173
174
|
const customComponentsInValidity = ref({});
|
|
174
175
|
const customComponentsEmptiness = ref({});
|
|
@@ -176,6 +177,9 @@ const customComponentsEmptiness = ref({});
|
|
|
176
177
|
|
|
177
178
|
const columnError = (column) => {
|
|
178
179
|
const val = computed(() => {
|
|
180
|
+
if (!currentValues.value) {
|
|
181
|
+
return null;
|
|
182
|
+
}
|
|
179
183
|
if (customComponentsInValidity.value[column.name]) {
|
|
180
184
|
return customComponentsInValidity.value[column.name];
|
|
181
185
|
}
|
|
@@ -244,9 +248,8 @@ const setCurrentValue = (key, value) => {
|
|
|
244
248
|
};
|
|
245
249
|
|
|
246
250
|
onMounted(() => {
|
|
247
|
-
Object.
|
|
248
|
-
|
|
249
|
-
});
|
|
251
|
+
currentValues.value = Object.assign({}, props.record);
|
|
252
|
+
console.log('2️⃣ currentValues', JSON.stringify(currentValues.value));
|
|
250
253
|
initFlowbite();
|
|
251
254
|
emit('update:isValid', isValid.value);
|
|
252
255
|
});
|
package/modules/codeInjector.ts
CHANGED
|
@@ -462,7 +462,7 @@ class CodeInjector implements ICodeInjector {
|
|
|
462
462
|
|
|
463
463
|
// for every installed plugin generate packages
|
|
464
464
|
for (const plugin of this.adminforth.activatedPlugins) {
|
|
465
|
-
console.log('🔧 Checking packages for plugin', plugin.customFolderPath);
|
|
465
|
+
process.env.HEAVY_DEBUG && console.log('🔧 Checking packages for plugin', plugin.constructor.name, plugin.customFolderPath);
|
|
466
466
|
const [lockHash, packages] = await this.packagesFromNpm(plugin.customFolderPath);
|
|
467
467
|
if (packages.length) {
|
|
468
468
|
pluginPackages.push({
|
package/modules/utils.ts
CHANGED
|
@@ -259,7 +259,6 @@ function hexToRGBA(hex,opacity){
|
|
|
259
259
|
else if (color.startsWith("rgba")) {
|
|
260
260
|
//add opacity to existing rgba color
|
|
261
261
|
const rgb = color.match(/[\d.]+/g);
|
|
262
|
-
console.log('rgb',rgb)
|
|
263
262
|
return `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, ${Number(rgb[3]) * opacity})`;
|
|
264
263
|
}
|
|
265
264
|
else if (color.startsWith("rgb")) {
|
package/package.json
CHANGED
|
@@ -99,11 +99,13 @@ const start = computed(() => {
|
|
|
99
99
|
return date.utc().toISOString();
|
|
100
100
|
})
|
|
101
101
|
|
|
102
|
-
function updateFromProps() {
|
|
102
|
+
async function updateFromProps() {
|
|
103
103
|
if (!props.valueStart) {
|
|
104
104
|
datepickerStartEl.value.value = '';
|
|
105
105
|
startTime.value = '';
|
|
106
106
|
} else {
|
|
107
|
+
// wait ref to initialize
|
|
108
|
+
await (new Promise(resolve => setTimeout(resolve, 0)));
|
|
107
109
|
datepickerObject.value.setDate(dayjs(props.valueStart).format('DD MMM YYYY'));
|
|
108
110
|
startTime.value = dayjs(props.valueStart).format('HH:mm:ss')
|
|
109
111
|
}
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
</thead>
|
|
18
18
|
<tbody>
|
|
19
19
|
<tr v-for="column, i in editableColumns" :key="column.name"
|
|
20
|
+
v-if="currentValues !== null"
|
|
20
21
|
class="bg-ligftForm dark:bg-gray-800 border-b dark:border-gray-700"
|
|
21
22
|
>
|
|
22
23
|
<td class="px-6 py-4 whitespace-nowrap flex items-center"> <!--align-top-->
|
|
@@ -168,7 +169,7 @@ const mode = computed(() => props.record && Object.keys(props.record).length ?
|
|
|
168
169
|
|
|
169
170
|
const emit = defineEmits(['update:record', 'update:isValid']);
|
|
170
171
|
|
|
171
|
-
const currentValues = ref(
|
|
172
|
+
const currentValues = ref(null);
|
|
172
173
|
|
|
173
174
|
const customComponentsInValidity = ref({});
|
|
174
175
|
const customComponentsEmptiness = ref({});
|
|
@@ -176,6 +177,9 @@ const customComponentsEmptiness = ref({});
|
|
|
176
177
|
|
|
177
178
|
const columnError = (column) => {
|
|
178
179
|
const val = computed(() => {
|
|
180
|
+
if (!currentValues.value) {
|
|
181
|
+
return null;
|
|
182
|
+
}
|
|
179
183
|
if (customComponentsInValidity.value[column.name]) {
|
|
180
184
|
return customComponentsInValidity.value[column.name];
|
|
181
185
|
}
|
|
@@ -244,9 +248,8 @@ const setCurrentValue = (key, value) => {
|
|
|
244
248
|
};
|
|
245
249
|
|
|
246
250
|
onMounted(() => {
|
|
247
|
-
Object.
|
|
248
|
-
|
|
249
|
-
});
|
|
251
|
+
currentValues.value = Object.assign({}, props.record);
|
|
252
|
+
console.log('2️⃣ currentValues', JSON.stringify(currentValues.value));
|
|
250
253
|
initFlowbite();
|
|
251
254
|
emit('update:isValid', isValid.value);
|
|
252
255
|
});
|