@vc-shell/framework 1.0.38 → 1.0.39
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/components/atoms/vc-badge/vc-badge.stories.ts +27 -0
- package/components/atoms/vc-badge/vc-badge.vue +63 -0
- package/components/atoms/vc-button/vc-button.stories.ts +34 -0
- package/components/atoms/vc-button/vc-button.vue +219 -0
- package/components/atoms/vc-card/vc-card.vue +137 -0
- package/components/atoms/vc-checkbox/vc-checkbox.stories.ts +25 -0
- package/components/atoms/vc-checkbox/vc-checkbox.vue +130 -0
- package/components/atoms/vc-col/vc-col.vue +22 -0
- package/components/atoms/vc-container/vc-container.stories.ts +31 -0
- package/components/atoms/vc-container/vc-container.vue +220 -0
- package/components/atoms/vc-hint/vc-hint.stories.ts +23 -0
- package/components/atoms/vc-hint/vc-hint.vue +11 -0
- package/components/atoms/vc-icon/vc-icon.stories.ts +32 -0
- package/components/atoms/vc-icon/vc-icon.vue +36 -0
- package/components/atoms/vc-image/vc-image.stories.ts +40 -0
- package/components/atoms/vc-image/vc-image.vue +122 -0
- package/components/atoms/vc-info-row/vc-info-row.vue +42 -0
- package/components/atoms/vc-label/vc-label.stories.ts +23 -0
- package/components/atoms/vc-label/vc-label.vue +49 -0
- package/components/atoms/vc-link/vc-link.stories.ts +30 -0
- package/components/atoms/vc-link/vc-link.vue +46 -0
- package/components/atoms/vc-loading/vc-loading.vue +30 -0
- package/components/atoms/vc-progress/vc-progress.stories.ts +25 -0
- package/components/atoms/vc-progress/vc-progress.vue +65 -0
- package/components/atoms/vc-row/vc-row.vue +13 -0
- package/components/atoms/vc-status/vc-status.stories.ts +26 -0
- package/components/atoms/vc-status/vc-status.vue +78 -0
- package/components/atoms/vc-status-icon/vc-status-icon.vue +21 -0
- package/components/atoms/vc-switch/vc-switch.stories.ts +27 -0
- package/components/atoms/vc-switch/vc-switch.vue +100 -0
- package/components/atoms/vc-widget/vc-widget.vue +85 -0
- package/components/index.ts +43 -0
- package/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue +103 -0
- package/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.ts +39 -0
- package/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +21 -0
- package/components/molecules/vc-editor/vc-editor.vue +117 -0
- package/components/molecules/vc-file-upload/vc-file-upload.vue +134 -0
- package/components/molecules/vc-form/vc-form.stories.ts +23 -0
- package/components/molecules/vc-form/vc-form.vue +5 -0
- package/components/molecules/vc-input/vc-input.stories.ts +26 -0
- package/components/molecules/vc-input/vc-input.vue +443 -0
- package/components/molecules/vc-multivalue/vc-multivalue.vue +447 -0
- package/components/molecules/vc-notification/vc-notification.vue +101 -0
- package/components/molecules/vc-pagination/vc-pagination.stories.ts +23 -0
- package/components/molecules/vc-pagination/vc-pagination.vue +169 -0
- package/components/molecules/vc-rating/vc-rating.stories.ts +23 -0
- package/components/molecules/vc-rating/vc-rating.vue +77 -0
- package/components/molecules/vc-select/vc-select.stories.ts +25 -0
- package/components/molecules/vc-select/vc-select.vue +402 -0
- package/components/molecules/vc-slider/vc-slider.vue +106 -0
- package/components/molecules/vc-textarea/vc-textarea.stories.ts +23 -0
- package/components/molecules/vc-textarea/vc-textarea.vue +155 -0
- package/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +146 -0
- package/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +148 -0
- package/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +157 -0
- package/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +110 -0
- package/components/organisms/vc-app/vc-app.stories.ts +75 -0
- package/components/organisms/vc-app/vc-app.vue +171 -0
- package/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +126 -0
- package/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +223 -0
- package/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +67 -0
- package/components/organisms/vc-blade/vc-blade.stories.ts +46 -0
- package/components/organisms/vc-blade/vc-blade.vue +87 -0
- package/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +292 -0
- package/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +123 -0
- package/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +93 -0
- package/components/organisms/vc-gallery/vc-gallery.vue +186 -0
- package/components/organisms/vc-login-form/vc-login-form.stories.ts +55 -0
- package/components/organisms/vc-login-form/vc-login-form.vue +48 -0
- package/components/organisms/vc-popup/vc-popup.stories.ts +23 -0
- package/components/organisms/vc-popup/vc-popup.vue +97 -0
- package/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +113 -0
- package/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue +29 -0
- package/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +152 -0
- package/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +272 -0
- package/components/organisms/vc-table/vc-table.stories.ts +99 -0
- package/components/organisms/vc-table/vc-table.vue +638 -0
- package/core/api/index.ts +1 -0
- package/core/api/platform.ts +8332 -0
- package/core/composables/index.ts +8 -0
- package/core/composables/useAutosave/index.ts +57 -0
- package/core/composables/useFunctions/debounce.ts +18 -0
- package/core/composables/useFunctions/delay.ts +7 -0
- package/core/composables/useFunctions/index.ts +21 -0
- package/core/composables/useFunctions/once.ts +14 -0
- package/core/composables/useFunctions/sleep.ts +4 -0
- package/core/composables/useFunctions/throttle.ts +17 -0
- package/core/composables/useI18n/index.ts +28 -0
- package/core/composables/useLogger/index.ts +24 -0
- package/core/composables/useNotifications/index.ts +116 -0
- package/core/composables/usePermissions/index.ts +32 -0
- package/core/composables/useSettings/index.ts +36 -0
- package/core/composables/useUser/index.ts +266 -0
- package/core/directives/autofocus/index.ts +9 -0
- package/core/directives/click-outside/index.ts +21 -0
- package/core/directives/index.ts +4 -0
- package/core/directives/loading/index.ts +28 -0
- package/core/directives/permissions/index.ts +20 -0
- package/core/plugins/index.ts +1 -0
- package/core/plugins/validation/index.ts +2 -0
- package/core/plugins/validation/rules.ts +196 -0
- package/core/types/index.ts +92 -0
- package/core/utilities/camelToSnake.ts +7 -0
- package/core/utilities/index.ts +1 -0
- package/dist/core/composables/useNotifications/index.d.ts +1 -1
- package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
- package/dist/core/composables/useUser/index.d.ts +2 -2
- package/dist/core/composables/useUser/index.d.ts.map +1 -1
- package/dist/core/plugins/validation/index.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +1 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/framework.js +70 -97
- package/dist/framework.js.map +1 -1
- package/dist/shared/app-switcher/composables/useAppSwitcher/index.d.ts +1 -1
- package/dist/shared/app-switcher/composables/useAppSwitcher/index.d.ts.map +1 -1
- package/dist/shared/app-switcher/index.d.ts +2 -2
- package/dist/shared/app-switcher/index.d.ts.map +1 -1
- package/dist/shared/blade-navigation/composables/useBladeNavigation/index.d.ts +1 -1
- package/dist/shared/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
- package/dist/shared/blade-navigation/types/index.d.ts +1 -1
- package/dist/shared/blade-navigation/types/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/vite.config.d.ts.map +1 -1
- package/package.json +11 -8
- package/shared/app-switcher/components/index.ts +1 -0
- package/shared/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +90 -0
- package/shared/app-switcher/composables/index.ts +1 -0
- package/shared/app-switcher/composables/useAppSwitcher/index.ts +54 -0
- package/shared/app-switcher/index.ts +14 -0
- package/shared/assets/components/assets-details/assets-details.vue +138 -0
- package/shared/assets/components/index.ts +1 -0
- package/shared/assets/index.ts +19 -0
- package/shared/assets/locales/en.json +29 -0
- package/shared/assets/locales/index.ts +2 -0
- package/shared/blade-navigation/components/index.ts +1 -0
- package/shared/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +84 -0
- package/shared/blade-navigation/composables/index.ts +1 -0
- package/shared/blade-navigation/composables/useBladeNavigation/index.ts +216 -0
- package/shared/blade-navigation/index.ts +15 -0
- package/shared/blade-navigation/types/index.ts +52 -0
- package/shared/index.ts +16 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Directive, DirectiveBinding } from "vue";
|
|
2
|
+
|
|
3
|
+
const className = "v-loading";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
mounted: function (el: HTMLElement, binding: DirectiveBinding): void {
|
|
7
|
+
console.log("v-loading mount");
|
|
8
|
+
const loader = document.createElement("div");
|
|
9
|
+
loader.className = className;
|
|
10
|
+
loader.innerHTML = "Loading...";
|
|
11
|
+
loader.style.display = binding.value ? "flex" : "none";
|
|
12
|
+
loader.style.position = "absolute";
|
|
13
|
+
loader.style.alignItems = "center";
|
|
14
|
+
loader.style.justifyContent = "center";
|
|
15
|
+
loader.style.background = "rgba(255, 255, 255, 0.75)";
|
|
16
|
+
loader.style.zIndex = "9999";
|
|
17
|
+
loader.style.width = "100%";
|
|
18
|
+
loader.style.height = "100%";
|
|
19
|
+
el.appendChild(loader);
|
|
20
|
+
},
|
|
21
|
+
updated: function (el: HTMLElement, binding: DirectiveBinding): void {
|
|
22
|
+
console.log("v-loading updated");
|
|
23
|
+
const loader = el.querySelector(`.${className}`) as HTMLElement;
|
|
24
|
+
if (loader) {
|
|
25
|
+
loader.style.display = binding.value ? "flex" : "none";
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
} as Directive;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Directive, DirectiveBinding } from "vue";
|
|
2
|
+
import { usePermissions } from "@/core/composables";
|
|
3
|
+
const { checkPermission } = usePermissions();
|
|
4
|
+
|
|
5
|
+
function checkAndRemove(el: HTMLElement, binding: DirectiveBinding) {
|
|
6
|
+
const { value: permissions } = binding;
|
|
7
|
+
const result = checkPermission(permissions);
|
|
8
|
+
if (result === false) {
|
|
9
|
+
el.parentNode && el.parentNode.removeChild(el);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
mounted(el: HTMLElement, binding: DirectiveBinding): void {
|
|
15
|
+
checkAndRemove(el, binding);
|
|
16
|
+
},
|
|
17
|
+
updated(el: HTMLElement, binding: DirectiveBinding): void {
|
|
18
|
+
checkAndRemove(el, binding);
|
|
19
|
+
},
|
|
20
|
+
} as Directive;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './validation'
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { defineRule } from "vee-validate";
|
|
2
|
+
import { email, numeric } from "@vee-validate/rules";
|
|
3
|
+
|
|
4
|
+
// Define global validation rules
|
|
5
|
+
|
|
6
|
+
// required
|
|
7
|
+
export const required = (value: unknown) => {
|
|
8
|
+
if (
|
|
9
|
+
value === null ||
|
|
10
|
+
value === undefined ||
|
|
11
|
+
value === false ||
|
|
12
|
+
value === ""
|
|
13
|
+
) {
|
|
14
|
+
return "This field is required";
|
|
15
|
+
}
|
|
16
|
+
return true;
|
|
17
|
+
};
|
|
18
|
+
defineRule("required", required);
|
|
19
|
+
|
|
20
|
+
// numeric
|
|
21
|
+
export { numeric } from "@vee-validate/rules";
|
|
22
|
+
defineRule("numeric", numeric);
|
|
23
|
+
|
|
24
|
+
// email
|
|
25
|
+
export { email } from "@vee-validate/rules";
|
|
26
|
+
defineRule("email", email);
|
|
27
|
+
|
|
28
|
+
// min
|
|
29
|
+
export const min = (value: string, [limit]: number[]) => {
|
|
30
|
+
// The field is empty so it should pass
|
|
31
|
+
if (!value || !value.length) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
if (value.length < limit) {
|
|
35
|
+
return `This field must contain at least ${limit} characters`;
|
|
36
|
+
}
|
|
37
|
+
return true;
|
|
38
|
+
};
|
|
39
|
+
defineRule("min", min);
|
|
40
|
+
|
|
41
|
+
// max
|
|
42
|
+
export const max = (value: string, [limit]: number[]) => {
|
|
43
|
+
// The field is empty so it should pass
|
|
44
|
+
if (!value || !value.length) {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
if (value.length > limit) {
|
|
48
|
+
return `This field must contain not more than ${limit} characters`;
|
|
49
|
+
}
|
|
50
|
+
return true;
|
|
51
|
+
};
|
|
52
|
+
defineRule("max", max);
|
|
53
|
+
|
|
54
|
+
// regex
|
|
55
|
+
export const regex = (value: string, [re]: RegExp[]) => {
|
|
56
|
+
// Field is empty, should pass
|
|
57
|
+
if (!value || !value.length) {
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
// Check if matched
|
|
61
|
+
if (!re.test(value)) {
|
|
62
|
+
return "This field must match a given pattern";
|
|
63
|
+
}
|
|
64
|
+
return true;
|
|
65
|
+
};
|
|
66
|
+
defineRule("regex", regex);
|
|
67
|
+
|
|
68
|
+
// min_value
|
|
69
|
+
export const min_value = (value: string, [min]: number[]) => {
|
|
70
|
+
// The field is empty so it should pass
|
|
71
|
+
if (!value || !value.length) {
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
const numericValue = Number(value);
|
|
75
|
+
if (numericValue < min) {
|
|
76
|
+
return `Value must be greater than ${min}`;
|
|
77
|
+
}
|
|
78
|
+
return true;
|
|
79
|
+
};
|
|
80
|
+
defineRule("min_value", min_value);
|
|
81
|
+
|
|
82
|
+
// max_value
|
|
83
|
+
export const max_value = (value: string, [max]: number[]) => {
|
|
84
|
+
// The field is empty so it should pass
|
|
85
|
+
if (!value || !value.length) {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
const numericValue = Number(value);
|
|
89
|
+
if (numericValue > max) {
|
|
90
|
+
return `Value must be less than ${max}`;
|
|
91
|
+
}
|
|
92
|
+
return true;
|
|
93
|
+
};
|
|
94
|
+
defineRule("max_value", max_value);
|
|
95
|
+
|
|
96
|
+
// after
|
|
97
|
+
export const after = (value: string, [target]: string[]) => {
|
|
98
|
+
// The field is empty so it should pass
|
|
99
|
+
if (!value || !value.length) {
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const first_date = new Date(value);
|
|
104
|
+
const second_date = new Date(target);
|
|
105
|
+
|
|
106
|
+
if (first_date.getTime() > 0 && second_date.getTime() > 0) {
|
|
107
|
+
if (second_date.getTime() > first_date.getTime()) {
|
|
108
|
+
return "End date must be later than start date";
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return true;
|
|
113
|
+
};
|
|
114
|
+
defineRule("after", after);
|
|
115
|
+
|
|
116
|
+
// maxdimensions
|
|
117
|
+
export const maxdimensions = (
|
|
118
|
+
images: HTMLInputElement,
|
|
119
|
+
[width, height]: [string | number, string | number]
|
|
120
|
+
) => {
|
|
121
|
+
// The field is empty so it should pass
|
|
122
|
+
if (!images?.files || !images.files?.length) {
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const validateImage = (
|
|
127
|
+
file: File,
|
|
128
|
+
width: string | number,
|
|
129
|
+
height: string | number
|
|
130
|
+
) => {
|
|
131
|
+
const URL = window.URL || window.webkitURL;
|
|
132
|
+
return new Promise((resolve) => {
|
|
133
|
+
const image = new Image();
|
|
134
|
+
image.onerror = () => resolve(false);
|
|
135
|
+
image.onload = () => {
|
|
136
|
+
const isValid =
|
|
137
|
+
image.width >= Number(width) && image.height >= Number(height);
|
|
138
|
+
if (isValid) {
|
|
139
|
+
resolve(true);
|
|
140
|
+
} else {
|
|
141
|
+
resolve(`Image dimensions must be greater than ${height}*${width}`);
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
image.src = URL.createObjectURL(file);
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
const list = [];
|
|
149
|
+
const fileList = images.files;
|
|
150
|
+
for (let i = 0; i < fileList.length; i++) {
|
|
151
|
+
if (!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(fileList[i].name)) {
|
|
152
|
+
return Promise.resolve("Not image file");
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
list.push(fileList[i]);
|
|
156
|
+
}
|
|
157
|
+
return Promise.all(
|
|
158
|
+
list.map((file) => validateImage(file, width, height))
|
|
159
|
+
).then((res) => {
|
|
160
|
+
const isInvalid = res.find((x) => x !== true);
|
|
161
|
+
if (isInvalid === false || typeof isInvalid === "string") {
|
|
162
|
+
return isInvalid;
|
|
163
|
+
} else {
|
|
164
|
+
return true;
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
defineRule("maxdimensions", maxdimensions);
|
|
169
|
+
|
|
170
|
+
// size
|
|
171
|
+
export const size = (file: HTMLInputElement, [size]: [number]) => {
|
|
172
|
+
if (!file?.files || !file.files?.length) {
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const maxSize = size * 1000;
|
|
177
|
+
|
|
178
|
+
const fileSizeChecker = (file: File) => {
|
|
179
|
+
return file.size > maxSize;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
const list = [];
|
|
183
|
+
for (let i = 0; i < file.files.length; i++) {
|
|
184
|
+
list.push(file.files[i]);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const checker = list.map((x) => fileSizeChecker(x));
|
|
188
|
+
|
|
189
|
+
const isInvalid = checker.find((x) => x === true);
|
|
190
|
+
if (isInvalid) {
|
|
191
|
+
return `File size must be maximum ${size} kb`;
|
|
192
|
+
} else {
|
|
193
|
+
return true;
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
defineRule("size", size);
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Component, ComponentPublicInstance, ComputedRef } from "vue";
|
|
2
|
+
import {IBladeElement, ExtendedComponent} from "@/shared";
|
|
3
|
+
|
|
4
|
+
// Type instead of interface here is workaround for:
|
|
5
|
+
// https://github.com/microsoft/TypeScript/issues/15300
|
|
6
|
+
// (index signature is missing for interfaces in Typescript,
|
|
7
|
+
// i.e. interface N { key: value } can't be casted to Record<TKey,TValue>
|
|
8
|
+
// while it satisfies requirements
|
|
9
|
+
export type IValidationRules = {
|
|
10
|
+
required?: boolean;
|
|
11
|
+
numberic?: boolean;
|
|
12
|
+
email?: boolean;
|
|
13
|
+
min?: number;
|
|
14
|
+
max?: number;
|
|
15
|
+
regex?: RegExp;
|
|
16
|
+
min_value?: number;
|
|
17
|
+
max_value: number;
|
|
18
|
+
after?: string;
|
|
19
|
+
maxdimensions?: [string | number, string | number];
|
|
20
|
+
size?: number;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export interface IBladeToolbar {
|
|
24
|
+
id?: string;
|
|
25
|
+
icon?: string;
|
|
26
|
+
title?: string | ComputedRef<string>;
|
|
27
|
+
isVisible?: boolean | unknown;
|
|
28
|
+
isAccent?: boolean | ComputedRef<boolean>;
|
|
29
|
+
component?: ExtendedComponent;
|
|
30
|
+
bladeOptions?: Record<string, unknown> | unknown;
|
|
31
|
+
disabled?: boolean | ComputedRef<boolean>;
|
|
32
|
+
dropdownItems?: IBladeDropdownItem[];
|
|
33
|
+
clickHandler?(app: Record<string, unknown> | IBladeElement): void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface IBladeDropdownItem {
|
|
37
|
+
id: number;
|
|
38
|
+
title: string;
|
|
39
|
+
icon?: string;
|
|
40
|
+
clickHandler?(): void;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface IMenuItems extends IBladeToolbar {
|
|
44
|
+
children?: IBladeToolbar[];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface IActionBuilderResult {
|
|
48
|
+
icon: string;
|
|
49
|
+
title: string;
|
|
50
|
+
variant: string;
|
|
51
|
+
leftActions?: boolean;
|
|
52
|
+
clickHandler(): void;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface IImage {
|
|
56
|
+
sortOrder?: number;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface AuthData {
|
|
60
|
+
accessToken?: string;
|
|
61
|
+
//alias for accessToken is used by platform and is required for sharing auth data between platform and custom apps
|
|
62
|
+
token?: string;
|
|
63
|
+
refreshToken?: string;
|
|
64
|
+
userName?: string;
|
|
65
|
+
expiresAt?: number;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface SignInResults {
|
|
69
|
+
succeeded: boolean;
|
|
70
|
+
error?: string;
|
|
71
|
+
errorCode?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface RequestPasswordResult {
|
|
75
|
+
succeeded: boolean;
|
|
76
|
+
error?: string;
|
|
77
|
+
errorCode?: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface ITableColumns {
|
|
81
|
+
id: string;
|
|
82
|
+
title: string | ComputedRef<string>;
|
|
83
|
+
width?: number;
|
|
84
|
+
field?: string;
|
|
85
|
+
alwaysVisible?: boolean;
|
|
86
|
+
type?: string;
|
|
87
|
+
sortable?: boolean;
|
|
88
|
+
sortDirection?: number;
|
|
89
|
+
class?: string;
|
|
90
|
+
format?: string;
|
|
91
|
+
align?: string;
|
|
92
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as camelToSnake } from "./camelToSnake";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useNotifications/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useNotifications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA0B,MAAM,YAAY,CAAC;AAEtE,OAAO,EAAY,WAAW,EAAiB,MAAM,KAAK,CAAC;AAM3D,UAAU,cAAc;IACtB,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC;IAClE,QAAQ,CAAC,kBAAkB,EAAE,WAAW,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC;IACvE,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjD,UAAU,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC5C,OAAO,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACzC,UAAU,IAAI,IAAI,CAAC;IACnB,aAAa,IAAI,IAAI,CAAC;CACvB;8BAKkB,cAAc;AAAjC,wBA6FE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComputedRef } from "vue";
|
|
2
|
-
import { UserDetail, SecurityResult, IdentityResult } from "
|
|
3
|
-
import { RequestPasswordResult, SignInResults } from "
|
|
2
|
+
import { UserDetail, SecurityResult, IdentityResult } from "@/core/api";
|
|
3
|
+
import { RequestPasswordResult, SignInResults } from "@/core/types";
|
|
4
4
|
interface IUseUser {
|
|
5
5
|
user: ComputedRef<UserDetail | null>;
|
|
6
6
|
loading: ComputedRef<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useUser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,WAAW,EAAE,MAAM,KAAK,CAAC;AAEtD,OAAO,EACL,UAAU,EAGV,cAAc,EAEd,cAAc,EACf,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useUser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,WAAW,EAAE,MAAM,KAAK,CAAC;AAEtD,OAAO,EACL,UAAU,EAGV,cAAc,EAEd,cAAc,EACf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAY,qBAAqB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAe9E,UAAU,QAAQ;IAChB,IAAI,EAAE,WAAW,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACrC,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9B,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC7C,QAAQ,EAAE,MAAM,OAAO,CAAC,UAAU,CAAC,CAAC;IACpC,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;IACvE,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAChE,oBAAoB,EAAE,CACpB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,KACV,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7B,oBAAoB,EAAE,CACpB,YAAY,EAAE,MAAM,KACjB,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACpC,kBAAkB,EAAE,CAClB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,KAChB,OAAO,CAAC,cAAc,CAAC,CAAC;CAC9B;8BAEkB,QAAQ;AAA3B,wBAyNE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/plugins/validation/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/plugins/validation/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,WAAW,EAAE,MAAM,KAAK,CAAC;AACtE,OAAO,EAAC,aAAa,EAAE,iBAAiB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/types/index.ts"],"names":[],"mappings":"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"}
|