@hostlink/nuxt-light 1.48.6 → 1.48.8

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.48.6",
4
+ "version": "1.48.8",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,20 +1,5 @@
1
- export interface LDatePickerProps {
2
- label?: string;
3
- required?: boolean;
4
- hideBottomSpace?: boolean;
5
- filled?: boolean;
6
- outlined?: boolean;
7
- standout?: boolean;
8
- rounded?: boolean;
9
- dense?: boolean;
10
- square?: boolean;
11
- stackLabel?: boolean;
12
- rules?: any[];
13
- range?: boolean;
14
- mask?: string;
15
- disable?: boolean;
16
- color?: string;
17
- }
1
+ import type { QDateProps, QInputProps } from "quasar";
2
+ export type LDatePickerProps = QDateProps & QInputProps;
18
3
  type __VLS_Props = LDatePickerProps;
19
4
  type __VLS_PublicProps = __VLS_Props & {
20
5
  modelValue?: any;
@@ -32,13 +17,13 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
32
17
  rounded: boolean;
33
18
  square: boolean;
34
19
  disable: boolean;
35
- mask: string;
36
- hideBottomSpace: boolean;
20
+ todayBtn: boolean;
21
+ range: boolean;
22
+ stackLabel: boolean;
37
23
  filled: boolean;
38
24
  outlined: boolean;
39
- standout: boolean;
40
- stackLabel: boolean;
41
- range: boolean;
25
+ standout: string | boolean;
26
+ hideBottomSpace: boolean;
42
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
43
28
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
44
29
  export default _default;
@@ -1,114 +1,174 @@
1
1
  <script setup>
2
- import { ref, computed } from "vue";
2
+ import { ref, computed, watch } from "vue";
3
3
  import { useLight } from "#imports";
4
- import { date } from "quasar";
5
- import { useI18n } from "vue-i18n";
6
- const { t } = useI18n();
7
4
  const modelValue = defineModel({ type: null });
8
5
  const props = defineProps({
9
- label: { type: String, required: false },
10
- required: { type: Boolean, required: false },
11
- hideBottomSpace: { type: Boolean, required: false, default: true },
12
- filled: { type: Boolean, required: false, default: void 0 },
13
- outlined: { type: Boolean, required: false, default: void 0 },
14
- standout: { type: Boolean, required: false, default: void 0 },
15
- rounded: { type: Boolean, required: false, default: void 0 },
16
- dense: { type: Boolean, required: false, default: void 0 },
6
+ name: { type: String, required: false },
7
+ landscape: { type: Boolean, required: false, skipCheck: true },
8
+ mask: { type: String, required: false },
9
+ locale: { type: null, required: false },
10
+ calendar: { type: null, required: false },
11
+ color: { type: Object, required: false },
12
+ textColor: { type: null, required: false },
13
+ dark: { type: [Boolean, null], required: false },
17
14
  square: { type: Boolean, required: false, default: void 0 },
18
- stackLabel: { type: Boolean, required: false, default: void 0 },
19
- rules: { type: Array, required: false },
20
- range: { type: Boolean, required: false, default: false },
21
- mask: { type: String, required: false, default: "YYYY-MM-DD" },
15
+ flat: { type: Boolean, required: false, skipCheck: true },
16
+ bordered: { type: Boolean, required: false, skipCheck: true },
17
+ readonly: { type: Boolean, required: false },
22
18
  disable: { type: Boolean, required: false, default: false },
23
- color: { type: String, required: false }
19
+ modelValue: { type: [String, Array, null, Number], required: true },
20
+ title: { type: null, required: false },
21
+ subtitle: { type: null, required: false },
22
+ defaultYearMonth: { type: null, required: false },
23
+ defaultView: { type: null, required: false },
24
+ yearsInMonthView: { type: Boolean, required: false, skipCheck: true },
25
+ events: { type: [Array, Function], required: false, skipCheck: true },
26
+ eventColor: { type: [String, Function], required: false, skipCheck: true },
27
+ options: { type: [Array, Function], required: false, skipCheck: true },
28
+ navigationMinYearMonth: { type: null, required: false },
29
+ navigationMaxYearMonth: { type: null, required: false },
30
+ noUnset: { type: Boolean, required: false, skipCheck: true },
31
+ firstDayOfWeek: { type: null, required: false },
32
+ todayBtn: { type: Boolean, required: false, skipCheck: true, default: true },
33
+ minimal: { type: Boolean, required: false, skipCheck: true },
34
+ multiple: { type: Boolean, required: false, skipCheck: true },
35
+ range: { type: Boolean, required: false, skipCheck: true, default: false },
36
+ emitImmediately: { type: Boolean, required: false, skipCheck: true },
37
+ "onUpdate:modelValue": { type: Function, required: false },
38
+ onNavigation: { type: Function, required: false },
39
+ onRangeStart: { type: Function, required: false },
40
+ onRangeEnd: { type: Function, required: false },
41
+ fillMask: { type: [Boolean, String], required: false, skipCheck: true },
42
+ reverseFillMask: { type: Boolean, required: false, skipCheck: true },
43
+ unmaskedValue: { type: Boolean, required: false, skipCheck: true },
44
+ maskTokens: { type: null, required: false },
45
+ error: { type: [Boolean, null], required: false, skipCheck: true },
46
+ errorMessage: { type: null, required: false },
47
+ noErrorIcon: { type: Boolean, required: false, skipCheck: true },
48
+ rules: { type: null, required: false },
49
+ reactiveRules: { type: Boolean, required: false, skipCheck: true },
50
+ lazyRules: { type: [Boolean, String], required: false, skipCheck: true },
51
+ label: { type: null, required: false },
52
+ stackLabel: { type: Boolean, required: false, skipCheck: true, default: void 0 },
53
+ hint: { type: null, required: false },
54
+ hideHint: { type: Boolean, required: false, skipCheck: true },
55
+ prefix: { type: null, required: false },
56
+ suffix: { type: null, required: false },
57
+ labelColor: { type: null, required: false },
58
+ bgColor: { type: null, required: false },
59
+ loading: { type: Boolean, required: false, skipCheck: true },
60
+ clearable: { type: Boolean, required: false, skipCheck: true },
61
+ clearIcon: { type: null, required: false },
62
+ filled: { type: Boolean, required: false, skipCheck: true, default: void 0 },
63
+ outlined: { type: Boolean, required: false, skipCheck: true, default: void 0 },
64
+ borderless: { type: Boolean, required: false, skipCheck: true },
65
+ standout: { type: [Boolean, String], required: false, skipCheck: true, default: void 0 },
66
+ labelSlot: { type: Boolean, required: false, skipCheck: true },
67
+ bottomSlots: { type: Boolean, required: false, skipCheck: true },
68
+ hideBottomSpace: { type: Boolean, required: false, skipCheck: true, default: true },
69
+ counter: { type: Boolean, required: false, skipCheck: true },
70
+ rounded: { type: Boolean, required: false, skipCheck: true, default: void 0 },
71
+ dense: { type: Boolean, required: false, skipCheck: true, default: void 0 },
72
+ itemAligned: { type: Boolean, required: false, skipCheck: true },
73
+ autofocus: { type: Boolean, required: false, skipCheck: true },
74
+ for: { type: null, required: false },
75
+ shadowText: { type: null, required: false },
76
+ type: { type: null, required: false },
77
+ debounce: { type: null, required: false },
78
+ maxlength: { type: null, required: false },
79
+ autogrow: { type: Boolean, required: false, skipCheck: true },
80
+ inputClass: { type: null, required: false },
81
+ inputStyle: { type: null, required: false },
82
+ onFocus: { type: Function, required: false },
83
+ onBlur: { type: Function, required: false },
84
+ onClear: { type: Function, required: false }
24
85
  });
25
86
  const light = useLight();
26
87
  const popup = ref(null);
88
+ watch(modelValue, (newVal) => {
89
+ console.log("modelValue changed", newVal);
90
+ popup.value.hide();
91
+ });
27
92
  const localValue = computed({
28
93
  get: () => {
29
- if (modelValue.value) {
30
- if (typeof modelValue.value == "object") {
31
- return modelValue.value.from + " - " + modelValue.value.to;
94
+ console.log("getting localValue", modelValue.value);
95
+ if (!modelValue.value) {
96
+ return modelValue.value;
97
+ }
98
+ if (typeof modelValue.value === "object") {
99
+ let s = modelValue.value.from;
100
+ if (modelValue.value.to) {
101
+ s += " to " + modelValue.value.to;
32
102
  }
103
+ return s;
33
104
  }
105
+ console.log("getting localValue", modelValue.value);
34
106
  return modelValue.value;
35
107
  },
36
- set: (value) => {
108
+ set: (val) => {
37
109
  if (props.range) {
38
- if (typeof value == "object") {
39
- modelValue.value = value;
110
+ if (val == null || val == "") {
111
+ modelValue.value = null;
40
112
  return;
41
113
  }
42
- const parts = value.split(" - ");
114
+ const parts = val.split(" to ");
43
115
  if (parts.length == 2) {
44
116
  const from = parts[0];
45
117
  const to = parts[1];
46
118
  if (from.match(/^\d{4}-\d{2}-\d{2}$/) && to.match(/^\d{4}-\d{2}-\d{2}$/)) {
119
+ console.log("setting range", from, to);
47
120
  modelValue.value = { from, to };
48
121
  return;
49
122
  }
50
123
  }
51
- }
52
- if (value.match(/^\d{4}-\d{2}-\d{2}$/)) {
53
- modelValue.value = value;
124
+ modelValue.value = null;
54
125
  return;
55
126
  }
56
- modelValue.value = null;
127
+ modelValue.value = val;
57
128
  }
58
129
  });
59
- const dateValue = computed({
60
- get: () => {
61
- return modelValue;
62
- },
63
- set: (value) => {
64
- if (popup.value) {
65
- popup.value.hide();
66
- }
67
- localValue.value = value;
68
- modelValue.value = value;
130
+ const inputMask = computed(() => {
131
+ if (!props.range) {
132
+ return "####-##-##";
69
133
  }
134
+ return "";
70
135
  });
71
- const rules = [];
72
- if (props.required) {
73
- rules.push((val) => {
74
- if (!val) {
75
- return "Required";
76
- }
77
- });
78
- }
79
- if (!props.range) {
80
- rules.push((val) => {
81
- if (val) {
82
- if (!val.match(/^\d{4}-\d{2}-\d{2}$/)) {
83
- return "Invalid date format";
136
+ const inputRules = computed(() => {
137
+ const rules = [];
138
+ if (!props.range) {
139
+ rules.push((val) => {
140
+ if (val) {
141
+ if (!val.match(/^\d{4}-\d{2}-\d{2}$/)) {
142
+ return "Invalid date format";
143
+ }
84
144
  }
85
- }
86
- });
87
- }
88
- const input_attrs = computed(() => {
89
- const a = light.getInputProps(props);
90
- a.rules = rules;
91
- a.mask = props.range ? "####-##-## - ####-##-##" : "####-##-##";
92
- return a;
145
+ });
146
+ return rules;
147
+ }
148
+ return null;
149
+ });
150
+ const inputProps = computed(() => {
151
+ const { mask, locale, calendar, modelValue: modelValue2, defautYearMonth, defaultView, events, ...rest } = light.getInputProps(props);
152
+ return rest;
93
153
  });
94
- const date_attrs = computed(() => {
95
- const { label, rules: rules2, hideBottomSpace, filled, outlined, standout, rounded, dense, square, stackLabel, ...rest } = props;
154
+ const dateProps = computed(() => {
155
+ const { filled, outlined, standout, rounded, dense, square, stackLabel, color, mask, ...rest } = props;
96
156
  return rest;
97
157
  });
98
158
  </script>
99
159
 
100
160
  <template>
101
- <q-input v-bind="input_attrs" v-model="localValue">
161
+ <q-input v-model="localValue" v-bind="inputProps" :mask="inputMask" :rules="inputRules">
102
162
  <template v-slot:prepend>
103
- <q-btn icon="sym_o_event" round dense flat>
163
+ <q-icon name="sym_o_event" class="cursor-pointer">
104
164
  <q-popup-proxy cover transition-show="scale" transition-hide="scale" ref="popup">
105
- <q-date v-bind="date_attrs" v-model="dateValue" :color="color ?? $light.color" today-btn :title="label">
165
+ <q-date :color="color ?? $light.color" mask="YYYY-MM-DD" v-bind="dateProps">
106
166
  <div class="row items-center justify-end">
107
167
  <q-btn v-close-popup :label="$t('Close')" :color="color ?? $light.color" flat />
108
168
  </div>
109
169
  </q-date>
110
170
  </q-popup-proxy>
111
- </q-btn>
171
+ </q-icon>
112
172
  </template>
113
173
 
114
174
  <template v-for="(s, name) in $slots" v-slot:[name]="props" :key="name">
@@ -1,20 +1,5 @@
1
- export interface LDatePickerProps {
2
- label?: string;
3
- required?: boolean;
4
- hideBottomSpace?: boolean;
5
- filled?: boolean;
6
- outlined?: boolean;
7
- standout?: boolean;
8
- rounded?: boolean;
9
- dense?: boolean;
10
- square?: boolean;
11
- stackLabel?: boolean;
12
- rules?: any[];
13
- range?: boolean;
14
- mask?: string;
15
- disable?: boolean;
16
- color?: string;
17
- }
1
+ import type { QDateProps, QInputProps } from "quasar";
2
+ export type LDatePickerProps = QDateProps & QInputProps;
18
3
  type __VLS_Props = LDatePickerProps;
19
4
  type __VLS_PublicProps = __VLS_Props & {
20
5
  modelValue?: any;
@@ -32,13 +17,13 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
32
17
  rounded: boolean;
33
18
  square: boolean;
34
19
  disable: boolean;
35
- mask: string;
36
- hideBottomSpace: boolean;
20
+ todayBtn: boolean;
21
+ range: boolean;
22
+ stackLabel: boolean;
37
23
  filled: boolean;
38
24
  outlined: boolean;
39
- standout: boolean;
40
- stackLabel: boolean;
41
- range: boolean;
25
+ standout: string | boolean;
26
+ hideBottomSpace: boolean;
42
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
43
28
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
44
29
  export default _default;
@@ -8,11 +8,11 @@ declare const __VLS_component: import("vue").DefineComponent<QFieldProps, {}, {}
8
8
  dark: boolean | null;
9
9
  rounded: boolean;
10
10
  square: boolean;
11
- hideBottomSpace: boolean;
11
+ stackLabel: boolean;
12
12
  filled: boolean;
13
13
  outlined: boolean;
14
14
  standout: string | boolean;
15
- stackLabel: boolean;
15
+ hideBottomSpace: boolean;
16
16
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
17
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
18
18
  export default _default;
@@ -8,11 +8,11 @@ declare const __VLS_component: import("vue").DefineComponent<QFieldProps, {}, {}
8
8
  dark: boolean | null;
9
9
  rounded: boolean;
10
10
  square: boolean;
11
- hideBottomSpace: boolean;
11
+ stackLabel: boolean;
12
12
  filled: boolean;
13
13
  outlined: boolean;
14
14
  standout: string | boolean;
15
- stackLabel: boolean;
15
+ hideBottomSpace: boolean;
16
16
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
17
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
18
18
  export default _default;
@@ -2,15 +2,15 @@ declare const _default: import("vue").DefineComponent<{}, {
2
2
  $emit: (event: "close" | "input", ...args: any[]) => void;
3
3
  base: string;
4
4
  closeable: boolean;
5
+ multiple: boolean;
5
6
  height: string;
6
7
  defaultAction: string;
7
- multiple: boolean;
8
8
  $props: {
9
9
  readonly base?: string | undefined;
10
10
  readonly closeable?: boolean | undefined;
11
+ readonly multiple?: boolean | undefined;
11
12
  readonly height?: string | undefined;
12
13
  readonly defaultAction?: string | undefined;
13
- readonly multiple?: boolean | undefined;
14
14
  };
15
15
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
16
16
  export default _default;
@@ -2,15 +2,15 @@ declare const _default: import("vue").DefineComponent<{}, {
2
2
  $emit: (event: "close" | "input", ...args: any[]) => void;
3
3
  base: string;
4
4
  closeable: boolean;
5
+ multiple: boolean;
5
6
  height: string;
6
7
  defaultAction: string;
7
- multiple: boolean;
8
8
  $props: {
9
9
  readonly base?: string | undefined;
10
10
  readonly closeable?: boolean | undefined;
11
+ readonly multiple?: boolean | undefined;
11
12
  readonly height?: string | undefined;
12
13
  readonly defaultAction?: string | undefined;
13
- readonly multiple?: boolean | undefined;
14
14
  };
15
15
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
16
16
  export default _default;
@@ -29,10 +29,10 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
29
29
  dense: boolean;
30
30
  rounded: boolean;
31
31
  square: boolean;
32
+ stackLabel: boolean;
32
33
  filled: boolean;
33
34
  outlined: boolean;
34
35
  standout: boolean;
35
- stackLabel: boolean;
36
36
  driveIndex: number;
37
37
  accept: string;
38
38
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -29,10 +29,10 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
29
29
  dense: boolean;
30
30
  rounded: boolean;
31
31
  square: boolean;
32
+ stackLabel: boolean;
32
33
  filled: boolean;
33
34
  outlined: boolean;
34
35
  standout: boolean;
35
- stackLabel: boolean;
36
36
  driveIndex: number;
37
37
  accept: string;
38
38
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -17,9 +17,9 @@ declare const _default: import("vue").DefineComponent<LFileProps, {}, {}, {}, {}
17
17
  dense: boolean;
18
18
  rounded: boolean;
19
19
  square: boolean;
20
+ stackLabel: boolean;
20
21
  filled: boolean;
21
22
  outlined: boolean;
22
23
  standout: boolean;
23
- stackLabel: boolean;
24
24
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
25
  export default _default;
@@ -17,9 +17,9 @@ declare const _default: import("vue").DefineComponent<LFileProps, {}, {}, {}, {}
17
17
  dense: boolean;
18
18
  rounded: boolean;
19
19
  square: boolean;
20
+ stackLabel: boolean;
20
21
  filled: boolean;
21
22
  outlined: boolean;
22
23
  standout: boolean;
23
- stackLabel: boolean;
24
24
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
25
  export default _default;
@@ -21,11 +21,11 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
21
21
  dark: boolean | null;
22
22
  rounded: boolean;
23
23
  square: boolean;
24
- hideBottomSpace: boolean;
24
+ stackLabel: boolean;
25
25
  filled: boolean;
26
26
  outlined: boolean;
27
27
  standout: string | boolean;
28
- stackLabel: boolean;
28
+ hideBottomSpace: boolean;
29
29
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
30
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
31
31
  export default _default;
@@ -21,11 +21,11 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
21
21
  dark: boolean | null;
22
22
  rounded: boolean;
23
23
  square: boolean;
24
- hideBottomSpace: boolean;
24
+ stackLabel: boolean;
25
25
  filled: boolean;
26
26
  outlined: boolean;
27
27
  standout: string | boolean;
28
- stackLabel: boolean;
28
+ hideBottomSpace: boolean;
29
29
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
30
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
31
31
  export default _default;
@@ -4,11 +4,11 @@ declare const _default: import("vue").DefineComponent<QSelectProps, {}, {}, {},
4
4
  dark: boolean | null;
5
5
  rounded: boolean;
6
6
  square: boolean;
7
- hideBottomSpace: boolean;
7
+ stackLabel: boolean;
8
8
  filled: boolean;
9
9
  outlined: boolean;
10
10
  standout: string | boolean;
11
- stackLabel: boolean;
11
+ hideBottomSpace: boolean;
12
12
  emitValue: boolean;
13
13
  mapOptions: boolean;
14
14
  optionValue: string | ((option: string | any) => any);
@@ -4,11 +4,11 @@ declare const _default: import("vue").DefineComponent<QSelectProps, {}, {}, {},
4
4
  dark: boolean | null;
5
5
  rounded: boolean;
6
6
  square: boolean;
7
- hideBottomSpace: boolean;
7
+ stackLabel: boolean;
8
8
  filled: boolean;
9
9
  outlined: boolean;
10
10
  standout: string | boolean;
11
- stackLabel: boolean;
11
+ hideBottomSpace: boolean;
12
12
  emitValue: boolean;
13
13
  mapOptions: boolean;
14
14
  optionValue: string | ((option: string | any) => any);
@@ -9,7 +9,7 @@ export type LTableColumn = QTableColumn & {
9
9
  searchIndex?: string;
10
10
  component?: Component;
11
11
  componentProps?: any;
12
- to: (row: any) => string | null;
12
+ to?: (row: any) => string | null;
13
13
  gql?: Record<string, any>;
14
14
  /**
15
15
  * @deprecated use gql instead
@@ -316,6 +316,8 @@ const getFilterValue = () => {
316
316
  f[k] = {
317
317
  between: [filters[col.name].from, filters[col.name].to]
318
318
  };
319
+ } else {
320
+ f[k] = filters[k];
319
321
  }
320
322
  } else if (col.searchType == "select") {
321
323
  f[k] = filters[col.name];
@@ -9,7 +9,7 @@ export type LTableColumn = QTableColumn & {
9
9
  searchIndex?: string;
10
10
  component?: Component;
11
11
  componentProps?: any;
12
- to: (row: any) => string | null;
12
+ to?: (row: any) => string | null;
13
13
  gql?: Record<string, any>;
14
14
  /**
15
15
  * @deprecated use gql instead
@@ -272,8 +272,8 @@ declare const light: {
272
272
  hr: string;
273
273
  center: string;
274
274
  bold: string;
275
- fontSize: string;
276
275
  url: string;
276
+ fontSize: string;
277
277
  italic: string;
278
278
  strikethrough: string;
279
279
  underline: string;
@@ -878,8 +878,8 @@ declare const _default: () => {
878
878
  hr: string;
879
879
  center: string;
880
880
  bold: string;
881
- fontSize: string;
882
881
  url: string;
882
+ fontSize: string;
883
883
  italic: string;
884
884
  strikethrough: string;
885
885
  underline: string;
@@ -1,8 +1,15 @@
1
1
  <script setup>
2
2
  import { ref } from "vue";
3
+ const status = ref("active");
3
4
  import { model } from "#imports";
4
5
  const onRequest = async (request) => {
5
- request.loadObjects("User", { status: status.value });
6
+ const filters = {};
7
+ if (status.value === "active") {
8
+ filters["status"] = 0;
9
+ } else if (status.value === "inactive") {
10
+ filters["status"] = 1;
11
+ }
12
+ request.loadObjects("User", filters);
6
13
  };
7
14
  const columns = model("User").columns({
8
15
  username: true,
@@ -19,14 +26,14 @@ const columns = model("User").columns({
19
26
 
20
27
  <template>
21
28
  <l-page>
22
- <l-tabs route>
29
+ <l-tabs route v-model="status">
23
30
  <l-tab label="Active" name="active">
24
31
  <l-table ref="table" row-key="user_id" @request-data="onRequest" :columns="columns"
25
- :actions="['view', 'edit', 'delete']" name="active"></l-table>
32
+ :actions="['view', 'update', 'delete']"></l-table>
26
33
  </l-tab>
27
34
  <l-tab label="Inactive" name="inactive">
28
35
  <l-table row-key="user_id" @request-data="onRequest" :columns="columns"
29
- :actions="['view', 'edit', 'delete']">
36
+ :actions="['view', 'update', 'delete']">
30
37
  </l-table>
31
38
  </l-tab>
32
39
  </l-tabs>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.48.6",
3
+ "version": "1.48.8",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": {
6
6
  "type": "git",