@opendesign-plus/components 0.0.1-rc.77 → 0.0.1-rc.79

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 (93) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -1
  2. package/dist/chunk-OElCookieNotice.es.js +37 -13
  3. package/dist/components/anchor-bar/OAnchorBar.vue.d.ts +29 -0
  4. package/dist/components/anchor-bar/index.d.ts +45 -0
  5. package/dist/components/anchor-bar/types.d.ts +20 -0
  6. package/dist/components/brand/OBrandFile.vue.d.ts +5 -0
  7. package/dist/components/brand/OBrandLogo.vue.d.ts +6 -0
  8. package/dist/components/brand/OBrandStandard.vue.d.ts +3 -0
  9. package/dist/components/brand/index.d.ts +63 -0
  10. package/dist/components/brand/types.d.ts +60 -0
  11. package/dist/components/brand/utils.d.ts +3 -0
  12. package/dist/components/meeting/OMeetingMinutes.vue.d.ts +1 -0
  13. package/dist/components/meeting/OMeetingMinutesCopyDetail.vue.d.ts +7 -0
  14. package/dist/components/meeting/OMeetingSendMinutesForm.vue.d.ts +144 -0
  15. package/dist/components/meeting/components/OMeetingSendMinutesDialog.vue.d.ts +158 -1
  16. package/dist/components/meeting/index.d.ts +203 -1
  17. package/dist/components/meeting/types.d.ts +2 -0
  18. package/dist/components/org/OOrgDesc.vue.d.ts +22 -0
  19. package/dist/components/org/OOrgMembers.vue.d.ts +5 -0
  20. package/dist/components/org/index.d.ts +55 -0
  21. package/dist/components/org/types.d.ts +19 -0
  22. package/dist/components.cjs.js +36 -36
  23. package/dist/components.css +1 -1
  24. package/dist/components.es.js +10988 -10426
  25. package/dist/index.d.ts +3 -0
  26. package/dist/treeshaking/_virtual/icon-email.mjs +21 -0
  27. package/dist/treeshaking/components/anchor-bar/OAnchorBar.css +138 -0
  28. package/dist/treeshaking/components/anchor-bar/OAnchorBar.vue.d.ts +29 -0
  29. package/dist/treeshaking/components/anchor-bar/OAnchorBar.vue.mjs +7 -0
  30. package/dist/treeshaking/components/anchor-bar/OAnchorBar.vue2.mjs +103 -0
  31. package/dist/treeshaking/components/anchor-bar/index.d.ts +45 -0
  32. package/dist/treeshaking/components/anchor-bar/index.mjs +9 -0
  33. package/dist/treeshaking/components/anchor-bar/types.d.ts +20 -0
  34. package/dist/treeshaking/components/brand/OBrandFile.css +65 -0
  35. package/dist/treeshaking/components/brand/OBrandFile.vue.d.ts +5 -0
  36. package/dist/treeshaking/components/brand/OBrandFile.vue.mjs +7 -0
  37. package/dist/treeshaking/components/brand/OBrandFile.vue2.mjs +70 -0
  38. package/dist/treeshaking/components/brand/OBrandLogo.css +99 -0
  39. package/dist/treeshaking/components/brand/OBrandLogo.vue.d.ts +6 -0
  40. package/dist/treeshaking/components/brand/OBrandLogo.vue.mjs +8 -0
  41. package/dist/treeshaking/components/brand/OBrandLogo.vue2.mjs +120 -0
  42. package/dist/treeshaking/components/{meeting/components/OMeetingSendMinutesDialog2.css → brand/OBrandLogo2.css} +2 -2
  43. package/dist/treeshaking/components/brand/OBrandStandard.css +120 -0
  44. package/dist/treeshaking/components/brand/OBrandStandard.vue.d.ts +3 -0
  45. package/dist/treeshaking/components/brand/OBrandStandard.vue.mjs +7 -0
  46. package/dist/treeshaking/components/brand/OBrandStandard.vue2.mjs +59 -0
  47. package/dist/treeshaking/components/brand/index.d.ts +63 -0
  48. package/dist/treeshaking/components/brand/index.mjs +23 -0
  49. package/dist/treeshaking/components/brand/types.d.ts +60 -0
  50. package/dist/treeshaking/components/brand/utils.d.ts +3 -0
  51. package/dist/treeshaking/components/brand/utils.mjs +28 -0
  52. package/dist/treeshaking/components/feedback-doc/OFeedbackDoc.css +5 -5
  53. package/dist/treeshaking/components/feedback-doc/OFeedbackDoc.vue.mjs +1 -1
  54. package/dist/treeshaking/components/meeting/OMeetingCalendar.vue.mjs +1 -1
  55. package/dist/treeshaking/components/meeting/OMeetingMinutes.css +142 -365
  56. package/dist/treeshaking/components/meeting/OMeetingMinutes.vue.d.ts +1 -0
  57. package/dist/treeshaking/components/meeting/OMeetingMinutes.vue.mjs +228 -210
  58. package/dist/treeshaking/components/meeting/OMeetingMinutesCopyDetail.css +95 -0
  59. package/dist/treeshaking/components/meeting/OMeetingMinutesCopyDetail.vue.d.ts +7 -0
  60. package/dist/treeshaking/components/meeting/OMeetingMinutesCopyDetail.vue.mjs +7 -0
  61. package/dist/treeshaking/components/meeting/OMeetingMinutesCopyDetail.vue2.mjs +74 -0
  62. package/dist/treeshaking/components/meeting/OMeetingSendMinutesForm.css +257 -0
  63. package/dist/treeshaking/components/meeting/OMeetingSendMinutesForm.vue.d.ts +144 -0
  64. package/dist/treeshaking/components/meeting/OMeetingSendMinutesForm.vue.mjs +221 -0
  65. package/dist/treeshaking/components/meeting/OMeetingSendMinutesForm.vue3.mjs +5 -0
  66. package/dist/treeshaking/components/meeting/components/OMeetingSendMinutesDialog.css +4 -266
  67. package/dist/treeshaking/components/meeting/components/OMeetingSendMinutesDialog.vue.d.ts +158 -1
  68. package/dist/treeshaking/components/meeting/components/OMeetingSendMinutesDialog.vue.mjs +1 -2
  69. package/dist/treeshaking/components/meeting/components/OMeetingSendMinutesDialog.vue2.mjs +54 -186
  70. package/dist/treeshaking/components/meeting/index.d.ts +203 -1
  71. package/dist/treeshaking/components/meeting/index.mjs +18 -3
  72. package/dist/treeshaking/components/meeting/types.d.ts +2 -0
  73. package/dist/treeshaking/components/org/OOrgDesc.css +107 -0
  74. package/dist/treeshaking/components/org/OOrgDesc.vue.d.ts +22 -0
  75. package/dist/treeshaking/components/org/OOrgDesc.vue.mjs +7 -0
  76. package/dist/treeshaking/components/org/OOrgDesc.vue2.mjs +40 -0
  77. package/dist/treeshaking/components/org/OOrgMembers.css +234 -0
  78. package/dist/treeshaking/components/org/OOrgMembers.vue.d.ts +5 -0
  79. package/dist/treeshaking/components/org/OOrgMembers.vue.mjs +7 -0
  80. package/dist/treeshaking/components/org/OOrgMembers.vue2.mjs +108 -0
  81. package/dist/treeshaking/components/org/index.d.ts +55 -0
  82. package/dist/treeshaking/components/org/index.mjs +16 -0
  83. package/dist/treeshaking/components/org/types.d.ts +19 -0
  84. package/dist/treeshaking/components/summit/OSummitLive.css +20 -20
  85. package/dist/treeshaking/components/summit/OSummitLive.vue.mjs +1 -1
  86. package/dist/treeshaking/components/summit/OSummitLive.vue2.mjs +1 -1
  87. package/dist/treeshaking/i18n/en.mjs +13 -1
  88. package/dist/treeshaking/i18n/zh.mjs +13 -1
  89. package/dist/treeshaking/index.d.ts +3 -0
  90. package/dist/treeshaking/index.mjs +12 -1
  91. package/dist/treeshaking/shared/anchor.mjs +9 -0
  92. package/package.json +4 -4
  93. package/dist/treeshaking/_virtual/icon-edit.mjs +0 -17
@@ -0,0 +1,74 @@
1
+ import { defineComponent, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, toDisplayString, createCommentVNode } from "vue";
2
+ import { OIcon, OIconLoading } from "@opensig/opendesign";
3
+ import { useMeetingConfig } from "./composables/useMeetingConfig.mjs";
4
+ import { formatDate } from "./utils.mjs";
5
+ const _hoisted_1 = {
6
+ key: 0,
7
+ class: "o-meeting-minutes-log-loading"
8
+ };
9
+ const _hoisted_2 = {
10
+ key: 1,
11
+ class: "o-meeting-minutes-copy-detail"
12
+ };
13
+ const _hoisted_3 = { class: "o-meeting-minutes-copy-meta" };
14
+ const _hoisted_4 = { class: "o-meeting-minutes-copy-field" };
15
+ const _hoisted_5 = { class: "copy-label" };
16
+ const _hoisted_6 = { class: "copy-value" };
17
+ const _hoisted_7 = { class: "o-meeting-minutes-copy-field" };
18
+ const _hoisted_8 = { class: "copy-label" };
19
+ const _hoisted_9 = { class: "copy-value" };
20
+ const _hoisted_10 = { class: "o-meeting-minutes-copy-field" };
21
+ const _hoisted_11 = { class: "copy-label" };
22
+ const _hoisted_12 = { class: "copy-value copy-subject" };
23
+ const _hoisted_13 = { class: "o-meeting-minutes-copy-field" };
24
+ const _hoisted_14 = { class: "copy-label" };
25
+ const _hoisted_15 = { class: "copy-value" };
26
+ const _hoisted_16 = { class: "o-meeting-minutes-copy-field" };
27
+ const _hoisted_17 = { class: "copy-label" };
28
+ const _hoisted_18 = { class: "copy-value copy-body" };
29
+ const _sfc_main = /* @__PURE__ */ defineComponent({
30
+ __name: "OMeetingMinutesCopyDetail",
31
+ props: {
32
+ log: {},
33
+ loading: { type: Boolean }
34
+ },
35
+ setup(__props) {
36
+ const { t } = useMeetingConfig();
37
+ return (_ctx, _cache) => {
38
+ return __props.loading ? (openBlock(), createElementBlock("div", _hoisted_1, [
39
+ createVNode(unref(OIcon), { class: "log-loading-icon o-rotating" }, {
40
+ default: withCtx(() => [
41
+ createVNode(unref(OIconLoading))
42
+ ]),
43
+ _: 1
44
+ })
45
+ ])) : __props.log ? (openBlock(), createElementBlock("div", _hoisted_2, [
46
+ createElementVNode("div", _hoisted_3, [
47
+ createElementVNode("div", _hoisted_4, [
48
+ createElementVNode("span", _hoisted_5, toDisplayString(unref(t)("meeting.minutesCopySender")), 1),
49
+ createElementVNode("span", _hoisted_6, toDisplayString(__props.log.sender), 1)
50
+ ]),
51
+ createElementVNode("div", _hoisted_7, [
52
+ createElementVNode("span", _hoisted_8, toDisplayString(unref(t)("meeting.minutesCopyRecipient")), 1),
53
+ createElementVNode("span", _hoisted_9, toDisplayString((__props.log.recipients || []).join("、")), 1)
54
+ ]),
55
+ createElementVNode("div", _hoisted_10, [
56
+ createElementVNode("span", _hoisted_11, toDisplayString(unref(t)("meeting.minutesCopySubject")), 1),
57
+ createElementVNode("span", _hoisted_12, toDisplayString(__props.log.subject), 1)
58
+ ]),
59
+ createElementVNode("div", _hoisted_13, [
60
+ createElementVNode("span", _hoisted_14, toDisplayString(unref(t)("meeting.minutesCopyTime")), 1),
61
+ createElementVNode("span", _hoisted_15, toDisplayString(unref(formatDate)(__props.log.send_time, "YYYY/MM/DD HH:mm:ss")), 1)
62
+ ]),
63
+ createElementVNode("div", _hoisted_16, [
64
+ createElementVNode("span", _hoisted_17, toDisplayString(unref(t)("meeting.minutesCopyBody")), 1),
65
+ createElementVNode("span", _hoisted_18, toDisplayString(__props.log.content), 1)
66
+ ])
67
+ ])
68
+ ])) : createCommentVNode("", true);
69
+ };
70
+ }
71
+ });
72
+ export {
73
+ _sfc_main as default
74
+ };
@@ -0,0 +1,257 @@
1
+ .hover-icon-rotate .o-icon {
2
+ transition: all var(--o-duration-m1) var(--o-easing-standard-in);
3
+ }
4
+ @media (hover: hover) {
5
+ .hover-icon-rotate:hover .o-icon {
6
+ transform: rotate(-180deg);
7
+ }
8
+ }
9
+ .o-meeting-send-minutes {
10
+ --item-height: 40px;
11
+ --form-item-gap: var(--o-r-gap-4);
12
+ --minutes-input-radius: var(--o-radius-xs);
13
+ }
14
+ @media (max-width: 1680px) {
15
+ .o-meeting-send-minutes {
16
+ --item-height: 36px;
17
+ }
18
+ }
19
+ .o-meeting-send-minutes .o-form-item-label {
20
+ --form-label-gap-top: 0;
21
+ color: var(--o-color-info2);
22
+ }
23
+ @media (max-width: 840px) {
24
+ .o-meeting-send-minutes .o-form-item-label {
25
+ font-size: 16px;
26
+ line-height: 24px;
27
+ }
28
+ }
29
+ @media (max-width: 840px) and (min-width: 1201px) and (max-width: 1680px) {
30
+ .o-meeting-send-minutes .o-form-item-label {
31
+ font-size: 14px;
32
+ line-height: 22px;
33
+ }
34
+ }
35
+ @media (max-width: 840px) and (min-width: 841px) and (max-width: 1200px) {
36
+ .o-meeting-send-minutes .o-form-item-label {
37
+ font-size: 14px;
38
+ line-height: 22px;
39
+ }
40
+ }
41
+ @media (max-width: 840px) and (min-width: 601px) and (max-width: 840px) {
42
+ .o-meeting-send-minutes .o-form-item-label {
43
+ font-size: 14px;
44
+ line-height: 22px;
45
+ }
46
+ }
47
+ @media (max-width: 840px) and (max-width: 600px) {
48
+ .o-meeting-send-minutes .o-form-item-label {
49
+ font-size: 12px;
50
+ line-height: 18px;
51
+ }
52
+ }
53
+ .o-meeting-send-minutes.o-form-layout-h .o-form-item-label {
54
+ flex: 0 0 5em;
55
+ width: 5em;
56
+ height: var(--item-height);
57
+ align-items: center;
58
+ }
59
+ .o-meeting-send-minutes .o-form-item:first-child .o-form-item-label, .o-meeting-send-minutes .o-form-item:last-child .o-form-item-label {
60
+ font-size: 16px;
61
+ line-height: 24px;
62
+ }
63
+ @media (min-width: 1201px) and (max-width: 1680px) {
64
+ .o-meeting-send-minutes .o-form-item:first-child .o-form-item-label, .o-meeting-send-minutes .o-form-item:last-child .o-form-item-label {
65
+ font-size: 14px;
66
+ line-height: 22px;
67
+ }
68
+ }
69
+ @media (min-width: 841px) and (max-width: 1200px) {
70
+ .o-meeting-send-minutes .o-form-item:first-child .o-form-item-label, .o-meeting-send-minutes .o-form-item:last-child .o-form-item-label {
71
+ font-size: 14px;
72
+ line-height: 22px;
73
+ }
74
+ }
75
+ @media (min-width: 601px) and (max-width: 840px) {
76
+ .o-meeting-send-minutes .o-form-item:first-child .o-form-item-label, .o-meeting-send-minutes .o-form-item:last-child .o-form-item-label {
77
+ font-size: 14px;
78
+ line-height: 22px;
79
+ }
80
+ }
81
+ @media (max-width: 600px) {
82
+ .o-meeting-send-minutes .o-form-item:first-child .o-form-item-label, .o-meeting-send-minutes .o-form-item:last-child .o-form-item-label {
83
+ font-size: 12px;
84
+ line-height: 18px;
85
+ }
86
+ }
87
+ .o-meeting-send-minutes .sender-text {
88
+ color: var(--o-color-info1);
89
+ line-height: var(--o-control_size-m);
90
+ font-size: 16px;
91
+ line-height: 24px;
92
+ }
93
+ @media (min-width: 1201px) and (max-width: 1680px) {
94
+ .o-meeting-send-minutes .sender-text {
95
+ font-size: 14px;
96
+ line-height: 22px;
97
+ }
98
+ }
99
+ @media (min-width: 841px) and (max-width: 1200px) {
100
+ .o-meeting-send-minutes .sender-text {
101
+ font-size: 14px;
102
+ line-height: 22px;
103
+ }
104
+ }
105
+ @media (min-width: 601px) and (max-width: 840px) {
106
+ .o-meeting-send-minutes .sender-text {
107
+ font-size: 14px;
108
+ line-height: 22px;
109
+ }
110
+ }
111
+ @media (max-width: 600px) {
112
+ .o-meeting-send-minutes .sender-text {
113
+ font-size: 12px;
114
+ line-height: 18px;
115
+ }
116
+ }
117
+ .o-meeting-send-minutes .o-meeting-send-minutes-recipient-editor {
118
+ display: flex;
119
+ flex-wrap: wrap;
120
+ align-items: center;
121
+ gap: var(--o-gap-3);
122
+ padding: var(--o-gap-1) var(--o-gap-3);
123
+ border: 1px solid var(--o-color-control1);
124
+ border-radius: var(--minutes-input-radius);
125
+ min-height: var(--item-height);
126
+ width: 100%;
127
+ cursor: text;
128
+ transition: border-color var(--o-duration-s) var(--o-easing-standard);
129
+ color: var(--o-color-info1);
130
+ font-size: 16px;
131
+ line-height: 24px;
132
+ }
133
+ @media (min-width: 1201px) and (max-width: 1680px) {
134
+ .o-meeting-send-minutes .o-meeting-send-minutes-recipient-editor {
135
+ font-size: 14px;
136
+ line-height: 22px;
137
+ }
138
+ }
139
+ @media (min-width: 841px) and (max-width: 1200px) {
140
+ .o-meeting-send-minutes .o-meeting-send-minutes-recipient-editor {
141
+ font-size: 14px;
142
+ line-height: 22px;
143
+ }
144
+ }
145
+ @media (min-width: 601px) and (max-width: 840px) {
146
+ .o-meeting-send-minutes .o-meeting-send-minutes-recipient-editor {
147
+ font-size: 14px;
148
+ line-height: 22px;
149
+ }
150
+ }
151
+ @media (max-width: 600px) {
152
+ .o-meeting-send-minutes .o-meeting-send-minutes-recipient-editor {
153
+ font-size: 12px;
154
+ line-height: 18px;
155
+ }
156
+ }
157
+ .o-meeting-send-minutes .o-meeting-send-minutes-recipient-editor:hover {
158
+ border-color: var(--o-color-control2);
159
+ }
160
+ .o-meeting-send-minutes .o-meeting-send-minutes-recipient-editor:focus-within {
161
+ border-color: var(--o-color-primary3);
162
+ }
163
+ .o-meeting-send-minutes .recipient-tag {
164
+ flex-shrink: 0;
165
+ --tag-height: 22px;
166
+ --tag-padding: 4px 8px;
167
+ --tag-bg-color: var(--o-color-control2-light);
168
+ --tag-color: var(--o-color-info1);
169
+ --tag-bd-color: transparent;
170
+ --tag-icon-close-color: var(--o-color-info2);
171
+ --tag-icon-close-color-hover: var(--o-color-info1);
172
+ }
173
+ .o-meeting-send-minutes .recipient-native-input {
174
+ flex: 1 1 120px;
175
+ min-width: 120px;
176
+ border: none;
177
+ outline: none;
178
+ background: transparent;
179
+ height: 22px;
180
+ line-height: 22px;
181
+ padding: 0;
182
+ color: var(--o-color-info1);
183
+ font-size: 16px;
184
+ line-height: 24px;
185
+ }
186
+ @media (min-width: 1201px) and (max-width: 1680px) {
187
+ .o-meeting-send-minutes .recipient-native-input {
188
+ font-size: 14px;
189
+ line-height: 22px;
190
+ }
191
+ }
192
+ @media (min-width: 841px) and (max-width: 1200px) {
193
+ .o-meeting-send-minutes .recipient-native-input {
194
+ font-size: 14px;
195
+ line-height: 22px;
196
+ }
197
+ }
198
+ @media (min-width: 601px) and (max-width: 840px) {
199
+ .o-meeting-send-minutes .recipient-native-input {
200
+ font-size: 14px;
201
+ line-height: 22px;
202
+ }
203
+ }
204
+ @media (max-width: 600px) {
205
+ .o-meeting-send-minutes .recipient-native-input {
206
+ font-size: 12px;
207
+ line-height: 18px;
208
+ }
209
+ }
210
+ .o-meeting-send-minutes .recipient-native-input::placeholder {
211
+ color: var(--o-color-info3);
212
+ }
213
+ .o-meeting-send-minutes .subject-input {
214
+ width: 100%;
215
+ }
216
+ .o-meeting-send-minutes .o-meeting-send-minutes-email-body-scroller {
217
+ max-height: 452px;
218
+ }
219
+ @media (max-width: 840px) {
220
+ .o-meeting-send-minutes .o-meeting-send-minutes-email-body-scroller {
221
+ max-height: 320px;
222
+ }
223
+ }
224
+ .o-meeting-send-minutes .email-body-content {
225
+ color: var(--o-color-info1);
226
+ white-space: pre-wrap;
227
+ min-width: 480px;
228
+ font-size: 16px;
229
+ line-height: 24px;
230
+ }
231
+ @media (min-width: 1201px) and (max-width: 1680px) {
232
+ .o-meeting-send-minutes .email-body-content {
233
+ font-size: 14px;
234
+ line-height: 22px;
235
+ }
236
+ }
237
+ @media (min-width: 841px) and (max-width: 1200px) {
238
+ .o-meeting-send-minutes .email-body-content {
239
+ font-size: 14px;
240
+ line-height: 22px;
241
+ }
242
+ }
243
+ @media (min-width: 601px) and (max-width: 840px) {
244
+ .o-meeting-send-minutes .email-body-content {
245
+ font-size: 14px;
246
+ line-height: 22px;
247
+ }
248
+ }
249
+ @media (max-width: 600px) {
250
+ .o-meeting-send-minutes .email-body-content {
251
+ font-size: 12px;
252
+ line-height: 18px;
253
+ }
254
+ }
255
+ .o-meeting-send-minutes .text-item .o-form-item-label {
256
+ height: 32px;
257
+ }
@@ -0,0 +1,144 @@
1
+ import { MeetingItemT, SendLogT } from './types.ts';
2
+ type __VLS_Props = {
3
+ meeting: MeetingItemT | null;
4
+ prefill?: string[] | null;
5
+ sendMinutesRequest: any;
6
+ };
7
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {
8
+ send: () => Promise<void>;
9
+ sending: import('vue').Ref<boolean, boolean>;
10
+ reset: () => void;
11
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
12
+ sent: (log: SendLogT) => any;
13
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ onSent?: ((log: SendLogT) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
16
+ formRef: ({
17
+ $: import('vue').ComponentInternalInstance;
18
+ $data: {};
19
+ $props: Partial<{
20
+ layout: "h" | "v" | "inline";
21
+ hasRequired: boolean;
22
+ }> & Omit<{
23
+ readonly hasRequired: boolean;
24
+ readonly layout: "v" | "h" | "inline";
25
+ readonly model?: Record<string, any> | undefined;
26
+ readonly labelAlign?: "top" | "center" | "bottom" | undefined;
27
+ readonly labelJustify?: "center" | "left" | "right" | undefined;
28
+ readonly labelWidth?: string | undefined;
29
+ readonly onClear?: ((filed?: string | string[] | undefined) => any) | undefined | undefined;
30
+ readonly onReset?: ((filed?: string | string[] | undefined) => any) | undefined | undefined;
31
+ readonly onSubmit?: ((results: import('@opensig/opendesign').FieldResultT[]) => any) | undefined | undefined;
32
+ readonly onValidate?: ((results: import('@opensig/opendesign').FieldResultT[]) => any) | undefined | undefined;
33
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "hasRequired" | "layout">;
34
+ $attrs: import('vue').Attrs;
35
+ $refs: {
36
+ [x: string]: unknown;
37
+ };
38
+ $slots: Readonly<{
39
+ [name: string]: import('vue').Slot<any> | undefined;
40
+ }>;
41
+ $root: import('vue').ComponentPublicInstance | null;
42
+ $parent: import('vue').ComponentPublicInstance | null;
43
+ $host: Element | null;
44
+ $emit: ((event: "clear", filed?: string | string[] | undefined) => void) & ((event: "validate", results: import('@opensig/opendesign').FieldResultT[]) => void) & ((event: "reset", filed?: string | string[] | undefined) => void) & ((event: "submit", results: import('@opensig/opendesign').FieldResultT[]) => void);
45
+ $el: HTMLFormElement;
46
+ $options: import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
47
+ model: {
48
+ type: ObjectConstructor;
49
+ };
50
+ hasRequired: {
51
+ type: BooleanConstructor;
52
+ default: boolean;
53
+ };
54
+ layout: {
55
+ type: import('vue').PropType<"h" | "v" | "inline">;
56
+ default: string;
57
+ };
58
+ labelAlign: {
59
+ type: import('vue').PropType<"top" | "center" | "bottom">;
60
+ };
61
+ labelJustify: {
62
+ type: import('vue').PropType<"left" | "center" | "right">;
63
+ };
64
+ labelWidth: {
65
+ type: StringConstructor;
66
+ };
67
+ }>> & Readonly<{
68
+ onClear?: ((filed?: string | string[] | undefined) => any) | undefined;
69
+ onReset?: ((filed?: string | string[] | undefined) => any) | undefined;
70
+ onSubmit?: ((results: import('@opensig/opendesign').FieldResultT[]) => any) | undefined;
71
+ onValidate?: ((results: import('@opensig/opendesign').FieldResultT[]) => any) | undefined;
72
+ }>, {
73
+ validate: (filed?: string | string[]) => Promise<import('@opensig/opendesign').FieldResultT[]>;
74
+ resetFields: (filed?: string | string[]) => void;
75
+ clearValidate: (filed?: string | string[], onClear?: (filed: import('@opensig/opendesign').FiledInfoT) => void) => void;
76
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
77
+ clear: (filed?: string | string[] | undefined) => any;
78
+ reset: (filed?: string | string[] | undefined) => any;
79
+ submit: (results: import('@opensig/opendesign').FieldResultT[]) => any;
80
+ validate: (results: import('@opensig/opendesign').FieldResultT[]) => any;
81
+ }, string, {
82
+ layout: "h" | "v" | "inline";
83
+ hasRequired: boolean;
84
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
85
+ beforeCreate?: (() => void) | (() => void)[];
86
+ created?: (() => void) | (() => void)[];
87
+ beforeMount?: (() => void) | (() => void)[];
88
+ mounted?: (() => void) | (() => void)[];
89
+ beforeUpdate?: (() => void) | (() => void)[];
90
+ updated?: (() => void) | (() => void)[];
91
+ activated?: (() => void) | (() => void)[];
92
+ deactivated?: (() => void) | (() => void)[];
93
+ beforeDestroy?: (() => void) | (() => void)[];
94
+ beforeUnmount?: (() => void) | (() => void)[];
95
+ destroyed?: (() => void) | (() => void)[];
96
+ unmounted?: (() => void) | (() => void)[];
97
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
98
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
99
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
100
+ };
101
+ $forceUpdate: () => void;
102
+ $nextTick: typeof import('vue').nextTick;
103
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
104
+ } & Readonly<{
105
+ layout: "h" | "v" | "inline";
106
+ hasRequired: boolean;
107
+ }> & Omit<Readonly<import('vue').ExtractPropTypes<{
108
+ model: {
109
+ type: ObjectConstructor;
110
+ };
111
+ hasRequired: {
112
+ type: BooleanConstructor;
113
+ default: boolean;
114
+ };
115
+ layout: {
116
+ type: import('vue').PropType<"h" | "v" | "inline">;
117
+ default: string;
118
+ };
119
+ labelAlign: {
120
+ type: import('vue').PropType<"top" | "center" | "bottom">;
121
+ };
122
+ labelJustify: {
123
+ type: import('vue').PropType<"left" | "center" | "right">;
124
+ };
125
+ labelWidth: {
126
+ type: StringConstructor;
127
+ };
128
+ }>> & Readonly<{
129
+ onClear?: ((filed?: string | string[] | undefined) => any) | undefined;
130
+ onReset?: ((filed?: string | string[] | undefined) => any) | undefined;
131
+ onSubmit?: ((results: import('@opensig/opendesign').FieldResultT[]) => any) | undefined;
132
+ onValidate?: ((results: import('@opensig/opendesign').FieldResultT[]) => any) | undefined;
133
+ }>, "hasRequired" | "layout" | "validate" | "resetFields" | "clearValidate"> & {
134
+ validate: (filed?: string | string[]) => Promise<import('@opensig/opendesign').FieldResultT[]>;
135
+ resetFields: (filed?: string | string[]) => void;
136
+ clearValidate: (filed?: string | string[], onClear?: (filed: import('@opensig/opendesign').FiledInfoT) => void) => void;
137
+ } & {} & import('vue').ComponentCustomProperties & {} & {
138
+ $slots: {
139
+ default?(_: {}): any;
140
+ };
141
+ }) | null;
142
+ recipientInputRef: HTMLInputElement;
143
+ }, HTMLFormElement>;
144
+ export default _default;
@@ -0,0 +1,221 @@
1
+ import { defineComponent, ref, computed, watch, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, toDisplayString, createElementBlock, Fragment, renderList, createTextVNode, withDirectives, withKeys, withModifiers, vModelText } from "vue";
2
+ import { useMessage, OForm, OFormItem, OTag, OInput, OScroller } from "@opensig/opendesign";
3
+ import { useScreen } from "@opendesign-plus/composables";
4
+ import { useMeetingConfig } from "./composables/useMeetingConfig.mjs";
5
+ import { EMAIL_REGEX } from "./config.mjs";
6
+ const _hoisted_1 = { class: "sender-text" };
7
+ const _hoisted_2 = ["placeholder", "onKeydown"];
8
+ const _hoisted_3 = { class: "email-body-content" };
9
+ const _sfc_main = /* @__PURE__ */ defineComponent({
10
+ __name: "OMeetingSendMinutesForm",
11
+ props: {
12
+ meeting: {},
13
+ prefill: {},
14
+ sendMinutesRequest: {}
15
+ },
16
+ emits: ["sent"],
17
+ setup(__props, { expose: __expose, emit: __emit }) {
18
+ const props = __props;
19
+ const emit = __emit;
20
+ const { t } = useMeetingConfig();
21
+ const { lePadV } = useScreen();
22
+ const message = useMessage(null);
23
+ const formModel = ref({
24
+ recipients: [],
25
+ subject: ""
26
+ });
27
+ const extraInput = ref("");
28
+ const sending = ref(false);
29
+ const recipientInputRef = ref(null);
30
+ const formRef = ref(null);
31
+ const rules = {
32
+ recipients: [{ required: true, message: t("meeting.sendMinutesEmptyRecipient") }],
33
+ subject: [
34
+ { required: true, message: t("meeting.sendMinutesSubjectPlaceholder") },
35
+ {
36
+ validator: (value) => {
37
+ if (value.length > 128) {
38
+ return {
39
+ type: "danger",
40
+ message: t("meeting.sendMinutesSubjectTooLong")
41
+ };
42
+ }
43
+ }
44
+ }
45
+ ]
46
+ };
47
+ const sender = computed(() => {
48
+ var _a;
49
+ return ((_a = props.meeting) == null ? void 0 : _a.sender) || "";
50
+ });
51
+ const defaultSubject = () => {
52
+ if (!props.meeting) return "";
53
+ const { topic, date } = props.meeting;
54
+ return t("meeting.sendMinutesSubjectDefault", [topic, date || ""]);
55
+ };
56
+ const normalizeRecipients = (source) => [...new Set(source.map((item) => item.trim()).filter(Boolean))];
57
+ const reset = () => {
58
+ var _a;
59
+ if (!props.meeting) return;
60
+ if (props.prefill && props.prefill.length) {
61
+ formModel.value.recipients = normalizeRecipients(props.prefill);
62
+ } else {
63
+ formModel.value.recipients = normalizeRecipients((props.meeting.email_list || "").split(/[,;,;]/));
64
+ }
65
+ formModel.value.subject = defaultSubject();
66
+ extraInput.value = "";
67
+ (_a = formRef.value) == null ? void 0 : _a.clearValidate();
68
+ };
69
+ watch([() => props.meeting, () => props.prefill], reset, { immediate: true });
70
+ const addRecipient = () => {
71
+ var _a;
72
+ const val = extraInput.value.trim();
73
+ if (!val) return;
74
+ if (!EMAIL_REGEX.test(val)) {
75
+ message.warning({ content: t("meeting.sendMinutesEmailInvalid") });
76
+ return;
77
+ }
78
+ if (formModel.value.recipients.includes(val)) {
79
+ message.warning({ content: t("meeting.sendMinutesEmailExists") });
80
+ return;
81
+ }
82
+ formModel.value.recipients.push(val);
83
+ extraInput.value = "";
84
+ (_a = formRef.value) == null ? void 0 : _a.clearValidate("recipients");
85
+ };
86
+ const removeRecipient = (email) => {
87
+ formModel.value.recipients = formModel.value.recipients.filter((r) => r !== email);
88
+ };
89
+ const handleBackspace = (e) => {
90
+ if (extraInput.value === "" && formModel.value.recipients.length > 0) {
91
+ e.preventDefault();
92
+ formModel.value.recipients.pop();
93
+ }
94
+ };
95
+ const focusRecipientInput = () => {
96
+ var _a;
97
+ (_a = recipientInputRef.value) == null ? void 0 : _a.focus();
98
+ };
99
+ const send = async () => {
100
+ var _a;
101
+ if (!props.meeting || !props.sendMinutesRequest) return;
102
+ const results = await ((_a = formRef.value) == null ? void 0 : _a.validate());
103
+ if (results == null ? void 0 : results.some((r) => !!r)) return;
104
+ try {
105
+ sending.value = true;
106
+ const log = await props.sendMinutesRequest(props.meeting.id, formModel.value.recipients, formModel.value.subject);
107
+ message.success({ content: t("meeting.sendMinutesSent") });
108
+ emit("sent", log);
109
+ } finally {
110
+ sending.value = false;
111
+ }
112
+ };
113
+ __expose({ send, sending, reset });
114
+ return (_ctx, _cache) => {
115
+ return openBlock(), createBlock(unref(OForm), {
116
+ ref_key: "formRef",
117
+ ref: formRef,
118
+ class: "o-meeting-send-minutes",
119
+ model: formModel.value,
120
+ "has-required": "",
121
+ layout: unref(lePadV) ? "v" : "h"
122
+ }, {
123
+ default: withCtx(() => [
124
+ createVNode(unref(OFormItem), {
125
+ label: unref(t)("meeting.sendMinutesSender"),
126
+ class: "text-item"
127
+ }, {
128
+ default: withCtx(() => [
129
+ createElementVNode("span", _hoisted_1, toDisplayString(sender.value), 1)
130
+ ]),
131
+ _: 1
132
+ }, 8, ["label"]),
133
+ createVNode(unref(OFormItem), {
134
+ label: unref(t)("meeting.sendMinutesRecipient"),
135
+ field: "recipients",
136
+ rules: rules.recipients
137
+ }, {
138
+ default: withCtx(() => [
139
+ createElementVNode("div", {
140
+ class: "o-meeting-send-minutes-recipient-editor",
141
+ onClick: focusRecipientInput
142
+ }, [
143
+ (openBlock(true), createElementBlock(Fragment, null, renderList(formModel.value.recipients, (email) => {
144
+ return openBlock(), createBlock(unref(OTag), {
145
+ key: email,
146
+ class: "recipient-tag",
147
+ variant: "solid",
148
+ color: "primary",
149
+ closable: "",
150
+ onClose: ($event) => removeRecipient(email)
151
+ }, {
152
+ default: withCtx(() => [
153
+ createTextVNode(toDisplayString(email), 1)
154
+ ]),
155
+ _: 2
156
+ }, 1032, ["onClose"]);
157
+ }), 128)),
158
+ withDirectives(createElementVNode("input", {
159
+ ref_key: "recipientInputRef",
160
+ ref: recipientInputRef,
161
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => extraInput.value = $event),
162
+ class: "recipient-native-input",
163
+ type: "text",
164
+ placeholder: unref(t)("meeting.sendMinutesRecipientPlaceholder"),
165
+ onKeydown: [
166
+ withKeys(withModifiers(addRecipient, ["prevent"]), ["enter"]),
167
+ withKeys(handleBackspace, ["backspace"])
168
+ ]
169
+ }, null, 40, _hoisted_2), [
170
+ [vModelText, extraInput.value]
171
+ ])
172
+ ])
173
+ ]),
174
+ _: 1
175
+ }, 8, ["label", "rules"]),
176
+ createVNode(unref(OFormItem), {
177
+ label: unref(t)("meeting.sendMinutesSubject"),
178
+ field: "subject",
179
+ rules: rules.subject
180
+ }, {
181
+ default: withCtx(() => [
182
+ createVNode(unref(OInput), {
183
+ modelValue: formModel.value.subject,
184
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formModel.value.subject = $event),
185
+ class: "subject-input",
186
+ size: "large",
187
+ placeholder: unref(t)("meeting.sendMinutesSubjectPlaceholder")
188
+ }, null, 8, ["modelValue", "placeholder"])
189
+ ]),
190
+ _: 1
191
+ }, 8, ["label", "rules"]),
192
+ createVNode(unref(OFormItem), {
193
+ label: unref(t)("meeting.sendMinutesBody"),
194
+ class: "text-item"
195
+ }, {
196
+ default: withCtx(() => [
197
+ createVNode(unref(OScroller), {
198
+ class: "o-meeting-send-minutes-email-body-scroller",
199
+ "disabled-x": "",
200
+ "show-type": "auto"
201
+ }, {
202
+ default: withCtx(() => {
203
+ var _a;
204
+ return [
205
+ createElementVNode("div", _hoisted_3, toDisplayString((_a = __props.meeting) == null ? void 0 : _a.minutes), 1)
206
+ ];
207
+ }),
208
+ _: 1
209
+ })
210
+ ]),
211
+ _: 1
212
+ }, 8, ["label"])
213
+ ]),
214
+ _: 1
215
+ }, 8, ["model", "layout"]);
216
+ };
217
+ }
218
+ });
219
+ export {
220
+ _sfc_main as default
221
+ };