@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.
Files changed (215) hide show
  1. package/.turbo/turbo-build.log +143 -143
  2. package/.turbo/turbo-type-check.log +1 -1
  3. package/CHANGELOG.md +14 -0
  4. package/dist/base/BtnBase.vue.js +18 -18
  5. package/dist/base/BtnBase.vue.js.map +1 -1
  6. package/dist/components/ContextProvider.vue.js.map +1 -1
  7. package/dist/components/DataTable/BaseCellComponent.vue.js +20 -20
  8. package/dist/components/DataTable/BaseCellComponent.vue.js.map +1 -1
  9. package/dist/components/DataTable/ColumnCaret.vue.js +6 -6
  10. package/dist/components/DataTable/ColumnCaret.vue.js.map +1 -1
  11. package/dist/components/DataTable/ColumnsCommandMenu.vue.js.map +1 -1
  12. package/dist/components/DataTable/RowsCommandMenu.vue.js.map +1 -1
  13. package/dist/components/DataTable/TScroll.vue.js +12 -12
  14. package/dist/components/DataTable/TScroll.vue.js.map +1 -1
  15. package/dist/components/DataTable/TableComponent.vue.js +5 -3
  16. package/dist/components/DataTable/TableComponent.vue.js.map +1 -1
  17. package/dist/components/DataTable/TdCell.vue.js +36 -36
  18. package/dist/components/DataTable/TdCell.vue.js.map +1 -1
  19. package/dist/components/DataTable/ThCell.vue.js +27 -27
  20. package/dist/components/DataTable/ThCell.vue.js.map +1 -1
  21. package/dist/components/DataTable/TrBody.vue.js +12 -12
  22. package/dist/components/DataTable/TrBody.vue.js.map +1 -1
  23. package/dist/components/DataTable/TrHead.vue.js.map +1 -1
  24. package/dist/components/DataTable/assets/TableIcon.vue.js +2 -2
  25. package/dist/components/DataTable/assets/TableIcon.vue.js.map +1 -1
  26. package/dist/components/DropdownListItem.vue.js +18 -18
  27. package/dist/components/DropdownListItem.vue.js.map +1 -1
  28. package/dist/components/HScroll.vue.js.map +1 -1
  29. package/dist/components/InputRange.vue.js.map +1 -1
  30. package/dist/components/LongText.vue.js +1 -1
  31. package/dist/components/LongText.vue.js.map +1 -1
  32. package/dist/components/LongText.vue3.js +1 -1
  33. package/dist/components/PlAccordion/ExpandTransition.vue.js.map +1 -1
  34. package/dist/components/PlAccordion/ExpandTransition.vue2.js.map +1 -1
  35. package/dist/components/PlAccordion/ExpandTransition.vue3.js +1 -1
  36. package/dist/components/PlAccordion/PlAccordion.vue.js.map +1 -1
  37. package/dist/components/PlAccordion/PlAccordionSection.vue2.js +21 -21
  38. package/dist/components/PlAccordion/PlAccordionSection.vue2.js.map +1 -1
  39. package/dist/components/PlAlert/PlAlert.vue.js +23 -23
  40. package/dist/components/PlAlert/PlAlert.vue.js.map +1 -1
  41. package/dist/components/PlAutocomplete/PlAutocomplete.vue.d.ts +4 -0
  42. package/dist/components/PlAutocomplete/PlAutocomplete.vue.js +112 -106
  43. package/dist/components/PlAutocomplete/PlAutocomplete.vue.js.map +1 -1
  44. package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.d.ts +4 -0
  45. package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.js +100 -94
  46. package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.js.map +1 -1
  47. package/dist/components/PlBtnAccent/PlBtnAccent.vue.js.map +1 -1
  48. package/dist/components/PlBtnDanger/PlBtnDanger.vue.js.map +1 -1
  49. package/dist/components/PlBtnGhost/PlBtnGhost.vue.js +21 -21
  50. package/dist/components/PlBtnGhost/PlBtnGhost.vue.js.map +1 -1
  51. package/dist/components/PlBtnGroup/PlBtnGroup.vue.js +34 -34
  52. package/dist/components/PlBtnGroup/PlBtnGroup.vue.js.map +1 -1
  53. package/dist/components/PlBtnLink/PlBtnLink.vue.js +12 -12
  54. package/dist/components/PlBtnLink/PlBtnLink.vue.js.map +1 -1
  55. package/dist/components/PlBtnPrimary/PlBtnPrimary.vue.js.map +1 -1
  56. package/dist/components/PlBtnSecondary/PlBtnSecondary.vue.js.map +1 -1
  57. package/dist/components/PlBtnSplit/PlBtnSplit.vue.js +31 -31
  58. package/dist/components/PlBtnSplit/PlBtnSplit.vue.js.map +1 -1
  59. package/dist/components/PlChartHistogram/PlChartHistogram.vue2.js +18 -18
  60. package/dist/components/PlChartHistogram/PlChartHistogram.vue2.js.map +1 -1
  61. package/dist/components/PlChartStackedBar/Legends.vue2.js.map +1 -1
  62. package/dist/components/PlChartStackedBar/PlChartStackedBar.vue2.js +15 -15
  63. package/dist/components/PlChartStackedBar/PlChartStackedBar.vue2.js.map +1 -1
  64. package/dist/components/PlChartStackedBar/PlChartStackedBarCompact.vue2.js.map +1 -1
  65. package/dist/components/PlChartStackedBar/StackedRow.vue2.js.map +1 -1
  66. package/dist/components/PlChartStackedBar/StackedRowCompact.vue2.js.map +1 -1
  67. package/dist/components/PlCheckbox/PlCheckbox.vue.js +13 -13
  68. package/dist/components/PlCheckbox/PlCheckbox.vue.js.map +1 -1
  69. package/dist/components/PlCheckbox/PlCheckboxBase.vue.js +6 -6
  70. package/dist/components/PlCheckbox/PlCheckboxBase.vue.js.map +1 -1
  71. package/dist/components/PlCheckboxGroup/PlCheckboxGroup.vue.js +28 -28
  72. package/dist/components/PlCheckboxGroup/PlCheckboxGroup.vue.js.map +1 -1
  73. package/dist/components/PlChip/PlChip.vue.js +20 -20
  74. package/dist/components/PlChip/PlChip.vue.js.map +1 -1
  75. package/dist/components/PlClipboard/PlClipboard.vue2.js.map +1 -1
  76. package/dist/components/PlConfirmDialog.vue.js +14 -14
  77. package/dist/components/PlConfirmDialog.vue.js.map +1 -1
  78. package/dist/components/PlDialogModal/PlDialogModal.vue.js +30 -30
  79. package/dist/components/PlDialogModal/PlDialogModal.vue.js.map +1 -1
  80. package/dist/components/PlDropdown/OptionList.vue.js +40 -40
  81. package/dist/components/PlDropdown/OptionList.vue.js.map +1 -1
  82. package/dist/components/PlDropdown/PlDropdown.vue.d.ts +8 -0
  83. package/dist/components/PlDropdown/PlDropdown.vue.js +102 -95
  84. package/dist/components/PlDropdown/PlDropdown.vue.js.map +1 -1
  85. package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js +95 -93
  86. package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js.map +1 -1
  87. package/dist/components/PlDropdownLine/PlDropdownLine.vue.d.ts +1 -1
  88. package/dist/components/PlDropdownLine/PlDropdownLine.vue.js +4 -4
  89. package/dist/components/PlDropdownLine/PlDropdownLine.vue.js.map +1 -1
  90. package/dist/components/PlDropdownLine/ResizableInput.vue.js +12 -12
  91. package/dist/components/PlDropdownLine/ResizableInput.vue.js.map +1 -1
  92. package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.d.ts +4 -0
  93. package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js +88 -82
  94. package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js.map +1 -1
  95. package/dist/components/PlDropdownMultiRef/PlDropdownMultiRef.vue.d.ts +1 -1
  96. package/dist/components/PlDropdownMultiRef/PlDropdownMultiRef.vue.js.map +1 -1
  97. package/dist/components/PlDropdownRef/PlDropdownRef.vue.js +11 -11
  98. package/dist/components/PlDropdownRef/PlDropdownRef.vue.js.map +1 -1
  99. package/dist/components/PlEditableTitle/PlEditableTitle.vue.d.ts +1 -1
  100. package/dist/components/PlEditableTitle/PlEditableTitle.vue.js +36 -36
  101. package/dist/components/PlEditableTitle/PlEditableTitle.vue.js.map +1 -1
  102. package/dist/components/PlElementList/PlElementList.vue.d.ts +20 -0
  103. package/dist/components/PlElementList/PlElementList.vue2.js +180 -135
  104. package/dist/components/PlElementList/PlElementList.vue2.js.map +1 -1
  105. package/dist/components/PlElementList/PlElementListItem.vue.d.ts +20 -0
  106. package/dist/components/PlElementList/PlElementListItem.vue2.js +101 -76
  107. package/dist/components/PlElementList/PlElementListItem.vue2.js.map +1 -1
  108. package/dist/components/PlErrorAlert/PlErrorAlert.vue2.js.map +1 -1
  109. package/dist/components/PlErrorBoundary/PlErrorBoundary.vue.js.map +1 -1
  110. package/dist/components/PlFileDialog/Local.vue.js +24 -24
  111. package/dist/components/PlFileDialog/Local.vue.js.map +1 -1
  112. package/dist/components/PlFileDialog/PlFileDialog.vue.js +38 -38
  113. package/dist/components/PlFileDialog/PlFileDialog.vue.js.map +1 -1
  114. package/dist/components/PlFileDialog/Remote.vue.js +2 -2
  115. package/dist/components/PlFileDialog/Remote.vue.js.map +1 -1
  116. package/dist/components/PlFileDialog/Shortcuts.vue2.js +4 -4
  117. package/dist/components/PlFileDialog/Shortcuts.vue2.js.map +1 -1
  118. package/dist/components/PlFileInput/PlFileInput.vue.d.ts +1 -1
  119. package/dist/components/PlFileInput/PlFileInput.vue.js +78 -76
  120. package/dist/components/PlFileInput/PlFileInput.vue.js.map +1 -1
  121. package/dist/components/PlIcon16/PlIcon16.vue2.js.map +1 -1
  122. package/dist/components/PlIcon24/PlIcon24.vue2.js.map +1 -1
  123. package/dist/components/PlLoaderCircular/PlLoaderCircular.vue.js +11 -11
  124. package/dist/components/PlLoaderCircular/PlLoaderCircular.vue.js.map +1 -1
  125. package/dist/components/PlLogView/PlLogView.vue.js +62 -60
  126. package/dist/components/PlLogView/PlLogView.vue.js.map +1 -1
  127. package/dist/components/PlNotificationAlert/PlNotificationAlert.vue.js +22 -22
  128. package/dist/components/PlNotificationAlert/PlNotificationAlert.vue.js.map +1 -1
  129. package/dist/components/PlNumberField/PlNumberField.vue.d.ts +6 -1
  130. package/dist/components/PlNumberField/PlNumberField.vue.js +66 -60
  131. package/dist/components/PlNumberField/PlNumberField.vue.js.map +1 -1
  132. package/dist/components/PlProgressBar/PlProgressBar.vue.js +12 -12
  133. package/dist/components/PlProgressBar/PlProgressBar.vue.js.map +1 -1
  134. package/dist/components/PlProgressCell/PlProgressCell.vue.js +20 -20
  135. package/dist/components/PlProgressCell/PlProgressCell.vue.js.map +1 -1
  136. package/dist/components/PlRadio/PlRadio.vue2.js.map +1 -1
  137. package/dist/components/PlRadio/PlRadioGroup.vue2.js +8 -8
  138. package/dist/components/PlRadio/PlRadioGroup.vue2.js.map +1 -1
  139. package/dist/components/PlSearchField/PlSearchField.vue2.js +19 -19
  140. package/dist/components/PlSearchField/PlSearchField.vue2.js.map +1 -1
  141. package/dist/components/PlSectionSeparator/PlSectionSeparator.vue2.js +8 -8
  142. package/dist/components/PlSectionSeparator/PlSectionSeparator.vue2.js.map +1 -1
  143. package/dist/components/PlSidebar/PlSidebarGroup.vue2.js.map +1 -1
  144. package/dist/components/PlSidebar/PlSidebarItem.vue2.js.map +1 -1
  145. package/dist/components/PlSlideModal/PlPureSlideModal.vue.js +5 -3
  146. package/dist/components/PlSlideModal/PlPureSlideModal.vue.js.map +1 -1
  147. package/dist/components/PlSlideModal/PlSlideModal.vue2.js.map +1 -1
  148. package/dist/components/PlSplash/PlSplash.vue.js +16 -16
  149. package/dist/components/PlSplash/PlSplash.vue.js.map +1 -1
  150. package/dist/components/PlStatusTag/PlStatusTag.vue.js +7 -7
  151. package/dist/components/PlStatusTag/PlStatusTag.vue.js.map +1 -1
  152. package/dist/components/PlSvg/PlSvg.vue2.js.map +1 -1
  153. package/dist/components/PlTabs/PlTabs.vue.js +18 -18
  154. package/dist/components/PlTabs/PlTabs.vue.js.map +1 -1
  155. package/dist/components/PlTabs/Tab.vue.js +9 -9
  156. package/dist/components/PlTabs/Tab.vue.js.map +1 -1
  157. package/dist/components/PlTextArea/PlTextArea.vue.js +55 -53
  158. package/dist/components/PlTextArea/PlTextArea.vue.js.map +1 -1
  159. package/dist/components/PlTextField/PlTextField.vue.d.ts +4 -0
  160. package/dist/components/PlTextField/PlTextField.vue.js +66 -60
  161. package/dist/components/PlTextField/PlTextField.vue.js.map +1 -1
  162. package/dist/components/PlToggleSwitch/PlToggleSwitch.vue.js +14 -14
  163. package/dist/components/PlToggleSwitch/PlToggleSwitch.vue.js.map +1 -1
  164. package/dist/components/PlTooltip/Beak.vue.js +2 -2
  165. package/dist/components/PlTooltip/Beak.vue.js.map +1 -1
  166. package/dist/components/PlTooltip/PlTooltip.vue.js +50 -50
  167. package/dist/components/PlTooltip/PlTooltip.vue.js.map +1 -1
  168. package/dist/components/Scrollable.vue.js.map +1 -1
  169. package/dist/components/Slider.vue.js +35 -35
  170. package/dist/components/Slider.vue.js.map +1 -1
  171. package/dist/components/SliderRange.vue.js +47 -47
  172. package/dist/components/SliderRange.vue.js.map +1 -1
  173. package/dist/components/SliderRangeTriple.vue.js +47 -47
  174. package/dist/components/SliderRangeTriple.vue.js.map +1 -1
  175. package/dist/components/TabItem.vue.js.map +1 -1
  176. package/dist/components/ThemeSwitcher.vue.js +2 -2
  177. package/dist/components/ThemeSwitcher.vue.js.map +1 -1
  178. package/dist/components/TransitionSlidePanel.vue.js.map +1 -1
  179. package/dist/components/VScroll.vue.js.map +1 -1
  180. package/dist/components/contextMenu/Menu.vue2.js +12 -12
  181. package/dist/components/contextMenu/Menu.vue2.js.map +1 -1
  182. package/dist/composition/filters/metadata.d.ts +205 -0
  183. package/dist/composition/filters/metadata.js +129 -19
  184. package/dist/composition/filters/metadata.js.map +1 -1
  185. package/dist/index.js +1 -1
  186. package/dist/layout/PlBlockPage/PlBlockPage.vue.js +27 -27
  187. package/dist/layout/PlBlockPage/PlBlockPage.vue.js.map +1 -1
  188. package/dist/layout/PlContainer/PlContainer.vue.js +10 -10
  189. package/dist/layout/PlContainer/PlContainer.vue.js.map +1 -1
  190. package/dist/layout/PlGrid/PlGrid.vue.js.map +1 -1
  191. package/dist/layout/PlRow/PlRow.vue.js +8 -8
  192. package/dist/layout/PlRow/PlRow.vue.js.map +1 -1
  193. package/dist/layout/PlSpacer/PlSpacer.vue.js.map +1 -1
  194. package/dist/utils/DoubleContour.vue.d.ts +7 -1
  195. package/dist/utils/DoubleContour.vue.js +20 -13
  196. package/dist/utils/DoubleContour.vue.js.map +1 -1
  197. package/dist/utils/DoubleContour.vue3.js +7 -0
  198. package/dist/utils/DoubleContour.vue3.js.map +1 -0
  199. package/dist/utils/DropdownOverlay/DropdownOverlay.vue.js.map +1 -1
  200. package/dist/utils/PlCloseModalBtn.vue.js +2 -2
  201. package/dist/utils/PlCloseModalBtn.vue.js.map +1 -1
  202. package/dist/utils/TextLabel.vue.js.map +1 -1
  203. package/package.json +5 -5
  204. package/src/components/PlAutocomplete/PlAutocomplete.vue +6 -1
  205. package/src/components/PlAutocompleteMulti/PlAutocompleteMulti.vue +6 -1
  206. package/src/components/PlDropdown/PlDropdown.vue +12 -2
  207. package/src/components/PlDropdownMulti/PlDropdownMulti.vue +6 -1
  208. package/src/components/PlElementList/PlElementList.vue +40 -6
  209. package/src/components/PlElementList/PlElementListItem.vue +64 -47
  210. package/src/components/PlNumberField/PlNumberField.vue +4 -1
  211. package/src/components/PlTextField/PlTextField.vue +5 -1
  212. package/src/composition/filters/metadata.ts +105 -0
  213. package/src/utils/DoubleContour.vue +68 -2
  214. package/dist/utils/DoubleContour.vue2.js +0 -7
  215. 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
- const getItemClass = (item: T, index: number): null | string | string[] => {
241
- if (typeof props.itemClass === 'function') {
242
- return props.itemClass(item, index);
243
- }
244
- return props.itemClass ?? null;
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="[$style.root, {
38
- [$style.active]: props.isActive,
39
- [$style.pinned]: props.isPinned,
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.head, {
46
- [$style.clickable]: hasContentSlot,
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
- v-if="props.showDragHandle"
52
- :class="[$style.action, $style.draggable, { [$style.disable]: !props.isDraggable } ]"
53
- :data-draggable="props.isDraggable"
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.isToggable"
66
- :class="[$style.action, $style.clickable, { [$style.disable]: !props.isToggable }]"
67
- @click.stop="emit('toggle', props.item, props.index)"
64
+ v-if="props.showDragHandle"
65
+ :class="[$style.action, $style.draggable, { [$style.disable]: !props.isDraggable } ]"
66
+ :data-draggable="props.isDraggable"
68
67
  >
69
- <PlIcon24 :name="props.isToggled === true ? 'view-hide' : 'view-show'" size="16" />
68
+ <PlIcon16 name="drag-dots" />
70
69
  </div>
71
- <div
72
- v-if="props.isPinnable"
73
- :class="[$style.action, $style.clickable, {
74
- [$style.disable]: !props.isPinnable,
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
- <div
82
- v-if="props.isRemovable"
83
- :class="[$style.action, $style.clickable]"
84
- @click.stop="emit('remove', props.item, props.index)"
85
- >
86
- <PlIcon16 name="close" />
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
- v-if="hasContentSlot && props.isExpanded"
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></script>
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,7 +0,0 @@
1
- const t = {
2
- inheritAttrs: !1
3
- };
4
- export {
5
- t as default
6
- };
7
- //# sourceMappingURL=DoubleContour.vue2.js.map
@@ -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;"}