prlg-ui 1.8.59 → 1.8.61
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/{eventBus.util-CJIdWFx0.js → eventBus.util-ClEh5UYl.js} +3 -3
- package/dist/{eventBus.util-B6o8_37h.cjs → eventBus.util-DRia0POu.cjs} +1 -1
- package/dist/index.d.ts +88 -5
- package/dist/prlg-ui.cjs.js +1 -1
- package/dist/prlg-ui.css +1 -1
- package/dist/prlg-ui.es.js +2951 -2551
- package/dist/utils/index.cjs.js +1 -1
- package/dist/utils/index.es.js +1 -1
- package/dist/utils.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("vue");let s=null;function u(){const e=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${e}px`,()=>{document.body.style.position="",document.body.style.top="",window.scrollTo(0,e)}}const d=()=>{s||(s=u())},i=()=>{s&&(s(),s=null)},f=()=>({unlockScroll:i,lockScroll:d}),a={BASE:1e3,DROPDOWN:1010,STICKY:1020,
|
|
1
|
+
"use strict";const o=require("vue");let s=null;function u(){const e=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${e}px`,()=>{document.body.style.position="",document.body.style.top="",window.scrollTo(0,e)}}const d=()=>{s||(s=u())},i=()=>{s&&(s(),s=null)},f=()=>({unlockScroll:i,lockScroll:d}),a={BASE:1e3,DROPDOWN:1010,STICKY:1020,TOOLTIP:1030,POPOVER:1040,DRAWER:1050,MODAL:1060,NOTIFICATION:1070,DEBUG:9999},y=Symbol("z-index-context");let c=a.BASE;function p(){const e=o.inject(y,null);return e||{currentLayer:o.ref(c),getNextLayer:()=>(c+=10,c)}}const S=["data-layer"],m=o.defineComponent({__name:"Portal",props:{layer:{default:"BASE"},teleport:{type:Boolean,default:!0},target:{default:"body"},zIndex:{},show:{type:Boolean,default:!0}},setup(e){const t=e,{getNextLayer:l}=p(),n=o.computed(()=>t.zIndex?t.zIndex:t.layer&&t.layer!=="BASE"?a[t.layer]:l());return(r,B)=>r.show?(o.openBlock(),o.createBlock(o.Teleport,{key:0,to:r.target,disabled:!r.teleport},[o.createElementVNode("div",{style:o.normalizeStyle({zIndex:n.value,position:"relative"}),"data-layer":r.layer},[o.renderSlot(r.$slots,"default")],12,S)],8,["to","disabled"])):o.createCommentVNode("",!0)}});function E(){const e=new Map;return{on(t,l){const n=e.get(t)||[];n.push(l),e.set(t,n)},off(t,l){const n=e.get(t);n&&e.set(t,n.filter(r=>r!==l))},emit(t,l){const n=e.get(t);n&&n.forEach(r=>r(l))},clear(){e.clear()}}}exports.EventBus=E;exports._sfc_main=m;exports.useBodyScroll=f;
|
package/dist/index.d.ts
CHANGED
|
@@ -139,7 +139,7 @@ modelValue: boolean;
|
|
|
139
139
|
placement: Placement;
|
|
140
140
|
arrowVisible: boolean;
|
|
141
141
|
closeMode: PopoverCloseMode;
|
|
142
|
-
zIndexLayer: "BASE" | "DROPDOWN" | "STICKY" | "
|
|
142
|
+
zIndexLayer: "BASE" | "DROPDOWN" | "STICKY" | "TOOLTIP" | "POPOVER" | "DRAWER" | "MODAL" | "NOTIFICATION" | "DEBUG";
|
|
143
143
|
withoutStyle: boolean;
|
|
144
144
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
145
145
|
reference: HTMLDivElement;
|
|
@@ -237,6 +237,23 @@ declare const __VLS_component_23: DefineComponent<__VLS_Props_33, {}, {}, {}, {}
|
|
|
237
237
|
|
|
238
238
|
declare const __VLS_component_24: DefineComponent<__VLS_Props_34, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_34> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
239
239
|
|
|
240
|
+
declare const __VLS_component_25: DefineComponent<ScheduleProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
241
|
+
clear: () => any;
|
|
242
|
+
change: (value: DayOfWeek[]) => any;
|
|
243
|
+
"update:modelValue": (value: DayOfWeek[]) => any;
|
|
244
|
+
}, string, PublicProps, Readonly<ScheduleProps> & Readonly<{
|
|
245
|
+
onClear?: (() => any) | undefined;
|
|
246
|
+
onChange?: ((value: DayOfWeek[]) => any) | undefined;
|
|
247
|
+
"onUpdate:modelValue"?: ((value: DayOfWeek[]) => any) | undefined;
|
|
248
|
+
}>, {
|
|
249
|
+
disabled: boolean;
|
|
250
|
+
placeholder: string;
|
|
251
|
+
clearable: boolean;
|
|
252
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
253
|
+
scheduleTrigger: HTMLDivElement;
|
|
254
|
+
scheduleOverlay: HTMLDivElement;
|
|
255
|
+
}, HTMLDivElement>;
|
|
256
|
+
|
|
240
257
|
declare const __VLS_component_3: DefineComponent<ColumnProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ColumnProps> & Readonly<{}>, {
|
|
241
258
|
visible: boolean;
|
|
242
259
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
@@ -801,6 +818,26 @@ declare function __VLS_template_24(): {
|
|
|
801
818
|
rootEl: HTMLDivElement;
|
|
802
819
|
};
|
|
803
820
|
|
|
821
|
+
declare function __VLS_template_25(): {
|
|
822
|
+
attrs: Partial<{}>;
|
|
823
|
+
slots: {
|
|
824
|
+
input?(_: {
|
|
825
|
+
value: string;
|
|
826
|
+
}): any;
|
|
827
|
+
content?(_: {
|
|
828
|
+
close: typeof closeSchedule;
|
|
829
|
+
days: DayOfWeek[];
|
|
830
|
+
toggleDay: typeof toggleDay;
|
|
831
|
+
updateDayTime: typeof updateDayTime;
|
|
832
|
+
}): any;
|
|
833
|
+
};
|
|
834
|
+
refs: {
|
|
835
|
+
scheduleTrigger: HTMLDivElement;
|
|
836
|
+
scheduleOverlay: HTMLDivElement;
|
|
837
|
+
};
|
|
838
|
+
rootEl: HTMLDivElement;
|
|
839
|
+
};
|
|
840
|
+
|
|
804
841
|
declare function __VLS_template_3(): {
|
|
805
842
|
attrs: Partial<{}>;
|
|
806
843
|
slots: Readonly<ColumnSlots> & ColumnSlots;
|
|
@@ -903,6 +940,8 @@ declare type __VLS_TemplateResult_23 = ReturnType<typeof __VLS_template_23>;
|
|
|
903
940
|
|
|
904
941
|
declare type __VLS_TemplateResult_24 = ReturnType<typeof __VLS_template_24>;
|
|
905
942
|
|
|
943
|
+
declare type __VLS_TemplateResult_25 = ReturnType<typeof __VLS_template_25>;
|
|
944
|
+
|
|
906
945
|
declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
|
|
907
946
|
|
|
908
947
|
declare type __VLS_TemplateResult_4 = ReturnType<typeof __VLS_template_4>;
|
|
@@ -1019,6 +1058,12 @@ declare type __VLS_WithTemplateSlots_24<T, S> = T & {
|
|
|
1019
1058
|
};
|
|
1020
1059
|
};
|
|
1021
1060
|
|
|
1061
|
+
declare type __VLS_WithTemplateSlots_25<T, S> = T & {
|
|
1062
|
+
new (): {
|
|
1063
|
+
$slots: S;
|
|
1064
|
+
};
|
|
1065
|
+
};
|
|
1066
|
+
|
|
1022
1067
|
declare type __VLS_WithTemplateSlots_3<T, S> = T & {
|
|
1023
1068
|
new (): {
|
|
1024
1069
|
$slots: S;
|
|
@@ -1163,6 +1208,8 @@ export declare const ChipCheckbox: DefineComponent<__VLS_PublicProps_4, {}, {},
|
|
|
1163
1208
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
1164
1209
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
1165
1210
|
|
|
1211
|
+
declare function closeSchedule(): void;
|
|
1212
|
+
|
|
1166
1213
|
export declare const Column: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
|
|
1167
1214
|
|
|
1168
1215
|
declare type Column_2 = {
|
|
@@ -1299,6 +1346,13 @@ inputRef: HTMLDivElement;
|
|
|
1299
1346
|
popoverRef: HTMLDivElement;
|
|
1300
1347
|
}, HTMLDivElement>;
|
|
1301
1348
|
|
|
1349
|
+
declare interface DayOfWeek {
|
|
1350
|
+
key: string;
|
|
1351
|
+
label: string;
|
|
1352
|
+
enabled: boolean;
|
|
1353
|
+
time?: TimeRange;
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1302
1356
|
export declare const Divider: __VLS_WithTemplateSlots_19<typeof __VLS_component_19, __VLS_TemplateResult_19["slots"]>;
|
|
1303
1357
|
|
|
1304
1358
|
export declare const Drawer: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
|
|
@@ -1348,6 +1402,9 @@ declare interface ICalendarProps {
|
|
|
1348
1402
|
* - day - выбор дня, месяца и года
|
|
1349
1403
|
* - month - выбор месяца и года
|
|
1350
1404
|
* - year - выбор года
|
|
1405
|
+
* - date - только выбор даты
|
|
1406
|
+
* - datetime - выбор даты и времени
|
|
1407
|
+
* - time - только выбор времени
|
|
1351
1408
|
*
|
|
1352
1409
|
* @default 'day'
|
|
1353
1410
|
* */
|
|
@@ -1402,7 +1459,7 @@ declare type ICalendarResult = {
|
|
|
1402
1459
|
|
|
1403
1460
|
declare type ICalendarResultValue = string | ICalendarResult | null;
|
|
1404
1461
|
|
|
1405
|
-
declare type ICalendarType = 'month' | 'year' | 'day';
|
|
1462
|
+
declare type ICalendarType = 'month' | 'year' | 'day' | 'date' | 'datetime' | 'time';
|
|
1406
1463
|
|
|
1407
1464
|
export declare const IconField: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
|
|
1408
1465
|
|
|
@@ -1653,6 +1710,23 @@ declare interface Props_2 {
|
|
|
1653
1710
|
|
|
1654
1711
|
export declare const Radio: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
|
|
1655
1712
|
|
|
1713
|
+
export declare const Schedule: __VLS_WithTemplateSlots_25<typeof __VLS_component_25, __VLS_TemplateResult_25["slots"]>;
|
|
1714
|
+
|
|
1715
|
+
declare interface ScheduleProps {
|
|
1716
|
+
/** Массив дней недели с их состоянием */
|
|
1717
|
+
modelValue?: DayOfWeek[];
|
|
1718
|
+
/** Текст плейсхолдера, отображаемый при отсутствии значения */
|
|
1719
|
+
placeholder?: string;
|
|
1720
|
+
/** Отключает взаимодействие с компонентом */
|
|
1721
|
+
disabled?: boolean;
|
|
1722
|
+
/** Показывает кнопку очистки значения */
|
|
1723
|
+
clearable?: boolean;
|
|
1724
|
+
/** Лейбл компонента */
|
|
1725
|
+
label?: string;
|
|
1726
|
+
error?: boolean;
|
|
1727
|
+
errorText?: string;
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1656
1730
|
export declare const SelectButton: DefineComponent<__VLS_PublicProps_10, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1657
1731
|
"update:modelValue": (value: any) => any;
|
|
1658
1732
|
}, string, PublicProps, Readonly<__VLS_PublicProps_10> & Readonly<{
|
|
@@ -1869,6 +1943,11 @@ onFocusOut?: ((value: FocusEvent) => any) | undefined;
|
|
|
1869
1943
|
textareaRef: HTMLTextAreaElement;
|
|
1870
1944
|
}, HTMLDivElement>;
|
|
1871
1945
|
|
|
1946
|
+
declare interface TimeRange {
|
|
1947
|
+
from: string;
|
|
1948
|
+
to: string;
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1872
1951
|
export declare const Toast: DefineComponent<ToastProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ToastProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
1873
1952
|
|
|
1874
1953
|
/**
|
|
@@ -1969,6 +2048,8 @@ declare interface ToastServiceMethods {
|
|
|
1969
2048
|
removeAllGroups(): void;
|
|
1970
2049
|
}
|
|
1971
2050
|
|
|
2051
|
+
declare function toggleDay(dayKey: string): void;
|
|
2052
|
+
|
|
1972
2053
|
export declare const Tooltip: DefineComponent<TooltipProps, {
|
|
1973
2054
|
show: (element: HTMLElement) => void;
|
|
1974
2055
|
hide: () => void;
|
|
@@ -2005,6 +2086,8 @@ declare interface TooltipProps {
|
|
|
2005
2086
|
delay?: number;
|
|
2006
2087
|
}
|
|
2007
2088
|
|
|
2089
|
+
declare function updateDayTime(dayKey: string, timeRange: TimeRange | undefined): void;
|
|
2090
|
+
|
|
2008
2091
|
export declare const useConfirmDialog: () => ConfirmDialogService;
|
|
2009
2092
|
|
|
2010
2093
|
export declare const useConfirmPopup: () => ConfirmPopupService;
|
|
@@ -2015,9 +2098,9 @@ declare const Z_INDEX: {
|
|
|
2015
2098
|
readonly BASE: 1000;
|
|
2016
2099
|
readonly DROPDOWN: 1010;
|
|
2017
2100
|
readonly STICKY: 1020;
|
|
2018
|
-
readonly
|
|
2019
|
-
readonly
|
|
2020
|
-
readonly
|
|
2101
|
+
readonly TOOLTIP: 1030;
|
|
2102
|
+
readonly POPOVER: 1040;
|
|
2103
|
+
readonly DRAWER: 1050;
|
|
2021
2104
|
readonly MODAL: 1060;
|
|
2022
2105
|
readonly NOTIFICATION: 1070;
|
|
2023
2106
|
readonly DEBUG: 9999;
|