sprintify-ui 0.0.160 → 0.0.162

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.
@@ -10166,7 +10166,7 @@ const Sm = { class: "base-date-picker relative" }, Em = { class: "pointer-events
10166
10166
  return Kt.fromJSDate(n);
10167
10167
  }
10168
10168
  function u(n) {
10169
- return n.includes("Z") && n.includes("T") ? Kt.fromISO(n) : Kt.fromSQL(n, { zone: "utc" });
10169
+ return n.includes("Z") && n.includes("T") ? Kt.fromISO(n, { zone: "utc" }) : Kt.fromSQL(n, { zone: "utc" });
10170
10170
  }
10171
10171
  function h(n) {
10172
10172
  return e.enableTime ? n.toFormat("yyyy-MM-dd HH:mm:ss") : n.toFormat("yyyy-MM-dd");
@@ -24244,7 +24244,9 @@ const Ey = ["value", "name", "disabled", "required"], Oy = ["value"], Ay = /* @_
24244
24244
  return [...((m = a.value) == null ? void 0 : m.options) ?? []];
24245
24245
  }
24246
24246
  function w() {
24247
- return e.modelValue === o ? !0 : e.options && e.options.length ? e.options.some((m) => Ci(m.value, e.modelValue)) : f.value.some((m) => Ci(m.value, e.modelValue));
24247
+ return e.modelValue === o ? !0 : e.options && e.options.length ? e.options.some(
24248
+ (m) => Ci(m[e.valueKey], e.modelValue)
24249
+ ) : f.value.some((m) => Ci(m.value, e.modelValue));
24248
24250
  }
24249
24251
  function b(m) {
24250
24252
  m === null && h(o);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.0.160",
3
+ "version": "0.0.162",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -121,7 +121,7 @@ export const DateTimeConversion = (args) => {
121
121
  };
122
122
  };
123
123
  DateTimeConversion.args = {
124
- modelValue: '2023-01-05T10:00:00Z',
124
+ modelValue: '2023-01-05T00:00:00Z',
125
125
  };
126
126
 
127
127
  export const Field = createFieldStory({
@@ -115,7 +115,7 @@ function dateJsToLuxon(date: Date): DateTime {
115
115
 
116
116
  function stringToLuxon(date: string): DateTime {
117
117
  if (date.includes('Z') && date.includes('T')) {
118
- return DateTime.fromISO(date);
118
+ return DateTime.fromISO(date, { zone: 'utc' });
119
119
  }
120
120
 
121
121
  return DateTime.fromSQL(date, { zone: 'utc' });
@@ -103,7 +103,7 @@ export const OptionsAsProps = (args) => ({
103
103
  OptionsAsProps.args = {
104
104
  required: true,
105
105
  labelKey: 'label',
106
- valueKey: 'value',
106
+ valueKey: 'label',
107
107
  };
108
108
 
109
109
  export const Field = createFieldStory({
@@ -159,7 +159,9 @@ function checkIfModelValueIsValid(): boolean {
159
159
  }
160
160
 
161
161
  if (props.options && props.options.length) {
162
- return props.options.some((o) => isEqual(o.value, props.modelValue));
162
+ return props.options.some((o) =>
163
+ isEqual(o[props.valueKey as any], props.modelValue)
164
+ );
163
165
  }
164
166
 
165
167
  return options.value.some((o) => isEqual(o.value, props.modelValue));