@milaboratories/uikit 2.2.47 → 2.2.48
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/CHANGELOG.md +6 -0
- package/dist/pl-uikit.js +1839 -1849
- package/dist/pl-uikit.js.map +1 -0
- package/dist/pl-uikit.umd.cjs +7 -6
- package/dist/pl-uikit.umd.cjs.map +1 -0
- package/dist/src/helpers/utils.d.ts +3 -5
- package/dist/style.css +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/LongText.vue +1 -1
- package/src/components/PlDialogModal/PlDialogModal.vue +1 -3
- package/src/composition/useLocalStorage.ts +1 -1
- package/src/helpers/utils.ts +4 -19
- package/vite.config.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/uikit",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.48",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/pl-uikit.umd.js",
|
|
6
6
|
"module": "dist/pl-uikit.js",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"yarpm": "^1.2.0",
|
|
35
35
|
"svgo": "^3.3.2",
|
|
36
36
|
"@types/d3": "^7.4.3",
|
|
37
|
-
"@milaboratories/helpers": "^1.6.11",
|
|
38
37
|
"@milaboratories/eslint-config": "^1.0.1",
|
|
38
|
+
"@milaboratories/helpers": "^1.6.11",
|
|
39
39
|
"@platforma-sdk/model": "^1.21.20"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
<script lang="ts" setup>
|
|
8
8
|
import { useEventListener } from '@/composition/useEventListener';
|
|
9
9
|
import './pl-dialog-modal.scss';
|
|
10
|
-
import { computed, ref,
|
|
10
|
+
import { computed, ref, useSlots } from 'vue';
|
|
11
11
|
import PlCloseModalBtn from '@/utils/PlCloseModalBtn.vue';
|
|
12
12
|
import type { Size } from '@/types';
|
|
13
13
|
|
|
@@ -109,8 +109,6 @@ const style = computed(() => {
|
|
|
109
109
|
return { width, height, minHeight, maxHeight };
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
-
const $attrs = useAttrs();
|
|
113
|
-
|
|
114
112
|
function onClickShadow(ev: Event) {
|
|
115
113
|
if (modal.value && props.closeOnOutsideClick && document.contains(ev.target as Node) && !modal.value.contains(ev.target as Node)) {
|
|
116
114
|
emit('update:modelValue', false);
|
package/src/helpers/utils.ts
CHANGED
|
@@ -4,14 +4,6 @@ export function call<R>(f: () => R): R {
|
|
|
4
4
|
return f();
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
export function notEmpty<T>(v: T | null | undefined, message: string): T {
|
|
8
|
-
if (v === null || v === undefined) {
|
|
9
|
-
throw Error(message);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
return v;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
7
|
export function requestTick<P>(cb: (...args: P[]) => void) {
|
|
16
8
|
let tick = false;
|
|
17
9
|
|
|
@@ -108,17 +100,6 @@ export function animateInfinite(options: { getFraction: (dt: number) => number;
|
|
|
108
100
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
109
101
|
type AnyFunction = (...args: any[]) => any;
|
|
110
102
|
|
|
111
|
-
export function debounce<F extends AnyFunction>(func: F, delay: number) {
|
|
112
|
-
let timerId = -1;
|
|
113
|
-
return (...args: Parameters<F>) => {
|
|
114
|
-
if (timerId !== -1) {
|
|
115
|
-
clearTimeout(timerId);
|
|
116
|
-
timerId = -1;
|
|
117
|
-
}
|
|
118
|
-
timerId = window.setTimeout(() => func(...args), delay);
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
|
|
122
103
|
export function throttle<F extends AnyFunction>(callback: F, ms: number, trailing = true): (...args: Parameters<F>) => void {
|
|
123
104
|
let t = 0,
|
|
124
105
|
call: AnyFunction | null;
|
|
@@ -142,6 +123,10 @@ export function listToOptions<T>(list: T[] | readonly T[]): ListOption<T>[] {
|
|
|
142
123
|
}
|
|
143
124
|
|
|
144
125
|
export function normalizeListOptions<V = unknown>(options: Readonly<ListOption<V>[]>) {
|
|
126
|
+
if (!Array.isArray(options)) {
|
|
127
|
+
throw Error('Invalid component options: ' + String(options));
|
|
128
|
+
}
|
|
129
|
+
|
|
145
130
|
return options.map((it) => ({
|
|
146
131
|
label: 'label' in it ? it.label : it.text,
|
|
147
132
|
value: it.value,
|
package/vite.config.ts
CHANGED
|
@@ -40,8 +40,8 @@ export default defineConfig({
|
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
42
|
build: {
|
|
43
|
-
sourcemap:
|
|
44
|
-
emptyOutDir:
|
|
43
|
+
sourcemap: true,
|
|
44
|
+
emptyOutDir: true,
|
|
45
45
|
lib: {
|
|
46
46
|
// Could also be a dictionary or array of multiple entry points
|
|
47
47
|
entry: [resolve(__dirname, 'src/index.ts')],
|