vueless 0.0.68 → 0.0.70
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/package.json +1 -1
- package/ui.button-link/configs/default.config.js +4 -2
- package/ui.button-link/index.vue +4 -4
- package/ui.form-date-picker-range/composables/attrs.composable.js +2 -0
- package/ui.form-date-picker-range/configs/default.config.js +2 -0
- package/ui.form-date-picker-range/constants/index.js +0 -1
- package/ui.form-date-picker-range/index.vue +17 -13
- package/web-types.json +18 -9
package/package.json
CHANGED
|
@@ -65,8 +65,10 @@ export default /*tw*/ {
|
|
|
65
65
|
color: "brand",
|
|
66
66
|
type: "link",
|
|
67
67
|
size: "md",
|
|
68
|
-
activeClass: "
|
|
69
|
-
exactActiveClass: "
|
|
68
|
+
activeClass: "",
|
|
69
|
+
exactActiveClass: "",
|
|
70
|
+
wrapperActiveClass: "",
|
|
71
|
+
wrapperExactActiveClass: "",
|
|
70
72
|
underlined: undefined,
|
|
71
73
|
block: false,
|
|
72
74
|
noRing: false,
|
package/ui.button-link/index.vue
CHANGED
|
@@ -126,7 +126,7 @@ const props = defineProps({
|
|
|
126
126
|
* Apply classes to the link when its route is active or when it matches any parent route.
|
|
127
127
|
*/
|
|
128
128
|
activeClass: {
|
|
129
|
-
type:
|
|
129
|
+
type: String,
|
|
130
130
|
default: UIService.get(defaultConfig, ULink).default.activeClass,
|
|
131
131
|
},
|
|
132
132
|
|
|
@@ -134,7 +134,7 @@ const props = defineProps({
|
|
|
134
134
|
* Apply classes to the link when its route is active.
|
|
135
135
|
*/
|
|
136
136
|
exactActiveClass: {
|
|
137
|
-
type:
|
|
137
|
+
type: String,
|
|
138
138
|
default: UIService.get(defaultConfig, ULink).default.exactActiveClass,
|
|
139
139
|
},
|
|
140
140
|
|
|
@@ -142,7 +142,7 @@ const props = defineProps({
|
|
|
142
142
|
* Apply classes to the wrapper div when link route is active or when it matches any parent route.
|
|
143
143
|
*/
|
|
144
144
|
wrapperActiveClass: {
|
|
145
|
-
type:
|
|
145
|
+
type: String,
|
|
146
146
|
default: UIService.get(defaultConfig, ULink).default.wrapperActiveClass,
|
|
147
147
|
},
|
|
148
148
|
|
|
@@ -150,7 +150,7 @@ const props = defineProps({
|
|
|
150
150
|
* Apply classes to the wrapper div when link route is active.
|
|
151
151
|
*/
|
|
152
152
|
wrapperExactActiveClass: {
|
|
153
|
-
type:
|
|
153
|
+
type: String,
|
|
154
154
|
default: UIService.get(defaultConfig, ULink).default.wrapperExactActiveClass,
|
|
155
155
|
},
|
|
156
156
|
|
|
@@ -61,6 +61,7 @@ export default function useAttrs(props, { isShownMenu }) {
|
|
|
61
61
|
const rangeSwitchWrapperAttrs = getAttrs("rangeSwitchWrapper");
|
|
62
62
|
const nextIconAttrs = getAttrs("nextIcon");
|
|
63
63
|
const prevIconAttrs = getAttrs("prevIcon");
|
|
64
|
+
const periodButtonIconAttrs = getAttrs("periodButtonIcon");
|
|
64
65
|
const rangeSwitchTitleAttrs = getAttrs("rangeSwitchTitle");
|
|
65
66
|
|
|
66
67
|
const periodButtonAttrs = (classes = []) => {
|
|
@@ -95,6 +96,7 @@ export default function useAttrs(props, { isShownMenu }) {
|
|
|
95
96
|
menuAttrs,
|
|
96
97
|
periodsRowAttrs,
|
|
97
98
|
periodButtonAttrs,
|
|
99
|
+
periodButtonIconAttrs,
|
|
98
100
|
rangeSwitchWrapperAttrs,
|
|
99
101
|
nextIconAttrs,
|
|
100
102
|
prevIconAttrs,
|
|
@@ -33,6 +33,7 @@ export default /*tw*/ {
|
|
|
33
33
|
px-1.5 py-2.5 text-center text-xs font-medium text-brand-900 hover:bg-brand-200
|
|
34
34
|
[&_span]:block [&_span]:font-normal [&_span]:text-brand-500
|
|
35
35
|
`,
|
|
36
|
+
periodButtonIcon: "",
|
|
36
37
|
periodButtonActive: "bg-zinc-200",
|
|
37
38
|
rangeSwitchWrapper: "mb-2.5 mt-4 flex items-center justify-between py-2",
|
|
38
39
|
rangeSwitchTitle: "font-medium text-sm",
|
|
@@ -192,6 +193,7 @@ export default /*tw*/ {
|
|
|
192
193
|
},
|
|
193
194
|
timepicker: false,
|
|
194
195
|
disabled: false,
|
|
196
|
+
dateFormat: "d.m.Y",
|
|
195
197
|
maxDate: undefined,
|
|
196
198
|
minDate: undefined,
|
|
197
199
|
},
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
v-bind="periodButtonAttrs(getPeriodButtonsClasses(PERIOD.ownRange))"
|
|
92
92
|
@click="onClickOwnRange"
|
|
93
93
|
>
|
|
94
|
-
<UIcon name="apps" size="xs" />
|
|
94
|
+
<UIcon name="apps" size="xs" v-bind="periodButtonIconAttrs" />
|
|
95
95
|
|
|
96
96
|
{{ locale.ownRange }}
|
|
97
97
|
</div>
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
:min-date="minDate"
|
|
169
169
|
:max-date="maxDate"
|
|
170
170
|
v-bind="calendarAttrs"
|
|
171
|
-
:date-format="
|
|
171
|
+
:date-format="dateFormat"
|
|
172
172
|
range
|
|
173
173
|
@mouseenter="onMouseoverCalendar"
|
|
174
174
|
/>
|
|
@@ -234,7 +234,6 @@ import {
|
|
|
234
234
|
DATE_PICKER_BUTTON_TYPE,
|
|
235
235
|
DATE_PICKER_INPUT_TYPE,
|
|
236
236
|
PERIOD,
|
|
237
|
-
RANGE_INPUT_FORMAT,
|
|
238
237
|
INPUT_RANGE_TYPE,
|
|
239
238
|
} from "./constants";
|
|
240
239
|
|
|
@@ -335,6 +334,14 @@ const props = defineProps({
|
|
|
335
334
|
default: UIService.get(defaultConfig, UDatePickerRange).default.disabled,
|
|
336
335
|
},
|
|
337
336
|
|
|
337
|
+
/**
|
|
338
|
+
* Date format.
|
|
339
|
+
*/
|
|
340
|
+
dateFormat: {
|
|
341
|
+
type: String,
|
|
342
|
+
default: UIService.get(defaultConfig, UDatePickerRange).default.dateFormat,
|
|
343
|
+
},
|
|
344
|
+
|
|
338
345
|
/**
|
|
339
346
|
* Unique element id.
|
|
340
347
|
* @ignore
|
|
@@ -372,6 +379,7 @@ const {
|
|
|
372
379
|
menuAttrs,
|
|
373
380
|
periodsRowAttrs,
|
|
374
381
|
periodButtonAttrs,
|
|
382
|
+
periodButtonIconAttrs,
|
|
375
383
|
rangeSwitchWrapperAttrs,
|
|
376
384
|
nextIconAttrs,
|
|
377
385
|
prevIconAttrs,
|
|
@@ -605,15 +613,11 @@ watch(
|
|
|
605
613
|
}
|
|
606
614
|
|
|
607
615
|
rangeStart.value = props.modelValue.from
|
|
608
|
-
? formatDate(
|
|
609
|
-
getDateFromUnixTimestamp(props.modelValue.from),
|
|
610
|
-
RANGE_INPUT_FORMAT,
|
|
611
|
-
locale.value,
|
|
612
|
-
)
|
|
616
|
+
? formatDate(getDateFromUnixTimestamp(props.modelValue.from), props.dateFormat, locale.value)
|
|
613
617
|
: "";
|
|
614
618
|
|
|
615
619
|
rangeEnd.value = props.modelValue.to
|
|
616
|
-
? formatDate(getDateFromUnixTimestamp(props.modelValue.to),
|
|
620
|
+
? formatDate(getDateFromUnixTimestamp(props.modelValue.to), props.dateFormat, locale.value)
|
|
617
621
|
: "";
|
|
618
622
|
|
|
619
623
|
inputRangeStartError.value = "";
|
|
@@ -704,13 +708,13 @@ function isDatePeriodOutOfRange(datePeriod) {
|
|
|
704
708
|
props.minDate,
|
|
705
709
|
props.maxDate,
|
|
706
710
|
locale.value,
|
|
707
|
-
|
|
711
|
+
props.dateFormat,
|
|
708
712
|
) ||
|
|
709
713
|
dateIsOutOfRange(
|
|
710
714
|
getDateFromUnixTimestamp(datePeriod.endRange),
|
|
711
715
|
props.minDate,
|
|
712
716
|
props.maxDate,
|
|
713
|
-
|
|
717
|
+
props.dateFormat,
|
|
714
718
|
)
|
|
715
719
|
);
|
|
716
720
|
}
|
|
@@ -814,14 +818,14 @@ function onInputRangeInput(value, type) {
|
|
|
814
818
|
inputRangeEndError.value = error;
|
|
815
819
|
}
|
|
816
820
|
|
|
817
|
-
const parsedValue = gmtToUTC(parseDate(value || new Date(),
|
|
821
|
+
const parsedValue = gmtToUTC(parseDate(value || new Date(), props.dateFormat, locale.value));
|
|
818
822
|
const unixTimeValue = getUnixTimestampFromDate(parsedValue);
|
|
819
823
|
const isOutOfRange = dateIsOutOfRange(
|
|
820
824
|
parsedValue,
|
|
821
825
|
props.minDate,
|
|
822
826
|
props.maxDate,
|
|
823
827
|
locale.value,
|
|
824
|
-
|
|
828
|
+
props.dateFormat,
|
|
825
829
|
);
|
|
826
830
|
const isToLessThanFrom = unixTimeValue <= localValue.value.from;
|
|
827
831
|
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.70",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -1741,6 +1741,15 @@
|
|
|
1741
1741
|
},
|
|
1742
1742
|
"default": "false"
|
|
1743
1743
|
},
|
|
1744
|
+
{
|
|
1745
|
+
"name": "dateFormat",
|
|
1746
|
+
"description": "Date format.",
|
|
1747
|
+
"value": {
|
|
1748
|
+
"kind": "expression",
|
|
1749
|
+
"type": "string"
|
|
1750
|
+
},
|
|
1751
|
+
"default": "d.m.Y"
|
|
1752
|
+
},
|
|
1744
1753
|
{
|
|
1745
1754
|
"name": "id",
|
|
1746
1755
|
"description": "@ignore: Unique element id.",
|
|
@@ -4289,36 +4298,36 @@
|
|
|
4289
4298
|
"description": "Apply classes to the link when its route is active or when it matches any parent route.",
|
|
4290
4299
|
"value": {
|
|
4291
4300
|
"kind": "expression",
|
|
4292
|
-
"type": "
|
|
4301
|
+
"type": "string"
|
|
4293
4302
|
},
|
|
4294
|
-
"default": "
|
|
4303
|
+
"default": ""
|
|
4295
4304
|
},
|
|
4296
4305
|
{
|
|
4297
4306
|
"name": "exactActiveClass",
|
|
4298
4307
|
"description": "Apply classes to the link when its route is active.",
|
|
4299
4308
|
"value": {
|
|
4300
4309
|
"kind": "expression",
|
|
4301
|
-
"type": "
|
|
4310
|
+
"type": "string"
|
|
4302
4311
|
},
|
|
4303
|
-
"default": "
|
|
4312
|
+
"default": ""
|
|
4304
4313
|
},
|
|
4305
4314
|
{
|
|
4306
4315
|
"name": "wrapperActiveClass",
|
|
4307
4316
|
"description": "Apply classes to the wrapper div when link route is active or when it matches any parent route.",
|
|
4308
4317
|
"value": {
|
|
4309
4318
|
"kind": "expression",
|
|
4310
|
-
"type": "
|
|
4319
|
+
"type": "string"
|
|
4311
4320
|
},
|
|
4312
|
-
"default": "
|
|
4321
|
+
"default": ""
|
|
4313
4322
|
},
|
|
4314
4323
|
{
|
|
4315
4324
|
"name": "wrapperExactActiveClass",
|
|
4316
4325
|
"description": "Apply classes to the wrapper div when link route is active.",
|
|
4317
4326
|
"value": {
|
|
4318
4327
|
"kind": "expression",
|
|
4319
|
-
"type": "
|
|
4328
|
+
"type": "string"
|
|
4320
4329
|
},
|
|
4321
|
-
"default": "
|
|
4330
|
+
"default": ""
|
|
4322
4331
|
},
|
|
4323
4332
|
{
|
|
4324
4333
|
"name": "underlined",
|