@opendesign-plus-test/components 0.0.1-rc.42 → 0.0.1-rc.45

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.
Files changed (109) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -1
  2. package/dist/chunk-OElCookieNotice.es.js +132 -112
  3. package/dist/components/OHeaderSearch.vue.d.ts +824 -506
  4. package/dist/components/OSourceCode.vue.d.ts +4 -6
  5. package/dist/components/activity/OActivityApproval.vue.d.ts +6 -10
  6. package/dist/components/activity/OActivityForm.vue.d.ts +3 -5
  7. package/dist/components/activity/OMyActivityCalendar.vue.d.ts +100 -46
  8. package/dist/components/activity/index.d.ts +56 -33
  9. package/dist/components/activity/types.d.ts +8 -1
  10. package/dist/components/events/config.d.ts +5 -18
  11. package/dist/components/events/types.d.ts +4 -1
  12. package/dist/components/header/OHeaderMobile.vue.d.ts +18 -11
  13. package/dist/components/header/components/HeaderNavMobile.vue.d.ts +4 -1
  14. package/dist/components/header/index.d.ts +12 -5
  15. package/dist/components/header/types.d.ts +4 -0
  16. package/dist/components/meeting/OMeetingCalendar.vue.d.ts +8 -12
  17. package/dist/components/meeting/OMeetingForm.vue.d.ts +3 -5
  18. package/dist/components/meeting/OMeetingPlayback.vue.d.ts +45 -0
  19. package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +100 -46
  20. package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +1 -1
  21. package/dist/components/meeting/index.d.ts +817 -0
  22. package/dist/components/meeting/types.d.ts +82 -17
  23. package/dist/components/meeting/utils.d.ts +1 -1
  24. package/dist/components/search/OSearchInput.vue.d.ts +1003 -0
  25. package/dist/components/search/composables/useImageSearch.d.ts +48 -0
  26. package/dist/components/search/composables/useKeywordHighlight.d.ts +2 -0
  27. package/dist/components/search/composables/useSearchHistory.d.ts +14 -0
  28. package/dist/components/search/index.d.ts +590 -0
  29. package/dist/components/search/internal/HighlightText.vue.d.ts +9 -0
  30. package/dist/components/search/internal/SearchImageInput.vue.d.ts +716 -0
  31. package/dist/components/search/internal/SearchPanel.vue.d.ts +100 -0
  32. package/dist/components/search/types.d.ts +20 -0
  33. package/dist/components.cjs.js +43 -43
  34. package/dist/components.css +1 -1
  35. package/dist/components.es.js +11681 -10636
  36. package/dist/index.d.ts +1 -0
  37. package/package.json +3 -3
  38. package/src/assets/svg-icons/icon-delete-hover.svg +4 -0
  39. package/src/assets/svg-icons/icon-delete.svg +5 -1
  40. package/src/assets/svg-icons/icon-image-close.svg +4 -0
  41. package/src/assets/svg-icons/icon-image-upload.svg +3 -0
  42. package/src/assets/svg-icons/icon-image-zoomin.svg +3 -0
  43. package/src/assets/svg-icons/icon-refresh.svg +3 -0
  44. package/src/components/OBanner.vue +18 -18
  45. package/src/components/OCookieNotice.vue +21 -21
  46. package/src/components/OFooter.vue +18 -17
  47. package/src/components/OHeaderSearch.vue +402 -420
  48. package/src/components/OHeaderUser.vue +3 -2
  49. package/src/components/OSection.vue +4 -4
  50. package/src/components/OSourceCode.vue +8 -10
  51. package/src/components/activity/OActivityApproval.vue +32 -32
  52. package/src/components/activity/OActivityForm.vue +5 -5
  53. package/src/components/activity/OMyActivityCalendar.vue +66 -50
  54. package/src/components/activity/config.ts +1 -1
  55. package/src/components/activity/types.ts +8 -1
  56. package/src/components/common/ContentWrapper.vue +3 -3
  57. package/src/components/common/MoreText.vue +1 -1
  58. package/src/components/common/ThFilter.vue +7 -7
  59. package/src/components/element-plus/OElCookieNotice.vue +27 -27
  60. package/src/components/events/OEventsApply.vue +44 -44
  61. package/src/components/events/OEventsCalendar.vue +14 -14
  62. package/src/components/events/OEventsList.vue +53 -26
  63. package/src/components/events/config.ts +1 -1
  64. package/src/components/events/types.ts +4 -1
  65. package/src/components/header/OHeader.vue +2 -2
  66. package/src/components/header/OHeaderMobile.vue +8 -1
  67. package/src/components/header/components/HeaderContent.vue +67 -63
  68. package/src/components/header/components/HeaderNav.vue +4 -4
  69. package/src/components/header/components/HeaderNavMobile.vue +8 -5
  70. package/src/components/header/types.ts +4 -0
  71. package/src/components/meeting/OMeetingCalendar.vue +66 -54
  72. package/src/components/meeting/OMeetingForm.vue +70 -51
  73. package/src/components/meeting/OMeetingPlayback.vue +8 -8
  74. package/src/components/meeting/OMyMeetingCalendar.vue +56 -45
  75. package/src/components/meeting/OSigMeetingCalendar.vue +31 -28
  76. package/src/components/meeting/components/OMeetingCalendarList.vue +31 -26
  77. package/src/components/meeting/components/OMeetingCalendarSelector.vue +10 -6
  78. package/src/components/meeting/components/OMeetingDetail.vue +32 -18
  79. package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +1 -1
  80. package/src/components/meeting/components/OMeetingPlaybackVideo.vue +12 -12
  81. package/src/components/meeting/components/OSigMeetingAside.vue +8 -9
  82. package/src/components/meeting/types.ts +88 -17
  83. package/src/components/search/OSearchInput.vue +463 -0
  84. package/src/components/search/composables/useImageSearch.ts +157 -0
  85. package/src/components/search/composables/useKeywordHighlight.ts +30 -0
  86. package/src/components/search/composables/useSearchHistory.ts +75 -0
  87. package/src/components/search/index.ts +23 -0
  88. package/src/components/search/internal/HighlightText.vue +37 -0
  89. package/src/components/search/internal/SearchImageInput.vue +488 -0
  90. package/src/components/search/internal/SearchPanel.vue +430 -0
  91. package/src/components/search/types.ts +25 -0
  92. package/src/draft/Banner.vue +6 -6
  93. package/src/draft/ButtonCards.vue +1 -1
  94. package/src/draft/Feature.vue +6 -6
  95. package/src/draft/Footer.vue +29 -22
  96. package/src/draft/HorizontalAnchor.vue +4 -4
  97. package/src/draft/ItemSwiper.vue +2 -2
  98. package/src/draft/Logo.vue +3 -3
  99. package/src/draft/LogoCard.vue +2 -2
  100. package/src/draft/MultiCard.vue +1 -1
  101. package/src/draft/MultiIconCard.vue +1 -1
  102. package/src/draft/OInfoCard.vue +4 -4
  103. package/src/draft/Section.vue +4 -4
  104. package/src/draft/SingleTabCard.vue +1 -1
  105. package/src/draft/SliderCard.vue +4 -3
  106. package/src/i18n/en.ts +10 -0
  107. package/src/i18n/zh.ts +10 -0
  108. package/src/index.ts +1 -0
  109. package/vite.config.ts +4 -3
@@ -169,7 +169,7 @@ const jumpToPage = (val: any) => {
169
169
  @include text-truncate(1);
170
170
  }
171
171
 
172
- @include respond-to('<=pad_v') {
172
+ @include respond('<=pad_v') {
173
173
  .header-user {
174
174
  min-width: auto;
175
175
 
@@ -207,7 +207,8 @@ const jumpToPage = (val: any) => {
207
207
  color: var(--o-color-primary1);
208
208
  }
209
209
  }
210
- @include respond-to('<=pad_v') {
210
+
211
+ @include respond('<=pad_v') {
211
212
  .user-dropdown {
212
213
  .o-divider {
213
214
  display: none;
@@ -121,11 +121,11 @@ const props = withDefaults(defineProps<SectionPropsT>(), {
121
121
  color: var(--o-color-info2);
122
122
  @include text1;
123
123
 
124
- @include respond-to('pad-laptop') {
124
+ @include respond('pad-laptop') {
125
125
  margin-top: 8px;
126
126
  }
127
127
 
128
- @include respond-to('phone') {
128
+ @include respond('phone') {
129
129
  margin-top: 12px;
130
130
  text-align: center;
131
131
  }
@@ -155,11 +155,11 @@ const props = withDefaults(defineProps<SectionPropsT>(), {
155
155
  border-radius: var(--btn-height);
156
156
  }
157
157
 
158
- @include respond-to('<=laptop') {
158
+ @include respond('<=laptop') {
159
159
  margin-top: 16px;
160
160
  }
161
161
 
162
- @include respond-to('phone') {
162
+ @include respond('phone') {
163
163
  margin-top: 12px;
164
164
  }
165
165
 
@@ -6,28 +6,26 @@ import IconChevronDown from '~icons/components/icon-chevron-down.svg';
6
6
 
7
7
  interface CodeItemT {
8
8
  label: string;
9
- url: string;
9
+ href: string;
10
10
  icon?: string;
11
+ target?: string;
11
12
  }
12
13
 
13
14
  interface CodePropsT {
14
15
  title?: string;
15
16
  options?: CodeItemT[];
16
- url?: string;
17
+ href?: string;
18
+ target?: string;
17
19
  icon?: string;
18
20
  justify?: string;
19
21
  }
20
22
 
21
23
  withDefaults(defineProps<CodePropsT>(), {
22
- title: undefined,
23
- options: undefined,
24
- url: undefined,
25
- icon: undefined,
26
24
  justify: 'center',
27
25
  });
28
26
 
29
- const itemChange = (data: any) => {
30
- window.open(data.url, '_blank');
27
+ const itemChange = (data: Pick<CodeItemT, 'href' | 'target'>) => {
28
+ window.open(data.href, data.target ? data.target : '_blank');
31
29
  };
32
30
 
33
31
  const dropdownVisible = ref(false);
@@ -38,7 +36,7 @@ const visibleChange = (val: boolean) => {
38
36
 
39
37
  <template>
40
38
  <div class="source-code">
41
- <div v-if="url" class="info-wrap" @click="itemChange({ url: url })">
39
+ <div v-if="href" class="info-wrap" @click="itemChange({ href: href, target: target })">
42
40
  <span class="title">{{ title }}</span>
43
41
  <OIcon v-if="icon">
44
42
  <component :is="icon" class="icon" />
@@ -57,7 +55,7 @@ const visibleChange = (val: boolean) => {
57
55
  <OIcon class="icon"><IconChevronDown /></OIcon>
58
56
  </div>
59
57
  <template #dropdown>
60
- <ODropdownItem v-for="item in options" @click="itemChange(item)" :key="item.url" class="list" :style="{ '--dropdown-item-justify': justify }">
58
+ <ODropdownItem v-for="item in options" @click="itemChange(item)" :key="item.href" class="list" :style="{ '--dropdown-item-justify': justify }">
61
59
  {{ item.label }}
62
60
  <OIcon v-if="item.icon">
63
61
  <component :is="item.icon" class="icon" />
@@ -14,12 +14,12 @@ import {
14
14
  } from '@opensig/opendesign';
15
15
  import { useScreen } from '@opendesign-plus/composables';
16
16
  import { onMounted, watch, ref, reactive, computed } from 'vue';
17
- import { ActivityItemT, ActivityTablePropsT, ReviewParamsT, TypeOptionT } from './types';
17
+ import { ActivityItemT, ActivityTablePropsT, ReviewParamsT } from './types';
18
18
  import { useActivityConfig } from './composables/useActivityConfig';
19
19
  import ThFilter from '../common/ThFilter.vue';
20
20
  import OMeetingDetail from '@/components/meeting/components/OMeetingDetail.vue';
21
21
  import { useI18n } from '@/i18n';
22
- import { CalendarDataType } from '@/components/meeting';
22
+ import { CalendarDataType, MeetingItemT } from '@/components/meeting';
23
23
 
24
24
  const { t, locale } = useI18n();
25
25
  const isZh = computed(() => locale.value === 'zh');
@@ -55,13 +55,12 @@ const sortTime = () => {
55
55
 
56
56
  // -------------------- 状态 --------------------
57
57
  const statusValue = ref();
58
- const statusOptions = computed<TypeOptionT[]>(() => {
59
- let list: TypeOptionT[] | { label: string; value: string; }[] = [];
58
+ const statusOptions = computed(() => {
59
+ const list: { label: string; value: string | number }[] = [];
60
60
  approvalStatusMap.value.forEach((item) => {
61
61
  list.push(item);
62
62
  });
63
63
  return list.slice(1);
64
-
65
64
  });
66
65
  const filterStatusList = () => {
67
66
  params.status = statusValue.value;
@@ -72,7 +71,7 @@ const filterStatusList = () => {
72
71
  }
73
72
  };
74
73
 
75
- const tableData = ref([]);
74
+ const tableData = ref<ActivityItemT[]>([]);
76
75
  const total = ref(0);
77
76
 
78
77
  const COUNT_PER_PAGE = [10, 20, 30, 40];
@@ -93,7 +92,7 @@ const getData = async () => {
93
92
  }
94
93
  const res = await props.getTableDataRequest(paramsData);
95
94
  tableData.value = (res.data || [])
96
- .map((item) => {
95
+ .map((item: ActivityItemT) => {
97
96
  const { start_date, end_date, start, end, activity_type } = item;
98
97
  return [
99
98
  {
@@ -144,14 +143,14 @@ const confirm = async () => {
144
143
  try {
145
144
  loading.value = true;
146
145
  const valid = await formRef.value?.validate();
147
- if (valid.some((v) => !!v)) {
146
+ if (!valid || valid.some((v: any) => !!v)) {
148
147
  loading.value = false;
149
148
  return;
150
149
  }
151
150
  if (reviewStatus.value === 1) {
152
- await props.approveActivityRequest(currentRow.value.id, form.value);
151
+ await props.approveActivityRequest(currentRow.value?.id, form.value);
153
152
  } else {
154
- await props.rejectActivityRequest(currentRow.value.id, form.value);
153
+ await props.rejectActivityRequest(currentRow.value?.id, form.value);
155
154
  }
156
155
  getData();
157
156
  cancel();
@@ -175,9 +174,9 @@ const confirmCancel = async () => {
175
174
  try {
176
175
  loading.value = true;
177
176
  if (cancelStatus.value === 1) {
178
- await props.cancelActivityRequest(currentRow.value.id, form.value);
177
+ await props.cancelActivityRequest(currentRow.value!.id, form.value);
179
178
  } else {
180
- await props.deleteActivityRequest(currentRow.value.id, form.value);
179
+ await props.deleteActivityRequest(currentRow.value!.id, form.value);
181
180
  }
182
181
  getData();
183
182
  cancel();
@@ -224,16 +223,17 @@ const rejectItem = (row: ActivityItemT) => {
224
223
  reviewVisible.value = true;
225
224
  };
226
225
 
227
- const expandList = ref([]);
228
- const expandedRows = ref([]);
226
+ const expandList = ref<string[]>([]);
227
+ const expandedRows = ref<string[]>([]);
229
228
 
230
- const getActivityDetail = (val: number) => {
229
+ const getActivityDetail = (id: number) => {
230
+ const val = id.toString();
231
231
  if (!props.getActivityDetailRequest) {
232
232
  return;
233
233
  }
234
234
  if (!expandList.value.includes(val)) {
235
235
  expandList.value.push(val);
236
- props.getActivityDetailRequest(val).then((res) => {
236
+ props.getActivityDetailRequest(val).then((res: ActivityItemT) => {
237
237
  tableData.value?.forEach((item) => {
238
238
  if (item.id === res.id) {
239
239
  item.approve_record = res.approve_record;
@@ -250,26 +250,26 @@ const getActivityDetail = (val: number) => {
250
250
  }
251
251
  };
252
252
 
253
- const expandChange = (val) => {
253
+ const expandChange = (val: ActivityItemT) => {
254
254
  getActivityDetail(val.id);
255
255
  };
256
256
 
257
- const getRowKey = (row) => {
258
- return row.id;
257
+ const getRowKey = (row: ActivityItemT): string => {
258
+ return row.id.toString();
259
259
  };
260
260
 
261
261
  // -------------------- 移动端 ---------------------
262
- const expanded = ref([]); // 展开的数据,id
263
- const change = (val: number[]) => {
262
+ const expanded = ref<(string | number)[]>([]); // 展开的数据,id
263
+ const change = (val: (string | number)[]) => {
264
264
  if (val.length) {
265
- val.forEach((item: number) => {
266
- getActivityDetail(item);
265
+ val.forEach((item) => {
266
+ getActivityDetail(item as number);
267
267
  });
268
268
  }
269
269
  };
270
270
 
271
- const detailRefs = ref({});
272
- const getDetailRefs = (insRef, id) => {
271
+ const detailRefs = ref<Record<number, any>>({});
272
+ const getDetailRefs = (insRef: any, id: number) => {
273
273
  if (insRef && id) {
274
274
  detailRefs.value[id] = insRef;
275
275
  }
@@ -345,7 +345,7 @@ const reviewActions = computed<DialogActionT[]>(() => {
345
345
  <ElTableColumn type="expand">
346
346
  <template #default="props">
347
347
  <div class="expand-detail">
348
- <OMeetingDetail :data="props.row" page="approval" show />
348
+ <OMeetingDetail :data="props.row" :page="CalendarDataType.APPROVAL" show />
349
349
  </div>
350
350
  </template>
351
351
  </ElTableColumn>
@@ -447,7 +447,7 @@ const reviewActions = computed<DialogActionT[]>(() => {
447
447
  </div>
448
448
  <div v-else class="collapse-wrapper">
449
449
  <OCollapse v-model="expanded" :accordion="isPhone" @change="change">
450
- <template v-for="(act, idx) in tableData" :key="act.id">
450
+ <template v-for="(act) in tableData" :key="act.id">
451
451
  <div class="title-top">
452
452
  <p class="act-title">{{ act.title }}</p>
453
453
  <OTag v-if="act.is_delete !== 1" color="primary" variant="outline"
@@ -502,7 +502,7 @@ const reviewActions = computed<DialogActionT[]>(() => {
502
502
  <div class="activity-detail">
503
503
  <OMeetingDetail
504
504
  :show="expanded.includes(act.id)"
505
- :data="act"
505
+ :data="act as unknown as MeetingItemT"
506
506
  :ref="(insRef) => getDetailRefs(insRef, act.id)"
507
507
  :page="CalendarDataType.APPROVAL"
508
508
  />
@@ -589,12 +589,12 @@ const reviewActions = computed<DialogActionT[]>(() => {
589
589
  margin-left: 24px;
590
590
  }
591
591
 
592
- @include respond-to('<=pad_v') {
592
+ @include respond('<=pad_v') {
593
593
  .o-btn + .o-btn {
594
594
  margin-left: 16px;
595
595
  }
596
596
  }
597
- @include respond-to('phone') {
597
+ @include respond('phone') {
598
598
  margin-top: 8px;
599
599
  .o-btn + .o-btn {
600
600
  margin-left: 12px;
@@ -737,7 +737,7 @@ const reviewActions = computed<DialogActionT[]>(() => {
737
737
  margin-left: 16px;
738
738
  }
739
739
 
740
- @include respond-to('<=pad_v') {
740
+ @include respond('<=pad_v') {
741
741
  .o-btn {
742
742
  width: 140px;
743
743
  color: var(--o-color-info1);
@@ -828,7 +828,7 @@ const reviewActions = computed<DialogActionT[]>(() => {
828
828
  .handle-dialog-approval {
829
829
  --dlg-width: 450px;
830
830
  --dlg-radius: var(--o-radius-xs);
831
- @include respond-to('<=pad_v') {
831
+ @include respond('<=pad_v') {
832
832
  width: 100%;
833
833
  --dlg-radius: var(--o-radius-xs) var(--o-radius-xs) 0 0;
834
834
  }
@@ -225,7 +225,7 @@ const approverList = computed(() => {
225
225
  return props.admins || [];
226
226
  });
227
227
 
228
- const typeValue = ref<string>('');
228
+ const typeValue = ref<string | undefined>('');
229
229
  const typeOptions = ref<TypeOptionT[]>([]); // 活动类型
230
230
  activityTypeMap.value.forEach((item) => {
231
231
  typeOptions.value.push(item);
@@ -280,7 +280,7 @@ watch(
280
280
  organizer,
281
281
  } as ParamsItemT;
282
282
  form.value = { ...params };
283
- typeValue.value = activityTypeMap.value.get(val.activity_type)?.label;
283
+ typeValue.value = activityTypeMap.value.get(Number(val.activity_type))?.label;
284
284
  form.value.start_date = `${ form.value.start_date } ${ form.value.start }`;
285
285
  form.value.end_date = `${ form.value.end_date } ${ form.value.end }`;
286
286
  }
@@ -292,7 +292,7 @@ const confirm = async (val: boolean) => {
292
292
  let type = isEdit.value ? t('meeting.modifyActivity') : val ? t('meeting.create') : t('meeting.saveDraft');
293
293
  try {
294
294
  const valid = await formRef.value?.validate();
295
- if (valid.some((v) => !!v)) {
295
+ if (valid.some((v: any) => !!v)) {
296
296
  return;
297
297
  }
298
298
  loading.value = true;
@@ -498,7 +498,7 @@ defineExpose({
498
498
  padding: var(--o-gap-5);
499
499
  padding-right: calc(var(--o-gap-4) + var(--o-gap-5));
500
500
  border-radius: var(--o-radius-xs);
501
- @include respond-to('<=pad_v') {
501
+ @include respond('<=pad_v') {
502
502
  padding: var(--o-gap-4);
503
503
  }
504
504
 
@@ -522,7 +522,7 @@ defineExpose({
522
522
  margin-left: var(--o-gap-4);
523
523
  }
524
524
 
525
- @include respond-to('<=pad_v') {
525
+ @include respond('<=pad_v') {
526
526
  .o-btn {
527
527
  --btn-min-width: 74px;
528
528
  }