@aures5g/vue-component-library 3.17.0 → 3.19.0

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.
@@ -0,0 +1,42 @@
1
+ import { defineComponent as d, useModel as n, computed as u, openBlock as s, createBlock as p, unref as f, withModifiers as a, mergeModels as v } from "vue";
2
+ import { UICheckbox as c } from "./vue-component-library.js";
3
+ import "@fortawesome/vue-fontawesome";
4
+ import "@awesome.me/kit-bccbe657bb/icons/sharp/solid";
5
+ import "@awesome.me/kit-bccbe657bb/icons/kit/custom";
6
+ import "vue-router";
7
+ import "@vueuse/core";
8
+ import "@awesome.me/kit-bccbe657bb/icons/sharp/regular";
9
+ import "vue-tippy";
10
+ const B = /* @__PURE__ */ d({
11
+ __name: "TableSelectionCheckbox",
12
+ props: /* @__PURE__ */ v({
13
+ value: {}
14
+ }, {
15
+ modelValue: { default: [] },
16
+ modelModifiers: {}
17
+ }),
18
+ emits: ["update:modelValue"],
19
+ setup(t) {
20
+ const l = n(t, "modelValue"), r = u({
21
+ get() {
22
+ return l.value === "all" ? !0 : l.value;
23
+ },
24
+ set(o) {
25
+ Array.isArray(o) && (l.value = o);
26
+ }
27
+ }), i = u(() => l.value === "all");
28
+ return (o, e) => (s(), p(f(c), {
29
+ modelValue: r.value,
30
+ "onUpdate:modelValue": e[0] || (e[0] = (m) => r.value = m),
31
+ value: t.value,
32
+ disabled: i.value,
33
+ onClick: e[1] || (e[1] = a(() => {
34
+ }, ["stop"])),
35
+ onDblclick: e[2] || (e[2] = a(() => {
36
+ }, ["stop"]))
37
+ }, null, 8, ["modelValue", "value", "disabled"]));
38
+ }
39
+ });
40
+ export {
41
+ B as default
42
+ };
@@ -0,0 +1,70 @@
1
+ import { defineComponent as k, useModel as v, ref as u, watch as b, computed as C, openBlock as m, createElementBlock as _, createVNode as g, unref as i, createBlock as x, createCommentVNode as M, mergeModels as V } from "vue";
2
+ import { faChevronDown as y } from "@awesome.me/kit-bccbe657bb/icons/sharp/solid";
3
+ import { useACBSConfig as A, UIIconButton as B, UIMenu as F } from "./vue-component-library.js";
4
+ import "@fortawesome/vue-fontawesome";
5
+ import "@awesome.me/kit-bccbe657bb/icons/kit/custom";
6
+ import "vue-router";
7
+ import "@vueuse/core";
8
+ import "@awesome.me/kit-bccbe657bb/icons/sharp/regular";
9
+ import "vue-tippy";
10
+ const I = { class: "flex justify-center" }, D = /* @__PURE__ */ k({
11
+ __name: "TableSelectionFilter",
12
+ props: /* @__PURE__ */ V({
13
+ dataKey: {},
14
+ items: {}
15
+ }, {
16
+ selection: {},
17
+ selectionModifiers: {}
18
+ }),
19
+ emits: ["update:selection"],
20
+ setup(r) {
21
+ const a = r, n = v(r, "selection"), s = A();
22
+ function f() {
23
+ n.value = [];
24
+ }
25
+ function d() {
26
+ n.value = "all";
27
+ }
28
+ const t = u(null), o = u(!1);
29
+ b(t, (e) => {
30
+ e && (e === "reset" ? f() : e === "check-all" ? n.value = a.items.reduce((l, c) => (c[a.dataKey] && l.push(c[a.dataKey]), l), []) : e === "check-filtered" && d(), o.value = !1, t.value = null);
31
+ });
32
+ function p() {
33
+ o.value = !o.value;
34
+ }
35
+ const h = C(() => [
36
+ {
37
+ value: "check-filtered",
38
+ label: s.locale?.tableCheckFiltered || "tableCheckFiltered"
39
+ },
40
+ {
41
+ value: "check-all",
42
+ label: s.locale?.tableCheckAll || "tableCheckAll"
43
+ },
44
+ {
45
+ value: "reset",
46
+ label: s.locale?.tableCheckReset || "tableCheckReset"
47
+ }
48
+ ]);
49
+ return (e, l) => (m(), _("div", I, [
50
+ g(i(B), {
51
+ color: "tonal",
52
+ icon: i(y),
53
+ size: "32x32",
54
+ class: "[anchor-name:--checkbox-filter]",
55
+ onClick: p
56
+ }, null, 8, ["icon"]),
57
+ o.value ? (m(), x(i(F), {
58
+ key: 0,
59
+ modelValue: t.value,
60
+ "onUpdate:modelValue": l[0] || (l[0] = (c) => t.value = c),
61
+ items: h.value,
62
+ class: "[position-anchor:--checkbox-filter] absolute top-[anchor(top)] left-[calc(anchor(right)+0.31rem)]",
63
+ size: "small"
64
+ }, null, 8, ["modelValue", "items"])) : M("", !0)
65
+ ]));
66
+ }
67
+ });
68
+ export {
69
+ D as default
70
+ };
@@ -0,0 +1,11 @@
1
+ import type { Field } from '@/components/table/uiTable.types.ts';
2
+ type __VLS_Props = {
3
+ fields: Field[];
4
+ getColumnWidth: (field: string) => Record<string, string>;
5
+ item: Record<string, unknown>;
6
+ rowIndex: number;
7
+ dataKey: string;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
@@ -0,0 +1,29 @@
1
+ import { type FontAwesomeIconProps } from '@fortawesome/vue-fontawesome';
2
+ import { type SortDirections } from './uiTable.const';
3
+ type __VLS_Props = {
4
+ mode: 'divider-only' | 'in-container';
5
+ isFirst: boolean;
6
+ isLast: boolean;
7
+ name: string;
8
+ header: string;
9
+ isSortable?: boolean;
10
+ hasHeaderFilter?: boolean;
11
+ icon?: FontAwesomeIconProps['icon'];
12
+ isSorted: false | SortDirections;
13
+ hasActiveFilter: boolean;
14
+ };
15
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
16
+ sort: (name: string) => any;
17
+ openFilterOverlay: (payload: {
18
+ name: string;
19
+ event: MouseEvent;
20
+ }) => any;
21
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
22
+ onSort?: ((name: string) => any) | undefined;
23
+ onOpenFilterOverlay?: ((payload: {
24
+ name: string;
25
+ event: MouseEvent;
26
+ }) => any) | undefined;
27
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
@@ -0,0 +1,31 @@
1
+ import { type SortDirections } from './uiTable.const';
2
+ import { type Field } from '@/index';
3
+ type __VLS_Props = {
4
+ fields: Field[];
5
+ mode: 'divider-only' | 'in-container';
6
+ activeFilters: string[];
7
+ getColumnWidth: (field: string) => Record<string, string>;
8
+ openFilterOverlay: (field: string, e: Event) => void;
9
+ handleMousedown: (event: MouseEvent, fieldName: string) => void;
10
+ showSelection?: boolean;
11
+ };
12
+ type __VLS_ModelProps = {
13
+ 'sort'?: null | {
14
+ field: string;
15
+ direction: SortDirections;
16
+ };
17
+ };
18
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
19
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
+ "update:sort": (value: {
21
+ field: string;
22
+ direction: SortDirections;
23
+ } | null) => any;
24
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
25
+ "onUpdate:sort"?: ((value: {
26
+ field: string;
27
+ direction: SortDirections;
28
+ } | null) => any) | undefined;
29
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ value: unknown;
3
+ };
4
+ type __VLS_ModelProps = {
5
+ modelValue?: 'all' | unknown[];
6
+ };
7
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:modelValue": (value: unknown[] | "all") => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:modelValue"?: ((value: unknown[] | "all") => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,15 @@
1
+ type __VLS_Props = {
2
+ dataKey: string;
3
+ items: Record<string, unknown>[];
4
+ };
5
+ type __VLS_ModelProps = {
6
+ 'selection'?: unknown[] | 'all';
7
+ };
8
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "update:selection": (value: unknown[] | "all" | undefined) => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
12
+ "onUpdate:selection"?: ((value: unknown[] | "all" | undefined) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -1,6 +1,6 @@
1
1
  import { type VNode, type ClassValue } from 'vue';
2
2
  import { type SortDirections } from './uiTable.const';
3
- import { type Field, type RowClickPayload } from '@/components/table/uiTable.types.ts';
3
+ import { type Field, type RowClickPayload } from '@/components/table/uiTable.types';
4
4
  type __VLS_Props = {
5
5
  fields: Field[];
6
6
  items: Record<string, unknown>[];
@@ -8,12 +8,10 @@ type __VLS_Props = {
8
8
  mode: 'divider-only' | 'in-container';
9
9
  activeFilters: string[];
10
10
  getRowClass?: (item: Record<string, unknown>) => ClassValue;
11
+ isLoading?: boolean;
12
+ showSelection?: boolean;
11
13
  };
12
14
  type __VLS_Slots = {
13
- filter?(props: {
14
- field: string;
15
- colIndex: number;
16
- }): VNode;
17
15
  headerFilterOverlay?(props: {
18
16
  field: string;
19
17
  onClose: () => void;
@@ -39,12 +37,6 @@ type __VLS_Slots = {
39
37
  field: string;
40
38
  data: Record<string, unknown>;
41
39
  }): VNode;
42
- cell?(props: {
43
- rowIndex: number;
44
- colIndex: number;
45
- field: string;
46
- data: Record<string, unknown>;
47
- }): VNode;
48
40
  cardAction?(props: {
49
41
  rowIndex: number;
50
42
  data: Record<string, unknown>;
@@ -63,9 +55,11 @@ type __VLS_ModelProps = {
63
55
  direction: SortDirections;
64
56
  };
65
57
  'activeRow'?: number;
58
+ 'selection'?: 'all' | unknown[];
66
59
  };
67
60
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
68
61
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
62
+ "update:selection": (value: unknown[] | "all") => any;
69
63
  "update:sort": (value: {
70
64
  field: string;
71
65
  direction: SortDirections;
@@ -74,15 +68,14 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
74
68
  } & {
75
69
  rowClick: (payload: RowClickPayload) => any;
76
70
  rowDblclick: (payload: RowClickPayload) => any;
77
- rowSelect: (payload: RowClickPayload) => any;
78
71
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
79
- onRowClick?: ((payload: RowClickPayload) => any) | undefined;
80
- onRowDblclick?: ((payload: RowClickPayload) => any) | undefined;
81
- onRowSelect?: ((payload: RowClickPayload) => any) | undefined;
72
+ "onUpdate:selection"?: ((value: unknown[] | "all") => any) | undefined;
82
73
  "onUpdate:sort"?: ((value: {
83
74
  field: string;
84
75
  direction: SortDirections;
85
76
  } | null) => any) | undefined;
77
+ onRowClick?: ((payload: RowClickPayload) => any) | undefined;
78
+ onRowDblclick?: ((payload: RowClickPayload) => any) | undefined;
86
79
  "onUpdate:activeRow"?: ((value: number) => any) | undefined;
87
80
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
88
81
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,6 +1,8 @@
1
1
  import { type VNode } from 'vue';
2
2
  type __VLS_Props = {
3
3
  showCollapseButton: boolean;
4
+ showSelection?: boolean;
5
+ id: unknown;
4
6
  };
5
7
  type __VLS_Slots = {
6
8
  cardTitle?(): VNode;
@@ -12,7 +14,15 @@ type __VLS_Slots = {
12
14
  action?(): VNode;
13
15
  major?(): VNode;
14
16
  };
15
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ type __VLS_ModelProps = {
18
+ 'selection'?: unknown[] | 'all';
19
+ };
20
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
21
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
+ "update:selection": (value: unknown[] | "all" | undefined) => any;
23
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
+ "onUpdate:selection"?: ((value: unknown[] | "all" | undefined) => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
26
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
27
  declare const _default: typeof __VLS_export;
18
28
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import type { FontAwesomeIconProps } from '@fortawesome/vue-fontawesome';
2
2
  import type { FieldPlacements } from '@/components/table/uiTable.const.ts';
3
- import type { ClassValue } from 'vue';
3
+ import type { ClassValue, Component } from 'vue';
4
4
  export type Field = {
5
5
  name: string;
6
6
  header: string;
@@ -11,9 +11,21 @@ export type Field = {
11
11
  placement?: FieldPlacements;
12
12
  isResizable?: boolean;
13
13
  cellClasses?: ClassValue;
14
+ cellComponent?: Component;
15
+ filterComponent?: Component;
14
16
  };
15
17
  export type RowClickPayload = {
16
18
  originalEvent: MouseEvent | KeyboardEvent;
17
19
  data: Record<string, unknown>;
18
20
  index: number;
19
21
  };
22
+ export type FilterComponentProps = {
23
+ field: string;
24
+ colIndex: number;
25
+ };
26
+ export type CellComponentProps = {
27
+ rowIndex: number;
28
+ colIndex: number;
29
+ field: string;
30
+ data: Record<string, unknown>;
31
+ };
@@ -7,6 +7,9 @@ type PluginOptions = {
7
7
  mandatory?: string;
8
8
  expand?: string;
9
9
  collapse?: string;
10
+ tableCheckFiltered?: string;
11
+ tableCheckAll?: string;
12
+ tableCheckReset?: string;
10
13
  };
11
14
  primevue?: PrimeVueConfiguration;
12
15
  };
@@ -31,9 +31,9 @@ import UIBrandLogo from './components/infoStrip/brandLogo/UIBrandLogo.vue';
31
31
  import UIFab from './components/fab/UIFab.vue';
32
32
  import UISegmentedButton from './components/segmentedButton/UISegmentedButton.vue';
33
33
  import UITable from './components/table/UITable.vue';
34
- import type { Field, RowClickPayload } from './components/table/uiTable.types';
34
+ import type { Field, RowClickPayload, FilterComponentProps, CellComponentProps } from './components/table/uiTable.types';
35
35
  import { OverflowTooltip } from './directives/overflowTooltip';
36
36
  import UILabelValueList from '@/components/labelValueList/UILabelValueList.vue';
37
37
  import UILabelValue from '@/components/labelValueList/UILabelValue.vue';
38
38
  import UIMenu from '@/components/menu/UIMenu.vue';
39
- export { ACBSPlugin, useACBSConfig, UIButton, UINavbar, UITag, UIBadge, UICopy, UITabs, UIIconButton, UIToggleButton, UIRadioButton, UICheckbox, UIInputChip, UIFilterChip, UITextField, UITextArea, UIRichTooltip, UISnackbar, UIListItem, UIList, UIContextPanel, UIToolbar, UILanguagePicker, UIDivider, UISwitch, UIDropdown, UIInfoStrip, UIInfoStripSecondaryBox, UIPersonList, UIBrandLogo, UIFab, UISegmentedButton, UITable, type Field, type RowClickPayload, OverflowTooltip, UILabelValueList, UILabelValue, UIMenu, };
39
+ export { ACBSPlugin, useACBSConfig, UIButton, UINavbar, UITag, UIBadge, UICopy, UITabs, UIIconButton, UIToggleButton, UIRadioButton, UICheckbox, UIInputChip, UIFilterChip, UITextField, UITextArea, UIRichTooltip, UISnackbar, UIListItem, UIList, UIContextPanel, UIToolbar, UILanguagePicker, UIDivider, UISwitch, UIDropdown, UIInfoStrip, UIInfoStripSecondaryBox, UIPersonList, UIBrandLogo, UIFab, UISegmentedButton, UITable, type Field, type RowClickPayload, type FilterComponentProps, type CellComponentProps, OverflowTooltip, UILabelValueList, UILabelValue, UIMenu, };