@opendesign-plus-test/components 0.0.1-rc.119 → 0.0.1-rc.120

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.
@@ -149,6 +149,9 @@
149
149
  .o-sig-meeting-calendar .meeting-card-header .o-tab .o-tab-nav {
150
150
  padding-bottom: var(--o-gap-3);
151
151
  }
152
+ .o-sig-meeting-calendar .meeting-card-header .o-tab .o-tab-nav .o-icon svg path {
153
+ fill: currentColor;
154
+ }
152
155
  .o-sig-meeting-calendar .el-input__prefix {
153
156
  display: none;
154
157
  }
@@ -1,3 +1,4 @@
1
+ import { nextTick, ComponentPublicInstance } from 'vue';
1
2
  type __VLS_Props = {
2
3
  data: any[];
3
4
  current: number;
@@ -12,5 +13,178 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
12
13
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
13
14
  "onClick-date"?: ((...args: any[]) => any) | undefined;
14
15
  "onChange-month"?: ((...args: any[]) => any) | undefined;
15
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
16
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
17
+ scrollerRef: ({
18
+ $: import('vue').ComponentInternalInstance;
19
+ $data: {};
20
+ $props: Partial<{
21
+ size: "medium" | "small";
22
+ duration: number;
23
+ disabledX: boolean;
24
+ disabledY: boolean;
25
+ showType: "auto" | "always" | "never" | "hover";
26
+ autoUpdateOnScrollSize: boolean;
27
+ }> & Omit<{
28
+ readonly size: "small" | "medium";
29
+ readonly duration: number;
30
+ readonly disabledX: boolean;
31
+ readonly disabledY: boolean;
32
+ readonly showType: "auto" | "hover" | "always" | "never";
33
+ readonly autoUpdateOnScrollSize: boolean;
34
+ readonly wrapClass?: string | {
35
+ [k: string]: boolean;
36
+ } | (string | {
37
+ [k: string]: boolean;
38
+ })[] | undefined;
39
+ readonly barClass?: string | {
40
+ [k: string]: boolean;
41
+ } | (string | {
42
+ [k: string]: boolean;
43
+ })[] | undefined;
44
+ readonly onScroll?: ((event: Event) => any) | undefined | undefined;
45
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "size" | "duration" | "disabledX" | "disabledY" | "showType" | "autoUpdateOnScrollSize">;
46
+ $attrs: import('vue').Attrs;
47
+ $refs: {
48
+ [x: string]: unknown;
49
+ } & {
50
+ targetRef: HTMLDivElement;
51
+ };
52
+ $slots: Readonly<{
53
+ [name: string]: import('vue').Slot<any> | undefined;
54
+ }>;
55
+ $root: ComponentPublicInstance | null;
56
+ $parent: ComponentPublicInstance | null;
57
+ $host: Element | null;
58
+ $emit: (event: "scroll", event: Event) => void;
59
+ $el: HTMLDivElement;
60
+ $options: import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
61
+ wrapClass: {
62
+ type: import('vue').PropType<string | {
63
+ [k: string]: boolean;
64
+ } | Array<{
65
+ [k: string]: boolean;
66
+ } | string>>;
67
+ };
68
+ disabledX: {
69
+ type: BooleanConstructor;
70
+ required: false;
71
+ };
72
+ disabledY: {
73
+ type: BooleanConstructor;
74
+ };
75
+ duration: {
76
+ type: NumberConstructor;
77
+ default: number;
78
+ };
79
+ showType: {
80
+ type: import('vue').PropType<"auto" | "always" | "hover" | "never">;
81
+ default: string;
82
+ };
83
+ size: {
84
+ type: import('vue').PropType<import('@opensig/opendesign').ScrollerSizeT>;
85
+ default: string;
86
+ };
87
+ autoUpdateOnScrollSize: {
88
+ type: BooleanConstructor;
89
+ };
90
+ barClass: {
91
+ type: import('vue').PropType<string | {
92
+ [k: string]: boolean;
93
+ } | Array<{
94
+ [k: string]: boolean;
95
+ } | string>>;
96
+ };
97
+ }>> & Readonly<{
98
+ onScroll?: ((event: Event) => any) | undefined;
99
+ }>, {
100
+ scrollTo: (options?: ScrollToOptions | undefined) => void;
101
+ scrollBy: (options?: ScrollToOptions | undefined) => void;
102
+ getContainerEl(): HTMLElement | null;
103
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
104
+ scroll: (event: Event) => any;
105
+ }, string, {
106
+ size: "medium" | "small";
107
+ duration: number;
108
+ disabledX: boolean;
109
+ disabledY: boolean;
110
+ showType: "auto" | "always" | "never" | "hover";
111
+ autoUpdateOnScrollSize: boolean;
112
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
113
+ beforeCreate?: (() => void) | (() => void)[];
114
+ created?: (() => void) | (() => void)[];
115
+ beforeMount?: (() => void) | (() => void)[];
116
+ mounted?: (() => void) | (() => void)[];
117
+ beforeUpdate?: (() => void) | (() => void)[];
118
+ updated?: (() => void) | (() => void)[];
119
+ activated?: (() => void) | (() => void)[];
120
+ deactivated?: (() => void) | (() => void)[];
121
+ beforeDestroy?: (() => void) | (() => void)[];
122
+ beforeUnmount?: (() => void) | (() => void)[];
123
+ destroyed?: (() => void) | (() => void)[];
124
+ unmounted?: (() => void) | (() => void)[];
125
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
126
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
127
+ errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
128
+ };
129
+ $forceUpdate: () => void;
130
+ $nextTick: typeof nextTick;
131
+ $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;
132
+ } & Readonly<{
133
+ size: "medium" | "small";
134
+ duration: number;
135
+ disabledX: boolean;
136
+ disabledY: boolean;
137
+ showType: "auto" | "always" | "never" | "hover";
138
+ autoUpdateOnScrollSize: boolean;
139
+ }> & Omit<Readonly<import('vue').ExtractPropTypes<{
140
+ wrapClass: {
141
+ type: import('vue').PropType<string | {
142
+ [k: string]: boolean;
143
+ } | Array<{
144
+ [k: string]: boolean;
145
+ } | string>>;
146
+ };
147
+ disabledX: {
148
+ type: BooleanConstructor;
149
+ required: false;
150
+ };
151
+ disabledY: {
152
+ type: BooleanConstructor;
153
+ };
154
+ duration: {
155
+ type: NumberConstructor;
156
+ default: number;
157
+ };
158
+ showType: {
159
+ type: import('vue').PropType<"auto" | "always" | "hover" | "never">;
160
+ default: string;
161
+ };
162
+ size: {
163
+ type: import('vue').PropType<import('@opensig/opendesign').ScrollerSizeT>;
164
+ default: string;
165
+ };
166
+ autoUpdateOnScrollSize: {
167
+ type: BooleanConstructor;
168
+ };
169
+ barClass: {
170
+ type: import('vue').PropType<string | {
171
+ [k: string]: boolean;
172
+ } | Array<{
173
+ [k: string]: boolean;
174
+ } | string>>;
175
+ };
176
+ }>> & Readonly<{
177
+ onScroll?: ((event: Event) => any) | undefined;
178
+ }>, "size" | "duration" | "disabledX" | "disabledY" | "showType" | "autoUpdateOnScrollSize" | "scrollTo" | "scrollBy" | "getContainerEl"> & {
179
+ scrollTo: (options?: ScrollToOptions | undefined) => void;
180
+ scrollBy: (options?: ScrollToOptions | undefined) => void;
181
+ getContainerEl: () => HTMLElement | null;
182
+ } & {} & import('vue').ComponentCustomProperties & {} & {
183
+ $slots: {
184
+ default?(_: {}): any;
185
+ thumb?(_: {}): any;
186
+ track?(_: {}): any;
187
+ };
188
+ }) | null;
189
+ }, HTMLDivElement>;
16
190
  export default _default;
@@ -1,4 +1,4 @@
1
- import { defineComponent, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createElementVNode, toDisplayString, normalizeClass, createBlock, normalizeStyle, resolveDynamicComponent, createCommentVNode } from "vue";
1
+ import { defineComponent, ref, watch, nextTick, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createElementVNode, toDisplayString, normalizeClass, createBlock, normalizeStyle, resolveDynamicComponent, createCommentVNode } from "vue";
2
2
  import { OScroller, OIcon, OIconArrowLeft, OIconArrowRight } from "@opensig/opendesign";
3
3
  import { useMeetingConfig } from "../composables/useMeetingConfig.mjs";
4
4
  import { CalendarDataType } from "../types.mjs";
@@ -32,9 +32,40 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
32
32
  if (props.current + step >= props.total || props.current + step < 0) return;
33
33
  emits("change-month", step);
34
34
  };
35
+ const scrollerRef = ref(null);
36
+ const scrollToActiveTop = () => {
37
+ var _a, _b;
38
+ const containerEl = ((_b = (_a = scrollerRef.value) == null ? void 0 : _a.getContainerEl) == null ? void 0 : _b.call(_a)) ?? null;
39
+ if (!containerEl) return false;
40
+ const activeEl = containerEl.querySelector(".day-item.active");
41
+ if (!activeEl) return false;
42
+ const containerRect = containerEl.getBoundingClientRect();
43
+ const activeRect = activeEl.getBoundingClientRect();
44
+ containerEl.scrollTop += activeRect.top - containerRect.top;
45
+ return true;
46
+ };
47
+ let scrolled = false;
48
+ const stopActiveWatch = watch(
49
+ [() => props.active, () => props.data],
50
+ () => {
51
+ if (scrolled || !props.active) {
52
+ return;
53
+ }
54
+ nextTick(() => {
55
+ if (scrolled) return;
56
+ if (scrollToActiveTop()) {
57
+ scrolled = true;
58
+ stopActiveWatch();
59
+ }
60
+ });
61
+ },
62
+ { immediate: true, flush: "post" }
63
+ );
35
64
  return (_ctx, _cache) => {
36
65
  return openBlock(), createElementBlock("div", _hoisted_1, [
37
66
  createVNode(unref(OScroller), {
67
+ ref_key: "scrollerRef",
68
+ ref: scrollerRef,
38
69
  class: "month-wrapper",
39
70
  "show-type": "hover",
40
71
  size: "small"
@@ -91,7 +122,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
91
122
  }), 128))
92
123
  ]),
93
124
  _: 1
94
- }),
125
+ }, 512),
95
126
  createElementVNode("div", _hoisted_7, [
96
127
  createVNode(unref(OIcon), {
97
128
  onClick: _cache[0] || (_cache[0] = ($event) => changeMonth(0 - STEP)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendesign-plus-test/components",
3
- "version": "0.0.1-rc.119",
3
+ "version": "0.0.1-rc.120",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -45,8 +45,8 @@
45
45
  "vue-dompurify-html": "^3.1.2",
46
46
  "vue": "^3.5.13",
47
47
  "element-plus": "2.13.1",
48
- "@opendesign-plus/styles": "0.0.1-rc.2",
49
- "@opendesign-plus/composables": "0.0.1-rc.10"
48
+ "@opendesign-plus/composables": "0.0.1-rc.10",
49
+ "@opendesign-plus/styles": "0.0.1-rc.2"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@vitejs/plugin-vue": "^5.2.1",