@uzum-tech/ui 2.1.2 → 2.1.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.
- package/dist/index.js +9 -5
- package/dist/index.mjs +9 -5
- package/dist/index.prod.js +1 -1
- package/dist/index.prod.mjs +1 -1
- package/es/date-picker/src/DatePicker.mjs +8 -4
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/date-picker/src/DatePicker.js +14 -4
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -220,6 +220,7 @@ export default defineComponent({
|
|
|
220
220
|
} = props;
|
|
221
221
|
switch (type) {
|
|
222
222
|
case 'date':
|
|
223
|
+
case 'daterange':
|
|
223
224
|
return localeRef.value.datePlaceholder;
|
|
224
225
|
case 'datetime':
|
|
225
226
|
return localeRef.value.datetimePlaceholder;
|
|
@@ -1015,12 +1016,14 @@ export default defineComponent({
|
|
|
1015
1016
|
value: this.displayTime || this.localizedPlacehoder
|
|
1016
1017
|
});
|
|
1017
1018
|
}
|
|
1019
|
+
const hasDisplayTime = this.isRange ? this.displayStartTime && this.displayEndTime : this.displayTime;
|
|
1020
|
+
const displayValue = this.isRange ? `${this.displayStartTime} - ${this.displayEndTime}` : this.displayTime;
|
|
1018
1021
|
if (this.triggerPreset === 'select') {
|
|
1019
1022
|
return h(UInternalSelection, {
|
|
1020
1023
|
ref: "inputInstRef",
|
|
1021
|
-
selectedOption:
|
|
1022
|
-
label:
|
|
1023
|
-
value:
|
|
1024
|
+
selectedOption: hasDisplayTime ? {
|
|
1025
|
+
label: displayValue,
|
|
1026
|
+
value: displayValue
|
|
1024
1027
|
} : null,
|
|
1025
1028
|
round: this.round,
|
|
1026
1029
|
status: this.mergedStatus,
|
|
@@ -1045,6 +1048,7 @@ export default defineComponent({
|
|
|
1045
1048
|
});
|
|
1046
1049
|
}
|
|
1047
1050
|
if (this.triggerPreset === 'button') {
|
|
1051
|
+
const buttonText = hasDisplayTime ? displayValue : this.localizedPlacehoder;
|
|
1048
1052
|
return h(UButton, {
|
|
1049
1053
|
round: this.round,
|
|
1050
1054
|
size: this.mergedSize,
|
|
@@ -1052,7 +1056,7 @@ export default defineComponent({
|
|
|
1052
1056
|
themeOverrides: this.mergedTheme.peerOverrides.Button,
|
|
1053
1057
|
onClick: this.handleTriggerClick
|
|
1054
1058
|
}, {
|
|
1055
|
-
default: () =>
|
|
1059
|
+
default: () => buttonText
|
|
1056
1060
|
});
|
|
1057
1061
|
}
|
|
1058
1062
|
return this.isRange ? h(UInput, Object.assign({
|
package/es/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.1.
|
|
1
|
+
declare const _default: "2.1.3";
|
|
2
2
|
export default _default;
|
package/es/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '2.1.
|
|
1
|
+
export default '2.1.3';
|
|
@@ -162,6 +162,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
162
162
|
const { type } = props;
|
|
163
163
|
switch (type) {
|
|
164
164
|
case 'date':
|
|
165
|
+
case 'daterange':
|
|
165
166
|
return localeRef.value.datePlaceholder;
|
|
166
167
|
case 'datetime':
|
|
167
168
|
return localeRef.value.datetimePlaceholder;
|
|
@@ -795,19 +796,28 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
795
796
|
value: this.displayTime || this.localizedPlacehoder
|
|
796
797
|
});
|
|
797
798
|
}
|
|
799
|
+
const hasDisplayTime = this.isRange
|
|
800
|
+
? this.displayStartTime && this.displayEndTime
|
|
801
|
+
: this.displayTime;
|
|
802
|
+
const displayValue = this.isRange
|
|
803
|
+
? `${this.displayStartTime} - ${this.displayEndTime}`
|
|
804
|
+
: this.displayTime;
|
|
798
805
|
if (this.triggerPreset === 'select') {
|
|
799
|
-
return ((0, vue_1.h)(_internal_1.UInternalSelection, { ref: "inputInstRef", selectedOption:
|
|
806
|
+
return ((0, vue_1.h)(_internal_1.UInternalSelection, { ref: "inputInstRef", selectedOption: hasDisplayTime
|
|
800
807
|
? {
|
|
801
|
-
label:
|
|
802
|
-
value:
|
|
808
|
+
label: displayValue,
|
|
809
|
+
value: displayValue
|
|
803
810
|
}
|
|
804
811
|
: null, round: this.round, status: this.mergedStatus, clsPrefix: mergedClsPrefix, bordered: this.mergedBordered, size: this.mergedSize, theme: this.mergedTheme.peers.Select, themeOverrides: this.mergedTheme.peerOverrides.Select, placeholder: this.localizedPlacehoder, active: this.mergedShow, clearable: this.clearable, disabled: this.mergedDisabled, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur, onClick: this.handleTriggerClick, onClear: this.handleClear }, {
|
|
805
812
|
arrow: () => { var _a, _b; return (_b = (_a = this.$slots).arrow) === null || _b === void 0 ? void 0 : _b.call(_a); }
|
|
806
813
|
}));
|
|
807
814
|
}
|
|
808
815
|
if (this.triggerPreset === 'button') {
|
|
816
|
+
const buttonText = hasDisplayTime
|
|
817
|
+
? displayValue
|
|
818
|
+
: this.localizedPlacehoder;
|
|
809
819
|
return ((0, vue_1.h)(button_1.UButton, { round: this.round, size: this.mergedSize, theme: this.mergedTheme.peers.Button, themeOverrides: this.mergedTheme.peerOverrides.Button, onClick: this.handleTriggerClick }, {
|
|
810
|
-
default: () =>
|
|
820
|
+
default: () => buttonText
|
|
811
821
|
}));
|
|
812
822
|
}
|
|
813
823
|
return this.isRange ? ((0, vue_1.h)(input_1.UInput, Object.assign({ ref: "inputInstRef", round: this.round, status: this.mergedStatus, value: [this.displayStartTime, this.displayEndTime], placeholder: [
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.1.
|
|
1
|
+
declare const _default: "2.1.3";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
package/web-types.json
CHANGED