@hostlink/nuxt-light 1.48.7 → 1.48.9

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.7",
4
+ "version": "1.48.9",
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, type QInputProps } from "quasar";
2
+ export type LDatePickerProps = Omit<QDateProps, "modelValue"> & Omit<QInputProps, "modelValue">;
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,45 +1,117 @@
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
- const modelValue = defineModel({ type: null });
4
+ import { QInput } from "quasar";
5
+ const modelValue = defineModel({ type: null, ...{
6
+ type: [String, Object, null],
7
+ default: null
8
+ } });
8
9
  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 },
10
+ name: { type: String, required: false },
11
+ landscape: { type: Boolean, required: false, skipCheck: true },
12
+ mask: { type: String, required: false },
13
+ locale: { type: null, required: false },
14
+ calendar: { type: null, required: false },
15
+ color: { type: Object, required: false },
16
+ textColor: { type: null, required: false },
17
+ dark: { type: [Boolean, null], required: false },
17
18
  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" },
19
+ flat: { type: Boolean, required: false, skipCheck: true },
20
+ bordered: { type: Boolean, required: false, skipCheck: true },
21
+ readonly: { type: Boolean, required: false },
22
22
  disable: { type: Boolean, required: false, default: false },
23
- color: { type: String, required: false }
23
+ title: { type: null, required: false },
24
+ subtitle: { type: null, required: false },
25
+ defaultYearMonth: { type: null, required: false },
26
+ defaultView: { type: null, required: false },
27
+ yearsInMonthView: { type: Boolean, required: false, skipCheck: true },
28
+ events: { type: [Array, Function], required: false, skipCheck: true },
29
+ eventColor: { type: [String, Function], required: false, skipCheck: true },
30
+ options: { type: [Array, Function], required: false, skipCheck: true },
31
+ navigationMinYearMonth: { type: null, required: false },
32
+ navigationMaxYearMonth: { type: null, required: false },
33
+ noUnset: { type: Boolean, required: false, skipCheck: true },
34
+ firstDayOfWeek: { type: null, required: false },
35
+ todayBtn: { type: Boolean, required: false, skipCheck: true, default: true },
36
+ minimal: { type: Boolean, required: false, skipCheck: true },
37
+ multiple: { type: Boolean, required: false, skipCheck: true },
38
+ range: { type: Boolean, required: false, skipCheck: true, default: false },
39
+ emitImmediately: { type: Boolean, required: false, skipCheck: true },
40
+ "onUpdate:modelValue": { type: Function, required: false },
41
+ onNavigation: { type: Function, required: false },
42
+ onRangeStart: { type: Function, required: false },
43
+ onRangeEnd: { type: Function, required: false },
44
+ fillMask: { type: [Boolean, String], required: false, skipCheck: true },
45
+ reverseFillMask: { type: Boolean, required: false, skipCheck: true },
46
+ unmaskedValue: { type: Boolean, required: false, skipCheck: true },
47
+ maskTokens: { type: null, required: false },
48
+ error: { type: [Boolean, null], required: false, skipCheck: true },
49
+ errorMessage: { type: null, required: false },
50
+ noErrorIcon: { type: Boolean, required: false, skipCheck: true },
51
+ rules: { type: null, required: false },
52
+ reactiveRules: { type: Boolean, required: false, skipCheck: true },
53
+ lazyRules: { type: [Boolean, String], required: false, skipCheck: true },
54
+ label: { type: null, required: false },
55
+ stackLabel: { type: Boolean, required: false, skipCheck: true, default: void 0 },
56
+ hint: { type: null, required: false },
57
+ hideHint: { type: Boolean, required: false, skipCheck: true },
58
+ prefix: { type: null, required: false },
59
+ suffix: { type: null, required: false },
60
+ labelColor: { type: null, required: false },
61
+ bgColor: { type: null, required: false },
62
+ loading: { type: Boolean, required: false, skipCheck: true },
63
+ clearable: { type: Boolean, required: false, skipCheck: true },
64
+ clearIcon: { type: null, required: false },
65
+ filled: { type: Boolean, required: false, skipCheck: true, default: void 0 },
66
+ outlined: { type: Boolean, required: false, skipCheck: true, default: void 0 },
67
+ borderless: { type: Boolean, required: false, skipCheck: true },
68
+ standout: { type: [Boolean, String], required: false, skipCheck: true, default: void 0 },
69
+ labelSlot: { type: Boolean, required: false, skipCheck: true },
70
+ bottomSlots: { type: Boolean, required: false, skipCheck: true },
71
+ hideBottomSpace: { type: Boolean, required: false, skipCheck: true, default: true },
72
+ counter: { type: Boolean, required: false, skipCheck: true },
73
+ rounded: { type: Boolean, required: false, skipCheck: true, default: void 0 },
74
+ dense: { type: Boolean, required: false, skipCheck: true, default: void 0 },
75
+ itemAligned: { type: Boolean, required: false, skipCheck: true },
76
+ autofocus: { type: Boolean, required: false, skipCheck: true },
77
+ for: { type: null, required: false },
78
+ shadowText: { type: null, required: false },
79
+ type: { type: null, required: false },
80
+ debounce: { type: null, required: false },
81
+ maxlength: { type: null, required: false },
82
+ autogrow: { type: Boolean, required: false, skipCheck: true },
83
+ inputClass: { type: null, required: false },
84
+ inputStyle: { type: null, required: false },
85
+ onFocus: { type: Function, required: false },
86
+ onBlur: { type: Function, required: false },
87
+ onClear: { type: Function, required: false }
24
88
  });
25
89
  const light = useLight();
26
90
  const popup = ref(null);
91
+ watch(modelValue, (newVal) => {
92
+ popup.value.hide();
93
+ });
27
94
  const localValue = computed({
28
95
  get: () => {
29
- if (modelValue.value) {
30
- if (typeof modelValue.value == "object") {
31
- return modelValue.value.from + " - " + modelValue.value.to;
96
+ if (!modelValue.value) {
97
+ return modelValue.value;
98
+ }
99
+ if (typeof modelValue.value === "object") {
100
+ let s = modelValue.value.from;
101
+ if (modelValue.value.to) {
102
+ s += " to " + modelValue.value.to;
32
103
  }
104
+ return s;
33
105
  }
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];
@@ -48,67 +120,83 @@ const localValue = computed({
48
120
  return;
49
121
  }
50
122
  }
51
- }
52
- if (value.match(/^\d{4}-\d{2}-\d{2}$/)) {
53
- modelValue.value = value;
123
+ modelValue.value = null;
54
124
  return;
55
125
  }
56
- modelValue.value = null;
126
+ modelValue.value = val;
57
127
  }
58
128
  });
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;
129
+ const inputMask = computed(() => {
130
+ if (!props.range) {
131
+ return "####-##-##";
69
132
  }
133
+ return "";
70
134
  });
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";
135
+ const inputRules = computed(() => {
136
+ const rules = [];
137
+ if (!props.range) {
138
+ rules.push((val) => {
139
+ if (val) {
140
+ if (!val.match(/^\d{4}-\d{2}-\d{2}$/)) {
141
+ return "Invalid date format";
142
+ }
84
143
  }
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;
144
+ });
145
+ return rules;
146
+ }
147
+ return null;
148
+ });
149
+ const inputProps = computed(() => {
150
+ const { mask, locale, calendar, modelValue: modelValue2, defautYearMonth, defaultView, events, ...rest } = light.getInputProps(props);
151
+ return rest;
93
152
  });
94
- const date_attrs = computed(() => {
95
- const { label, rules: rules2, hideBottomSpace, filled, outlined, standout, rounded, dense, square, stackLabel, ...rest } = props;
153
+ const dateProps = computed(() => {
154
+ const {
155
+ filled,
156
+ outlined,
157
+ standout,
158
+ rounded,
159
+ dense,
160
+ square,
161
+ stackLabel,
162
+ color,
163
+ mask,
164
+ rules,
165
+ hint,
166
+ hideHint,
167
+ prefix,
168
+ suffix,
169
+ loading,
170
+ clearable,
171
+ clearIcon,
172
+ hideBottomSpace,
173
+ counter,
174
+ maxlength,
175
+ disable,
176
+ readonly,
177
+ autofocus,
178
+ inputClass,
179
+ inputStyle,
180
+ type,
181
+ debounce,
182
+ ...rest
183
+ } = props;
96
184
  return rest;
97
185
  });
98
186
  </script>
99
187
 
100
188
  <template>
101
- <q-input v-bind="input_attrs" v-model="localValue">
189
+ <q-input v-model="localValue" :mask="inputMask" :rules="inputRules" v-bind="inputProps">
102
190
  <template v-slot:prepend>
103
- <q-btn icon="sym_o_event" round dense flat>
191
+ <q-icon name="sym_o_event" class="cursor-pointer">
104
192
  <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">
193
+ <q-date :color="color ?? $light.color" mask="YYYY-MM-DD" v-model="modelValue" v-bind="dateProps">
106
194
  <div class="row items-center justify-end">
107
195
  <q-btn v-close-popup :label="$t('Close')" :color="color ?? $light.color" flat />
108
196
  </div>
109
197
  </q-date>
110
198
  </q-popup-proxy>
111
- </q-btn>
199
+ </q-icon>
112
200
  </template>
113
201
 
114
202
  <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, type QInputProps } from "quasar";
2
+ export type LDatePickerProps = Omit<QDateProps, "modelValue"> & Omit<QInputProps, "modelValue">;
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);
@@ -70,11 +70,11 @@ export interface LTableRequest {
70
70
  }) => void;
71
71
  }
72
72
  declare function requestServerInteraction(): void;
73
- declare var __VLS_91: any, __VLS_94: string, __VLS_95: any, __VLS_117: any, __VLS_204: string, __VLS_205: any;
73
+ declare var __VLS_91: any, __VLS_94: string, __VLS_95: any, __VLS_117: any, __VLS_203: string, __VLS_204: any;
74
74
  type __VLS_Slots = {} & {
75
75
  [K in NonNullable<typeof __VLS_94>]?: (props: typeof __VLS_95) => any;
76
76
  } & {
77
- [K in NonNullable<typeof __VLS_204>]?: (props: typeof __VLS_205) => any;
77
+ [K in NonNullable<typeof __VLS_203>]?: (props: typeof __VLS_204) => any;
78
78
  } & {
79
79
  actions?: (props: typeof __VLS_91) => any;
80
80
  } & {
@@ -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];
@@ -477,6 +479,9 @@ const simpleRouteName = computed(() => {
477
479
  return "";
478
480
  });
479
481
  const visibleColumns = props.name ? useStorage("l-table-visible-columns-" + simpleRouteName.value + "-" + props.name, hidableColumns.value.map((c) => c.name)) : ref(hidableColumns.value.map((c) => c.name));
482
+ watch(filters, () => {
483
+ onFilters();
484
+ }, { deep: true });
480
485
  </script>
481
486
 
482
487
  <template>
@@ -624,7 +629,7 @@ const visibleColumns = props.name ? useStorage("l-table-visible-columns-" + simp
624
629
 
625
630
  <template v-if="col.searchType == 'date'">
626
631
  <l-date-picker dense clearable filled square :outlined="false" hide-bottom-space
627
- v-model="filters[col.name]" @update:model-value="onFilters" range @clear="onFilters"
632
+ v-model="filters[col.name]" range @clear="onFilters"
628
633
  :style="col.searchStyle" />
629
634
  </template>
630
635
 
@@ -70,11 +70,11 @@ export interface LTableRequest {
70
70
  }) => void;
71
71
  }
72
72
  declare function requestServerInteraction(): void;
73
- declare var __VLS_91: any, __VLS_94: string, __VLS_95: any, __VLS_117: any, __VLS_204: string, __VLS_205: any;
73
+ declare var __VLS_91: any, __VLS_94: string, __VLS_95: any, __VLS_117: any, __VLS_203: string, __VLS_204: any;
74
74
  type __VLS_Slots = {} & {
75
75
  [K in NonNullable<typeof __VLS_94>]?: (props: typeof __VLS_95) => any;
76
76
  } & {
77
- [K in NonNullable<typeof __VLS_204>]?: (props: typeof __VLS_205) => any;
77
+ [K in NonNullable<typeof __VLS_203>]?: (props: typeof __VLS_204) => any;
78
78
  } & {
79
79
  actions?: (props: typeof __VLS_91) => any;
80
80
  } & {
@@ -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.7",
3
+ "version": "1.48.9",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": {
6
6
  "type": "git",