sprintify-ui 0.8.65 → 0.8.67
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/sprintify-ui.es.js +863 -869
- package/dist/types/utils/storage.d.ts +3 -2
- package/package.json +1 -1
- package/src/components/BaseDataTable.vue +10 -18
- package/src/utils/storage.ts +3 -2
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
type
|
|
1
|
+
type StorageValue = Record<string, any> | string[] | number[] | number | string | boolean | null | undefined;
|
|
2
|
+
type SettingsStorageGetFunction = (key: string) => Promise<StorageValue>;
|
|
2
3
|
type SettingsStorageSetFunction = (key: string, value: string) => Promise<void>;
|
|
3
4
|
declare class SettingsStorage {
|
|
4
5
|
private getFunction;
|
|
5
6
|
private setFunction;
|
|
6
7
|
constructor(getFunction?: SettingsStorageGetFunction, setFunction?: SettingsStorageSetFunction);
|
|
7
|
-
get(key: string): Promise<
|
|
8
|
+
get(key: string): Promise<StorageValue>;
|
|
8
9
|
set(key: string, value: string): Promise<void>;
|
|
9
10
|
}
|
|
10
11
|
export { SettingsStorage };
|
package/package.json
CHANGED
|
@@ -701,24 +701,16 @@ onMounted(async () => {
|
|
|
701
701
|
visibleColumns.value = visibleColumnsFromStorage;
|
|
702
702
|
}
|
|
703
703
|
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
)
|
|
713
|
-
|
|
714
|
-
.filter((c) => c.toggle)
|
|
715
|
-
.filter((c) => c.toggleDefault ?? true)
|
|
716
|
-
.map((c) => c.newKey);
|
|
717
|
-
|
|
718
|
-
unWatchTable();
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
);
|
|
704
|
+
if (
|
|
705
|
+
table.value &&
|
|
706
|
+
table.value.newColumns.length &&
|
|
707
|
+
visibleColumns.value.length == 0
|
|
708
|
+
) {
|
|
709
|
+
visibleColumns.value = table.value.newColumns
|
|
710
|
+
.filter((c) => c.toggle)
|
|
711
|
+
.filter((c) => c.toggleDefault ?? true)
|
|
712
|
+
.map((c) => c.newKey);
|
|
713
|
+
}
|
|
722
714
|
});
|
|
723
715
|
|
|
724
716
|
/**
|
package/src/utils/storage.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const storageKeyPrefix = 'sui.';
|
|
2
2
|
|
|
3
|
-
type
|
|
3
|
+
type StorageValue = Record<string, any> | string[] | number[] | number | string | boolean | null | undefined;
|
|
4
|
+
type SettingsStorageGetFunction = (key: string) => Promise<StorageValue>;
|
|
4
5
|
type SettingsStorageSetFunction = (key: string, value: string) => Promise<void>;
|
|
5
6
|
|
|
6
7
|
class SettingsStorage {
|
|
@@ -24,7 +25,7 @@ class SettingsStorage {
|
|
|
24
25
|
this.setFunction = setFunction ? setFunction : localStorageSet;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
get(key: string): Promise<
|
|
28
|
+
get(key: string): Promise<StorageValue> {
|
|
28
29
|
return this.getFunction(key);
|
|
29
30
|
}
|
|
30
31
|
|