@milaboratories/uikit 2.6.1 → 2.6.3
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/.turbo/turbo-build.log +143 -143
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +14 -0
- package/dist/base/BtnBase.vue.js +18 -18
- package/dist/base/BtnBase.vue.js.map +1 -1
- package/dist/components/ContextProvider.vue.js.map +1 -1
- package/dist/components/DataTable/BaseCellComponent.vue.js +20 -20
- package/dist/components/DataTable/BaseCellComponent.vue.js.map +1 -1
- package/dist/components/DataTable/ColumnCaret.vue.js +6 -6
- package/dist/components/DataTable/ColumnCaret.vue.js.map +1 -1
- package/dist/components/DataTable/ColumnsCommandMenu.vue.js.map +1 -1
- package/dist/components/DataTable/RowsCommandMenu.vue.js.map +1 -1
- package/dist/components/DataTable/TScroll.vue.js +12 -12
- package/dist/components/DataTable/TScroll.vue.js.map +1 -1
- package/dist/components/DataTable/TableComponent.vue.js +5 -3
- package/dist/components/DataTable/TableComponent.vue.js.map +1 -1
- package/dist/components/DataTable/TdCell.vue.js +36 -36
- package/dist/components/DataTable/TdCell.vue.js.map +1 -1
- package/dist/components/DataTable/ThCell.vue.js +27 -27
- package/dist/components/DataTable/ThCell.vue.js.map +1 -1
- package/dist/components/DataTable/TrBody.vue.js +12 -12
- package/dist/components/DataTable/TrBody.vue.js.map +1 -1
- package/dist/components/DataTable/TrHead.vue.js.map +1 -1
- package/dist/components/DataTable/assets/TableIcon.vue.js +2 -2
- package/dist/components/DataTable/assets/TableIcon.vue.js.map +1 -1
- package/dist/components/DropdownListItem.vue.js +18 -18
- package/dist/components/DropdownListItem.vue.js.map +1 -1
- package/dist/components/HScroll.vue.js.map +1 -1
- package/dist/components/InputRange.vue.js.map +1 -1
- package/dist/components/LongText.vue.js +1 -1
- package/dist/components/LongText.vue.js.map +1 -1
- package/dist/components/LongText.vue3.js +1 -1
- package/dist/components/PlAccordion/ExpandTransition.vue.js.map +1 -1
- package/dist/components/PlAccordion/ExpandTransition.vue2.js.map +1 -1
- package/dist/components/PlAccordion/ExpandTransition.vue3.js +1 -1
- package/dist/components/PlAccordion/PlAccordion.vue.js.map +1 -1
- package/dist/components/PlAccordion/PlAccordionSection.vue2.js +21 -21
- package/dist/components/PlAccordion/PlAccordionSection.vue2.js.map +1 -1
- package/dist/components/PlAlert/PlAlert.vue.js +23 -23
- package/dist/components/PlAlert/PlAlert.vue.js.map +1 -1
- package/dist/components/PlAutocomplete/PlAutocomplete.vue.d.ts +4 -0
- package/dist/components/PlAutocomplete/PlAutocomplete.vue.js +112 -106
- package/dist/components/PlAutocomplete/PlAutocomplete.vue.js.map +1 -1
- package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.d.ts +4 -0
- package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.js +100 -94
- package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.js.map +1 -1
- package/dist/components/PlBtnAccent/PlBtnAccent.vue.js.map +1 -1
- package/dist/components/PlBtnDanger/PlBtnDanger.vue.js.map +1 -1
- package/dist/components/PlBtnGhost/PlBtnGhost.vue.js +21 -21
- package/dist/components/PlBtnGhost/PlBtnGhost.vue.js.map +1 -1
- package/dist/components/PlBtnGroup/PlBtnGroup.vue.js +34 -34
- package/dist/components/PlBtnGroup/PlBtnGroup.vue.js.map +1 -1
- package/dist/components/PlBtnLink/PlBtnLink.vue.js +12 -12
- package/dist/components/PlBtnLink/PlBtnLink.vue.js.map +1 -1
- package/dist/components/PlBtnPrimary/PlBtnPrimary.vue.js.map +1 -1
- package/dist/components/PlBtnSecondary/PlBtnSecondary.vue.js.map +1 -1
- package/dist/components/PlBtnSplit/PlBtnSplit.vue.js +31 -31
- package/dist/components/PlBtnSplit/PlBtnSplit.vue.js.map +1 -1
- package/dist/components/PlChartHistogram/PlChartHistogram.vue2.js +18 -18
- package/dist/components/PlChartHistogram/PlChartHistogram.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/Legends.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/PlChartStackedBar.vue2.js +15 -15
- package/dist/components/PlChartStackedBar/PlChartStackedBar.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/PlChartStackedBarCompact.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/StackedRow.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/StackedRowCompact.vue2.js.map +1 -1
- package/dist/components/PlCheckbox/PlCheckbox.vue.js +13 -13
- package/dist/components/PlCheckbox/PlCheckbox.vue.js.map +1 -1
- package/dist/components/PlCheckbox/PlCheckboxBase.vue.js +6 -6
- package/dist/components/PlCheckbox/PlCheckboxBase.vue.js.map +1 -1
- package/dist/components/PlCheckboxGroup/PlCheckboxGroup.vue.js +28 -28
- package/dist/components/PlCheckboxGroup/PlCheckboxGroup.vue.js.map +1 -1
- package/dist/components/PlChip/PlChip.vue.js +20 -20
- package/dist/components/PlChip/PlChip.vue.js.map +1 -1
- package/dist/components/PlClipboard/PlClipboard.vue2.js.map +1 -1
- package/dist/components/PlConfirmDialog.vue.js +14 -14
- package/dist/components/PlConfirmDialog.vue.js.map +1 -1
- package/dist/components/PlDialogModal/PlDialogModal.vue.js +30 -30
- package/dist/components/PlDialogModal/PlDialogModal.vue.js.map +1 -1
- package/dist/components/PlDropdown/OptionList.vue.js +40 -40
- package/dist/components/PlDropdown/OptionList.vue.js.map +1 -1
- package/dist/components/PlDropdown/PlDropdown.vue.d.ts +8 -0
- package/dist/components/PlDropdown/PlDropdown.vue.js +102 -95
- package/dist/components/PlDropdown/PlDropdown.vue.js.map +1 -1
- package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js +95 -93
- package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js.map +1 -1
- package/dist/components/PlDropdownLine/PlDropdownLine.vue.d.ts +1 -1
- package/dist/components/PlDropdownLine/PlDropdownLine.vue.js +4 -4
- package/dist/components/PlDropdownLine/PlDropdownLine.vue.js.map +1 -1
- package/dist/components/PlDropdownLine/ResizableInput.vue.js +12 -12
- package/dist/components/PlDropdownLine/ResizableInput.vue.js.map +1 -1
- package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.d.ts +4 -0
- package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js +88 -82
- package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js.map +1 -1
- package/dist/components/PlDropdownMultiRef/PlDropdownMultiRef.vue.d.ts +1 -1
- package/dist/components/PlDropdownMultiRef/PlDropdownMultiRef.vue.js.map +1 -1
- package/dist/components/PlDropdownRef/PlDropdownRef.vue.js +11 -11
- package/dist/components/PlDropdownRef/PlDropdownRef.vue.js.map +1 -1
- package/dist/components/PlEditableTitle/PlEditableTitle.vue.d.ts +1 -1
- package/dist/components/PlEditableTitle/PlEditableTitle.vue.js +36 -36
- package/dist/components/PlEditableTitle/PlEditableTitle.vue.js.map +1 -1
- package/dist/components/PlElementList/PlElementList.vue.d.ts +20 -0
- package/dist/components/PlElementList/PlElementList.vue2.js +180 -135
- package/dist/components/PlElementList/PlElementList.vue2.js.map +1 -1
- package/dist/components/PlElementList/PlElementListItem.vue.d.ts +20 -0
- package/dist/components/PlElementList/PlElementListItem.vue2.js +101 -76
- package/dist/components/PlElementList/PlElementListItem.vue2.js.map +1 -1
- package/dist/components/PlErrorAlert/PlErrorAlert.vue2.js.map +1 -1
- package/dist/components/PlErrorBoundary/PlErrorBoundary.vue.js.map +1 -1
- package/dist/components/PlFileDialog/Local.vue.js +24 -24
- package/dist/components/PlFileDialog/Local.vue.js.map +1 -1
- package/dist/components/PlFileDialog/PlFileDialog.vue.js +38 -38
- package/dist/components/PlFileDialog/PlFileDialog.vue.js.map +1 -1
- package/dist/components/PlFileDialog/Remote.vue.js +2 -2
- package/dist/components/PlFileDialog/Remote.vue.js.map +1 -1
- package/dist/components/PlFileDialog/Shortcuts.vue2.js +4 -4
- package/dist/components/PlFileDialog/Shortcuts.vue2.js.map +1 -1
- package/dist/components/PlFileInput/PlFileInput.vue.d.ts +1 -1
- package/dist/components/PlFileInput/PlFileInput.vue.js +78 -76
- package/dist/components/PlFileInput/PlFileInput.vue.js.map +1 -1
- package/dist/components/PlIcon16/PlIcon16.vue2.js.map +1 -1
- package/dist/components/PlIcon24/PlIcon24.vue2.js.map +1 -1
- package/dist/components/PlLoaderCircular/PlLoaderCircular.vue.js +11 -11
- package/dist/components/PlLoaderCircular/PlLoaderCircular.vue.js.map +1 -1
- package/dist/components/PlLogView/PlLogView.vue.js +62 -60
- package/dist/components/PlLogView/PlLogView.vue.js.map +1 -1
- package/dist/components/PlNotificationAlert/PlNotificationAlert.vue.js +22 -22
- package/dist/components/PlNotificationAlert/PlNotificationAlert.vue.js.map +1 -1
- package/dist/components/PlNumberField/PlNumberField.vue.d.ts +6 -1
- package/dist/components/PlNumberField/PlNumberField.vue.js +66 -60
- package/dist/components/PlNumberField/PlNumberField.vue.js.map +1 -1
- package/dist/components/PlProgressBar/PlProgressBar.vue.js +12 -12
- package/dist/components/PlProgressBar/PlProgressBar.vue.js.map +1 -1
- package/dist/components/PlProgressCell/PlProgressCell.vue.js +20 -20
- package/dist/components/PlProgressCell/PlProgressCell.vue.js.map +1 -1
- package/dist/components/PlRadio/PlRadio.vue2.js.map +1 -1
- package/dist/components/PlRadio/PlRadioGroup.vue2.js +8 -8
- package/dist/components/PlRadio/PlRadioGroup.vue2.js.map +1 -1
- package/dist/components/PlSearchField/PlSearchField.vue2.js +19 -19
- package/dist/components/PlSearchField/PlSearchField.vue2.js.map +1 -1
- package/dist/components/PlSectionSeparator/PlSectionSeparator.vue2.js +8 -8
- package/dist/components/PlSectionSeparator/PlSectionSeparator.vue2.js.map +1 -1
- package/dist/components/PlSidebar/PlSidebarGroup.vue2.js.map +1 -1
- package/dist/components/PlSidebar/PlSidebarItem.vue2.js.map +1 -1
- package/dist/components/PlSlideModal/PlPureSlideModal.vue.js +5 -3
- package/dist/components/PlSlideModal/PlPureSlideModal.vue.js.map +1 -1
- package/dist/components/PlSlideModal/PlSlideModal.vue2.js.map +1 -1
- package/dist/components/PlSplash/PlSplash.vue.js +16 -16
- package/dist/components/PlSplash/PlSplash.vue.js.map +1 -1
- package/dist/components/PlStatusTag/PlStatusTag.vue.js +7 -7
- package/dist/components/PlStatusTag/PlStatusTag.vue.js.map +1 -1
- package/dist/components/PlSvg/PlSvg.vue2.js.map +1 -1
- package/dist/components/PlTabs/PlTabs.vue.js +18 -18
- package/dist/components/PlTabs/PlTabs.vue.js.map +1 -1
- package/dist/components/PlTabs/Tab.vue.js +9 -9
- package/dist/components/PlTabs/Tab.vue.js.map +1 -1
- package/dist/components/PlTextArea/PlTextArea.vue.js +55 -53
- package/dist/components/PlTextArea/PlTextArea.vue.js.map +1 -1
- package/dist/components/PlTextField/PlTextField.vue.d.ts +4 -0
- package/dist/components/PlTextField/PlTextField.vue.js +66 -60
- package/dist/components/PlTextField/PlTextField.vue.js.map +1 -1
- package/dist/components/PlToggleSwitch/PlToggleSwitch.vue.js +14 -14
- package/dist/components/PlToggleSwitch/PlToggleSwitch.vue.js.map +1 -1
- package/dist/components/PlTooltip/Beak.vue.js +2 -2
- package/dist/components/PlTooltip/Beak.vue.js.map +1 -1
- package/dist/components/PlTooltip/PlTooltip.vue.js +50 -50
- package/dist/components/PlTooltip/PlTooltip.vue.js.map +1 -1
- package/dist/components/Scrollable.vue.js.map +1 -1
- package/dist/components/Slider.vue.js +35 -35
- package/dist/components/Slider.vue.js.map +1 -1
- package/dist/components/SliderRange.vue.js +47 -47
- package/dist/components/SliderRange.vue.js.map +1 -1
- package/dist/components/SliderRangeTriple.vue.js +47 -47
- package/dist/components/SliderRangeTriple.vue.js.map +1 -1
- package/dist/components/TabItem.vue.js.map +1 -1
- package/dist/components/ThemeSwitcher.vue.js +2 -2
- package/dist/components/ThemeSwitcher.vue.js.map +1 -1
- package/dist/components/TransitionSlidePanel.vue.js.map +1 -1
- package/dist/components/VScroll.vue.js.map +1 -1
- package/dist/components/contextMenu/Menu.vue2.js +12 -12
- package/dist/components/contextMenu/Menu.vue2.js.map +1 -1
- package/dist/composition/filters/metadata.d.ts +205 -0
- package/dist/composition/filters/metadata.js +129 -19
- package/dist/composition/filters/metadata.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/layout/PlBlockPage/PlBlockPage.vue.js +27 -27
- package/dist/layout/PlBlockPage/PlBlockPage.vue.js.map +1 -1
- package/dist/layout/PlContainer/PlContainer.vue.js +10 -10
- package/dist/layout/PlContainer/PlContainer.vue.js.map +1 -1
- package/dist/layout/PlGrid/PlGrid.vue.js.map +1 -1
- package/dist/layout/PlRow/PlRow.vue.js +8 -8
- package/dist/layout/PlRow/PlRow.vue.js.map +1 -1
- package/dist/layout/PlSpacer/PlSpacer.vue.js.map +1 -1
- package/dist/utils/DoubleContour.vue.d.ts +7 -1
- package/dist/utils/DoubleContour.vue.js +20 -13
- package/dist/utils/DoubleContour.vue.js.map +1 -1
- package/dist/utils/DoubleContour.vue3.js +7 -0
- package/dist/utils/DoubleContour.vue3.js.map +1 -0
- package/dist/utils/DropdownOverlay/DropdownOverlay.vue.js.map +1 -1
- package/dist/utils/PlCloseModalBtn.vue.js +2 -2
- package/dist/utils/PlCloseModalBtn.vue.js.map +1 -1
- package/dist/utils/TextLabel.vue.js.map +1 -1
- package/package.json +5 -5
- package/src/components/PlAutocomplete/PlAutocomplete.vue +6 -1
- package/src/components/PlAutocompleteMulti/PlAutocompleteMulti.vue +6 -1
- package/src/components/PlDropdown/PlDropdown.vue +12 -2
- package/src/components/PlDropdownMulti/PlDropdownMulti.vue +6 -1
- package/src/components/PlElementList/PlElementList.vue +40 -6
- package/src/components/PlElementList/PlElementListItem.vue +64 -47
- package/src/components/PlNumberField/PlNumberField.vue +4 -1
- package/src/components/PlTextField/PlTextField.vue +5 -1
- package/src/composition/filters/metadata.ts +105 -0
- package/src/utils/DoubleContour.vue +68 -2
- package/dist/utils/DoubleContour.vue2.js +0 -7
- package/dist/utils/DoubleContour.vue2.js.map +0 -1
|
@@ -14,6 +14,10 @@ const props = withDefaults(
|
|
|
14
14
|
getItemKey?: (item: T, index: number) => K;
|
|
15
15
|
|
|
16
16
|
itemClass?: string | string[] | ((item: T, index: number) => string | string[]);
|
|
17
|
+
itemClassTitle?: string | string[] | ((item: T, index: number) => string | string[]);
|
|
18
|
+
itemClassBefore?: string | string[] | ((item: T, index: number) => string | string[]);
|
|
19
|
+
itemClassAfter?: string | string[] | ((item: T, index: number) => string | string[]);
|
|
20
|
+
itemClassContent?: string | string[] | ((item: T, index: number) => string | string[]);
|
|
17
21
|
isActive?: (item: T, index: number) => boolean;
|
|
18
22
|
|
|
19
23
|
disableDragging?: boolean;
|
|
@@ -43,6 +47,10 @@ const props = withDefaults(
|
|
|
43
47
|
getItemKey: (item: T) => JSON.stringify(item) as K,
|
|
44
48
|
|
|
45
49
|
itemClass: undefined,
|
|
50
|
+
itemClassTitle: undefined,
|
|
51
|
+
itemClassContent: undefined,
|
|
52
|
+
itemClassBefore: undefined,
|
|
53
|
+
itemClassAfter: undefined,
|
|
46
54
|
isActive: undefined,
|
|
47
55
|
|
|
48
56
|
disableDragging: undefined,
|
|
@@ -78,6 +86,8 @@ const emits = defineEmits<{
|
|
|
78
86
|
const slots = defineSlots<{
|
|
79
87
|
['item-title']: (props: { item: T; index: number }) => unknown;
|
|
80
88
|
['item-content']?: (props: { item: T; index: number }) => unknown;
|
|
89
|
+
['item-before']?: (props: { item: T; index: number }) => unknown;
|
|
90
|
+
['item-after']?: (props: { item: T; index: number }) => unknown;
|
|
81
91
|
}>();
|
|
82
92
|
|
|
83
93
|
const dndSortingEnabled = computed((): boolean => {
|
|
@@ -237,12 +247,19 @@ function handleRemove(item: T, index: number) {
|
|
|
237
247
|
itemsRef.value.splice(index, 1);
|
|
238
248
|
}
|
|
239
249
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
250
|
+
function getClassFunction(propsItemClass: string | string[] | ((item: T, index: number) => string | string[]) | undefined): (item: T, index: number) => null | string | string[] {
|
|
251
|
+
return (item: T, index: number): null | string | string[] => {
|
|
252
|
+
if (typeof propsItemClass === 'function') {
|
|
253
|
+
return propsItemClass(item, index);
|
|
254
|
+
}
|
|
255
|
+
return propsItemClass ?? null;
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
const getItemClass = getClassFunction(props.itemClass);
|
|
259
|
+
const getItemClassTitle = getClassFunction(props.itemClassTitle);
|
|
260
|
+
const getItemClassContent = getClassFunction(props.itemClassContent);
|
|
261
|
+
const getItemClassBefore = getClassFunction(props.itemClassBefore);
|
|
262
|
+
const getItemClassAfter = getClassFunction(props.itemClassAfter);
|
|
246
263
|
|
|
247
264
|
</script>
|
|
248
265
|
|
|
@@ -252,6 +269,10 @@ const getItemClass = (item: T, index: number): null | string | string[] => {
|
|
|
252
269
|
<PlElementListItem
|
|
253
270
|
v-for="(pinnedItem, pinnedIndex) in pinnedItemsRef" :key="pinnedKeysRef[pinnedIndex]"
|
|
254
271
|
:class="[$style.item, getItemClass(pinnedItem, pinnedIndex)]"
|
|
272
|
+
:titleClass="getItemClassTitle(pinnedItem, pinnedIndex)"
|
|
273
|
+
:contentClass="getItemClassContent(pinnedItem, pinnedIndex)"
|
|
274
|
+
:beforeClass="getItemClassBefore(pinnedItem, pinnedIndex)"
|
|
275
|
+
:afterClass="getItemClassAfter(pinnedItem, pinnedIndex)"
|
|
255
276
|
|
|
256
277
|
:index="pinnedIndex"
|
|
257
278
|
:item="pinnedItem"
|
|
@@ -272,18 +293,28 @@ const getItemClass = (item: T, index: number): null | string | string[] => {
|
|
|
272
293
|
@pin="handlePin"
|
|
273
294
|
@expand="handleExpand"
|
|
274
295
|
>
|
|
296
|
+
<template v-if="slots['item-before']" #before="{ item, index }">
|
|
297
|
+
<slot :index="index" :item="item" name="item-before" />
|
|
298
|
+
</template>
|
|
275
299
|
<template #title="{ item, index }">
|
|
276
300
|
<slot :index="index" :item="item" name="item-title" />
|
|
277
301
|
</template>
|
|
278
302
|
<template v-if="slots['item-content']" #content="{ item, index }">
|
|
279
303
|
<slot :index="index" :item="item" name="item-content" />
|
|
280
304
|
</template>
|
|
305
|
+
<template v-if="slots['item-after']" #after="{ item, index }">
|
|
306
|
+
<slot :index="index" :item="item" name="item-after" />
|
|
307
|
+
</template>
|
|
281
308
|
</PlElementListItem>
|
|
282
309
|
</div>
|
|
283
310
|
<div v-if="hasUnpinnedItems" ref="unpinnedContainerRef" :class="$style.list">
|
|
284
311
|
<PlElementListItem
|
|
285
312
|
v-for="(unpinnedItem, unpinnedIndex) in unpinnedItemsRef" :key="unpinnedKeysRef[unpinnedIndex]"
|
|
286
313
|
:class="[$style.item, getItemClass(unpinnedItem, unpinnedIndex)]"
|
|
314
|
+
:titleClass="getItemClassTitle(unpinnedItem, unpinnedIndex)"
|
|
315
|
+
:contentClass="getItemClassContent(unpinnedItem, unpinnedIndex)"
|
|
316
|
+
:beforeClass="getItemClassBefore(unpinnedItem, unpinnedIndex)"
|
|
317
|
+
:afterClass="getItemClassAfter(unpinnedItem, unpinnedIndex)"
|
|
287
318
|
|
|
288
319
|
:index="unpinnedIndex + (pinnedItemsRef?.length ?? 0)"
|
|
289
320
|
:item="unpinnedItem"
|
|
@@ -310,6 +341,9 @@ const getItemClass = (item: T, index: number): null | string | string[] => {
|
|
|
310
341
|
<template v-if="slots['item-content']" #content="{ item, index }">
|
|
311
342
|
<slot :index="index" :item="item" name="item-content" />
|
|
312
343
|
</template>
|
|
344
|
+
<template v-if="slots['item-after']" #after="{ item, index }">
|
|
345
|
+
<slot :index="index" :item="item" name="item-after" />
|
|
346
|
+
</template>
|
|
313
347
|
</PlElementListItem>
|
|
314
348
|
</div>
|
|
315
349
|
</div>
|
|
@@ -16,13 +16,22 @@ const props = defineProps<{
|
|
|
16
16
|
isToggled: boolean;
|
|
17
17
|
isPinnable: boolean;
|
|
18
18
|
isPinned: boolean;
|
|
19
|
+
titleClass: string | string[] | null;
|
|
20
|
+
contentClass: string | string[] | null;
|
|
21
|
+
afterClass: string | string[] | null;
|
|
22
|
+
beforeClass: string | string[] | null;
|
|
19
23
|
}>();
|
|
24
|
+
defineOptions({ inheritAttrs: false });
|
|
20
25
|
|
|
21
26
|
const slots = defineSlots<{
|
|
22
27
|
title: (props: { item: T; index: number }) => unknown;
|
|
23
28
|
content?: (props: { item: T; index: number }) => unknown;
|
|
29
|
+
after?: (props: { item: T; index: number }) => unknown;
|
|
30
|
+
before?: (props: { item: T; index: number }) => unknown;
|
|
24
31
|
}>();
|
|
25
32
|
const hasContentSlot = computed(() => slots['content'] !== undefined);
|
|
33
|
+
const hasAfterSlot = computed(() => slots['after'] !== undefined);
|
|
34
|
+
const hasBeforeSlot = computed(() => slots['before'] !== undefined);
|
|
26
35
|
|
|
27
36
|
const emit = defineEmits<{
|
|
28
37
|
(e: 'expand', item: T, index: number): void;
|
|
@@ -33,65 +42,73 @@ const emit = defineEmits<{
|
|
|
33
42
|
</script>
|
|
34
43
|
|
|
35
44
|
<template>
|
|
36
|
-
<div
|
|
37
|
-
:class="
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
[$style.opened]: props.isExpanded,
|
|
41
|
-
[$style.disabled]: props.isToggled,
|
|
42
|
-
}]"
|
|
43
|
-
>
|
|
45
|
+
<div>
|
|
46
|
+
<div v-if="hasBeforeSlot" :class="beforeClass">
|
|
47
|
+
<slot name="before" :item="props.item" :index="props.index" />
|
|
48
|
+
</div>
|
|
44
49
|
<div
|
|
45
|
-
:class="[$style.
|
|
46
|
-
[$style.
|
|
50
|
+
:class="[$style.root, $attrs.class, {
|
|
51
|
+
[$style.active]: props.isActive,
|
|
52
|
+
[$style.pinned]: props.isPinned,
|
|
53
|
+
[$style.opened]: props.isExpanded,
|
|
54
|
+
[$style.disabled]: props.isToggled,
|
|
47
55
|
}]"
|
|
48
|
-
@click="isExpandable && emit('expand', props.item, props.index)"
|
|
49
56
|
>
|
|
50
57
|
<div
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
58
|
+
:class="[$style.head, titleClass, {
|
|
59
|
+
[$style.clickable]: hasContentSlot,
|
|
60
|
+
}]"
|
|
61
|
+
@click="isExpandable && emit('expand', props.item, props.index)"
|
|
54
62
|
>
|
|
55
|
-
<PlIcon16 name="drag-dots" />
|
|
56
|
-
</div>
|
|
57
|
-
<PlIcon16 v-if="isExpandable" :class="[$style.contentChevron, { [$style.opened]: props.isExpanded }]" name="chevron-down" />
|
|
58
|
-
|
|
59
|
-
<div :class="$style.title">
|
|
60
|
-
<slot name="title" :item="props.item" :index="props.index" />
|
|
61
|
-
</div>
|
|
62
|
-
|
|
63
|
-
<div :class="[$style.actions, $style.showOnHover]">
|
|
64
63
|
<div
|
|
65
|
-
v-if="props.
|
|
66
|
-
:class="[$style.action, $style.
|
|
67
|
-
|
|
64
|
+
v-if="props.showDragHandle"
|
|
65
|
+
:class="[$style.action, $style.draggable, { [$style.disable]: !props.isDraggable } ]"
|
|
66
|
+
:data-draggable="props.isDraggable"
|
|
68
67
|
>
|
|
69
|
-
<
|
|
68
|
+
<PlIcon16 name="drag-dots" />
|
|
70
69
|
</div>
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
[$style.activated]: props.isPinned,
|
|
76
|
-
}]"
|
|
77
|
-
@click.stop="emit('pin', props.item, props.index)"
|
|
78
|
-
>
|
|
79
|
-
<PlIcon24 name="pin" size="16" />
|
|
70
|
+
<PlIcon16 v-if="isExpandable" :class="[$style.contentChevron, { [$style.opened]: props.isExpanded }]" name="chevron-down" />
|
|
71
|
+
|
|
72
|
+
<div :class="$style.title">
|
|
73
|
+
<slot name="title" :item="props.item" :index="props.index" />
|
|
80
74
|
</div>
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
75
|
+
|
|
76
|
+
<div :class="[$style.actions, $style.showOnHover]">
|
|
77
|
+
<div
|
|
78
|
+
v-if="props.isToggable"
|
|
79
|
+
:class="[$style.action, $style.clickable, { [$style.disable]: !props.isToggable }]"
|
|
80
|
+
@click.stop="emit('toggle', props.item, props.index)"
|
|
81
|
+
>
|
|
82
|
+
<PlIcon24 :name="props.isToggled === true ? 'view-hide' : 'view-show'" size="16" />
|
|
83
|
+
</div>
|
|
84
|
+
<div
|
|
85
|
+
v-if="props.isPinnable"
|
|
86
|
+
:class="[$style.action, $style.clickable, {
|
|
87
|
+
[$style.disable]: !props.isPinnable,
|
|
88
|
+
[$style.activated]: props.isPinned,
|
|
89
|
+
}]"
|
|
90
|
+
@click.stop="emit('pin', props.item, props.index)"
|
|
91
|
+
>
|
|
92
|
+
<PlIcon24 name="pin" size="16" />
|
|
93
|
+
</div>
|
|
94
|
+
<div
|
|
95
|
+
v-if="props.isRemovable"
|
|
96
|
+
:class="[$style.action, $style.clickable]"
|
|
97
|
+
@click.stop="emit('remove', props.item, props.index)"
|
|
98
|
+
>
|
|
99
|
+
<PlIcon16 name="close" />
|
|
100
|
+
</div>
|
|
87
101
|
</div>
|
|
88
102
|
</div>
|
|
103
|
+
<div
|
|
104
|
+
v-if="hasContentSlot && props.isExpanded"
|
|
105
|
+
:class="[$style.body, contentClass, { [$style.disabled]: props.isToggled }]"
|
|
106
|
+
>
|
|
107
|
+
<slot name="content" :item="props.item" :index="props.index" />
|
|
108
|
+
</div>
|
|
89
109
|
</div>
|
|
90
|
-
<div
|
|
91
|
-
|
|
92
|
-
:class="[$style.body, { [$style.disabled]: props.isToggled }]"
|
|
93
|
-
>
|
|
94
|
-
<slot name="content" :item="props.item" :index="props.index" />
|
|
110
|
+
<div v-if="hasAfterSlot" :class="afterClass">
|
|
111
|
+
<slot name="after" :item="props.item" :index="props.index" />
|
|
95
112
|
</div>
|
|
96
113
|
</div>
|
|
97
114
|
</template>
|
|
@@ -47,6 +47,8 @@ const props = withDefaults(defineProps<{
|
|
|
47
47
|
errorMessage?: string;
|
|
48
48
|
/** Additional validity check for input value that must return an error text if failed */
|
|
49
49
|
validate?: (v: number) => string | undefined;
|
|
50
|
+
/** Makes some of corners not rounded */
|
|
51
|
+
groupPosition?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'middle';
|
|
50
52
|
}>(), {
|
|
51
53
|
step: 1,
|
|
52
54
|
label: undefined,
|
|
@@ -57,6 +59,7 @@ const props = withDefaults(defineProps<{
|
|
|
57
59
|
updateOnEnter: false,
|
|
58
60
|
errorMessage: undefined,
|
|
59
61
|
validate: undefined,
|
|
62
|
+
groupPosition: undefined,
|
|
60
63
|
});
|
|
61
64
|
|
|
62
65
|
const modelValue = defineModel<number | undefined>({ required: true });
|
|
@@ -239,7 +242,7 @@ const onMousedown = (ev: MouseEvent) => {
|
|
|
239
242
|
@keydown="handleKeyPress($event)"
|
|
240
243
|
>
|
|
241
244
|
<div class="pl-number-field__main-wrapper d-flex">
|
|
242
|
-
<DoubleContour class="pl-number-field__contour"/>
|
|
245
|
+
<DoubleContour class="pl-number-field__contour" :group-position="groupPosition"/>
|
|
243
246
|
<div
|
|
244
247
|
class="pl-number-field__wrapper flex-grow d-flex flex-align-center"
|
|
245
248
|
:class="{withoutArrows: !useIncrementButtons}"
|
|
@@ -83,6 +83,10 @@ const props = defineProps<{
|
|
|
83
83
|
* The string specifies whether the field should be a password or not, value could be "password" or undefined.
|
|
84
84
|
*/
|
|
85
85
|
type?: 'password';
|
|
86
|
+
/**
|
|
87
|
+
* Makes some of corners not rounded
|
|
88
|
+
* */
|
|
89
|
+
groupPosition?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'middle';
|
|
86
90
|
}>();
|
|
87
91
|
|
|
88
92
|
const rootRef = ref<HTMLInputElement | undefined>(undefined);
|
|
@@ -217,7 +221,7 @@ useLabelNotch(rootRef);
|
|
|
217
221
|
<PlIcon24 v-if="type === 'password'" :name="passwordIcon" style="cursor: pointer" @click.stop="togglePasswordVisibility" />
|
|
218
222
|
<slot name="append" />
|
|
219
223
|
</div>
|
|
220
|
-
<DoubleContour class="pl-text-field__contour" />
|
|
224
|
+
<DoubleContour class="pl-text-field__contour" :group-position="groupPosition" />
|
|
221
225
|
</div>
|
|
222
226
|
<div v-if="hasErrors" class="pl-text-field__error">
|
|
223
227
|
{{ displayErrors.join(' ') }}
|
|
@@ -23,6 +23,27 @@ export const filterUiMetadata = {
|
|
|
23
23
|
},
|
|
24
24
|
supportedFor: isNumericValueType,
|
|
25
25
|
},
|
|
26
|
+
notEqual: {
|
|
27
|
+
label: 'Col ≠ X (Not Equal)',
|
|
28
|
+
form: {
|
|
29
|
+
column: {
|
|
30
|
+
label: 'Column',
|
|
31
|
+
fieldType: 'SUniversalPColumnId',
|
|
32
|
+
defaultValue: () => undefined,
|
|
33
|
+
},
|
|
34
|
+
type: {
|
|
35
|
+
label: 'Predicate',
|
|
36
|
+
fieldType: 'FilterType',
|
|
37
|
+
defaultValue: () => 'notEqual',
|
|
38
|
+
},
|
|
39
|
+
x: {
|
|
40
|
+
label: 'X',
|
|
41
|
+
fieldType: 'number',
|
|
42
|
+
defaultValue: () => 0,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
supportedFor: isNumericValueType,
|
|
46
|
+
},
|
|
26
47
|
lessThan: {
|
|
27
48
|
label: 'Col < X (Less Than)',
|
|
28
49
|
form: {
|
|
@@ -450,6 +471,90 @@ export const filterUiMetadata = {
|
|
|
450
471
|
},
|
|
451
472
|
supportedFor: () => false,
|
|
452
473
|
},
|
|
474
|
+
patternMatchesRegularExpression: {
|
|
475
|
+
label: 'Col ~ X (Matches Regular Expression)',
|
|
476
|
+
form: {
|
|
477
|
+
column: {
|
|
478
|
+
label: 'Column',
|
|
479
|
+
fieldType: 'SUniversalPColumnId',
|
|
480
|
+
defaultValue: () => undefined,
|
|
481
|
+
},
|
|
482
|
+
type: {
|
|
483
|
+
label: 'Predicate',
|
|
484
|
+
fieldType: 'FilterType',
|
|
485
|
+
defaultValue: () => 'patternMatchesRegularExpression',
|
|
486
|
+
},
|
|
487
|
+
value: {
|
|
488
|
+
label: 'Seq',
|
|
489
|
+
fieldType: 'string',
|
|
490
|
+
defaultValue: () => '',
|
|
491
|
+
},
|
|
492
|
+
},
|
|
493
|
+
supportedFor: isStringValueType,
|
|
494
|
+
},
|
|
495
|
+
patternFuzzyContainSubsequence: {
|
|
496
|
+
label: 'Col ~ Seq (Fuzzy Contain Subsequence)',
|
|
497
|
+
form: {
|
|
498
|
+
column: {
|
|
499
|
+
label: 'Column',
|
|
500
|
+
fieldType: 'SUniversalPColumnId',
|
|
501
|
+
defaultValue: () => undefined,
|
|
502
|
+
},
|
|
503
|
+
type: {
|
|
504
|
+
label: 'Predicate',
|
|
505
|
+
fieldType: 'FilterType',
|
|
506
|
+
defaultValue: () => 'patternFuzzyContainSubsequence',
|
|
507
|
+
},
|
|
508
|
+
value: {
|
|
509
|
+
label: 'Set',
|
|
510
|
+
fieldType: 'string',
|
|
511
|
+
defaultValue: () => '',
|
|
512
|
+
},
|
|
513
|
+
},
|
|
514
|
+
supportedFor: isStringValueType,
|
|
515
|
+
},
|
|
516
|
+
inSet: {
|
|
517
|
+
label: 'Col ∈ Set (In Set)',
|
|
518
|
+
form: {
|
|
519
|
+
column: {
|
|
520
|
+
label: 'Column',
|
|
521
|
+
fieldType: 'SUniversalPColumnId',
|
|
522
|
+
defaultValue: () => undefined,
|
|
523
|
+
},
|
|
524
|
+
type: {
|
|
525
|
+
label: 'Predicate',
|
|
526
|
+
fieldType: 'FilterType',
|
|
527
|
+
defaultValue: () => 'inSet',
|
|
528
|
+
},
|
|
529
|
+
value: {
|
|
530
|
+
fieldType: 'unknown[]',
|
|
531
|
+
label: 'Set',
|
|
532
|
+
defaultValue: () => [],
|
|
533
|
+
},
|
|
534
|
+
},
|
|
535
|
+
supportedFor: isStringValueType,
|
|
536
|
+
},
|
|
537
|
+
notInSet: {
|
|
538
|
+
label: 'Col ∉ Set (Not In Set)',
|
|
539
|
+
form: {
|
|
540
|
+
column: {
|
|
541
|
+
label: 'Column',
|
|
542
|
+
fieldType: 'SUniversalPColumnId',
|
|
543
|
+
defaultValue: () => undefined,
|
|
544
|
+
},
|
|
545
|
+
type: {
|
|
546
|
+
label: 'Predicate',
|
|
547
|
+
fieldType: 'FilterType',
|
|
548
|
+
defaultValue: () => 'notInSet',
|
|
549
|
+
},
|
|
550
|
+
value: {
|
|
551
|
+
label: 'Seq',
|
|
552
|
+
fieldType: 'unknown[]',
|
|
553
|
+
defaultValue: () => [],
|
|
554
|
+
},
|
|
555
|
+
},
|
|
556
|
+
supportedFor: isStringValueType,
|
|
557
|
+
},
|
|
453
558
|
} satisfies FilterSpecMetadataRecord<FilterSpecType>;
|
|
454
559
|
|
|
455
560
|
export function getFilterUiTypeOptions(columnSpec?: SimplifiedPColumnSpec) {
|
|
@@ -1,15 +1,81 @@
|
|
|
1
|
-
<script lang="ts" setup
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
withDefaults(defineProps<{
|
|
3
|
+
groupPosition?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'middle';
|
|
4
|
+
}>(), {
|
|
5
|
+
groupPosition: undefined,
|
|
6
|
+
});
|
|
7
|
+
</script>
|
|
2
8
|
|
|
3
9
|
<script lang="ts">
|
|
10
|
+
|
|
4
11
|
export default {
|
|
5
12
|
inheritAttrs: false,
|
|
6
13
|
};
|
|
7
14
|
</script>
|
|
8
15
|
|
|
9
16
|
<template>
|
|
10
|
-
<div class="double-contour">
|
|
17
|
+
<div class="double-contour" :class="{ [groupPosition]: true }">
|
|
11
18
|
<div v-bind="$attrs">
|
|
12
19
|
<slot />
|
|
13
20
|
</div>
|
|
14
21
|
</div>
|
|
15
22
|
</template>
|
|
23
|
+
<style>
|
|
24
|
+
.double-contour {
|
|
25
|
+
&.top > div {
|
|
26
|
+
border-bottom-right-radius: 0;
|
|
27
|
+
border-bottom-left-radius: 0;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
.double-contour {
|
|
31
|
+
&.bottom > div {
|
|
32
|
+
border-top-right-radius: 0;
|
|
33
|
+
border-top-left-radius: 0;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
.double-contour {
|
|
37
|
+
&.left > div {
|
|
38
|
+
border-top-right-radius: 0;
|
|
39
|
+
border-bottom-right-radius: 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
.double-contour {
|
|
43
|
+
&.right > div {
|
|
44
|
+
border-top-left-radius: 0;
|
|
45
|
+
border-bottom-left-radius: 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
.double-contour {
|
|
49
|
+
&.top-left > div{
|
|
50
|
+
border-top-right-radius: 0;
|
|
51
|
+
border-bottom-left-radius: 0;
|
|
52
|
+
border-bottom-right-radius: 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
.double-contour {
|
|
56
|
+
&.top-right > div {
|
|
57
|
+
border-bottom-right-radius: 0;
|
|
58
|
+
border-top-left-radius: 0;
|
|
59
|
+
border-top-right-radius: 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
.double-contour {
|
|
63
|
+
&.bottom-left > div {
|
|
64
|
+
border-top-right-radius: 0;
|
|
65
|
+
border-bottom-right-radius: 0;
|
|
66
|
+
border-top-left-radius: 0;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
.double-contour {
|
|
70
|
+
&.bottom-right > div {
|
|
71
|
+
border-top-right-radius: 0;
|
|
72
|
+
border-bottom-left-radius: 0;
|
|
73
|
+
border-top-left-radius: 0;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
.double-contour {
|
|
77
|
+
&.middle > div {
|
|
78
|
+
border-radius: 0;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
</style>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DoubleContour.vue2.js","sources":["../../src/utils/DoubleContour.vue"],"sourcesContent":["<script lang=\"ts\" setup></script>\n\n<script lang=\"ts\">\nexport default {\n inheritAttrs: false,\n};\n</script>\n\n<template>\n <div class=\"double-contour\">\n <div v-bind=\"$attrs\">\n <slot />\n </div>\n </div>\n</template>\n"],"names":["_sfc_main"],"mappings":"AAGA,MAAAA,IAAe;AAAA,EACb,cAAc;AAChB;"}
|