@opendesign-plus-test/components 0.0.1-rc.89 → 0.0.1-rc.91
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/components/header-search/OHeaderSearch.vue.d.ts +6 -6
- package/dist/components/header-search/index.d.ts +3 -3
- package/dist/components/header-user/OHeaderUser.vue.d.ts +1 -1
- package/dist/components/header-user/index.d.ts +3 -3
- package/dist/components/search/OSearchInput.vue.d.ts +6 -6
- package/dist/components/search/index.d.ts +3 -3
- package/dist/components/search/internal/SearchImageInput.vue.d.ts +1 -1
- package/dist/components.cjs.js +33 -33
- package/dist/components.es.js +4262 -4255
- package/dist/treeshaking/components/meeting/OMeetingCalendar.vue.mjs +20 -2
- package/package.json +1 -1
|
@@ -107,20 +107,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
107
107
|
eventsData.value = [];
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
|
+
const datesLoadedStatus = ref([false, false, false]);
|
|
111
|
+
const allDatesLoaded = computed(() => datesLoadedStatus.value.every((v) => !!v));
|
|
110
112
|
const getDateList = async (date) => {
|
|
111
113
|
if (props.getDateListRequest) {
|
|
112
114
|
props.getDateListRequest(date, group.value || "").then((res) => {
|
|
113
115
|
dateList.value = res;
|
|
116
|
+
}).finally(() => {
|
|
117
|
+
datesLoadedStatus.value[0] = true;
|
|
114
118
|
});
|
|
115
119
|
}
|
|
116
120
|
if (props.getEventsDatesRequest) {
|
|
117
121
|
props.getEventsDatesRequest(date).then((res) => {
|
|
118
122
|
eventsDates.value = res;
|
|
123
|
+
}).finally(() => {
|
|
124
|
+
datesLoadedStatus.value[1] = true;
|
|
119
125
|
});
|
|
120
126
|
}
|
|
121
127
|
if (props.getSummitDatesRequest) {
|
|
122
128
|
props.getSummitDatesRequest(date).then((res) => {
|
|
123
129
|
summitDates.value = res;
|
|
130
|
+
}).finally(() => {
|
|
131
|
+
datesLoadedStatus.value[2] = true;
|
|
124
132
|
});
|
|
125
133
|
}
|
|
126
134
|
};
|
|
@@ -173,6 +181,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
173
181
|
});
|
|
174
182
|
};
|
|
175
183
|
const allDates = computed(() => {
|
|
184
|
+
if (!allDatesLoaded.value) {
|
|
185
|
+
return [];
|
|
186
|
+
}
|
|
187
|
+
console.log("dateList", dateList.value);
|
|
188
|
+
console.log("summitDates", dateList.value);
|
|
189
|
+
console.log("eventsDates", dateList.value);
|
|
176
190
|
return [.../* @__PURE__ */ new Set([...dateList.value, ...summitDates.value, ...eventsDates.value])].flat().sort((a, b) => dayjs(a).isAfter(dayjs(b)) ? 1 : -1);
|
|
177
191
|
});
|
|
178
192
|
const latestDayLoaded = ref("");
|
|
@@ -180,14 +194,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
180
194
|
if (latestDayLoaded.value) {
|
|
181
195
|
return latestDayLoaded.value;
|
|
182
196
|
}
|
|
197
|
+
console.log(allDates.value);
|
|
183
198
|
const dates = allDates.value;
|
|
184
199
|
if (!dates.length) return null;
|
|
185
200
|
const today = dayjs().format("YYYY-MM-DD");
|
|
186
201
|
let lo = 0, hi = dates.length - 1;
|
|
187
202
|
while (lo <= hi) {
|
|
188
203
|
const mid = lo + hi >> 1;
|
|
189
|
-
if (dates[mid] < today)
|
|
190
|
-
|
|
204
|
+
if (dates[mid] < today) {
|
|
205
|
+
lo = mid + 1;
|
|
206
|
+
} else {
|
|
207
|
+
hi = mid - 1;
|
|
208
|
+
}
|
|
191
209
|
}
|
|
192
210
|
return formatDate(lo < dates.length ? dates[lo] : dates[dates.length - 1]);
|
|
193
211
|
});
|