@sellmate/design-system-vue 1.0.64 → 1.0.65
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.js +2 -0
- package/dist/sdModal.d.ts +2 -2
- package/dist/sdModal.js +4 -4
- package/lib/components.ts +2 -0
- package/lib/sdModal.ts +5 -5
- package/package.json +2 -2
package/dist/components.js
CHANGED
package/dist/sdModal.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare const SdModalVuePlugin: {
|
|
|
16
16
|
* 이 경우 `componentProps` 는 무시됩니다.
|
|
17
17
|
* - `component` 에 Vue 컴포넌트를 넘기면 `componentProps` 로 props 를 지정해
|
|
18
18
|
* 메인 앱 컨텍스트 안에서 렌더한 뒤 core 로 위임합니다.
|
|
19
|
-
* - `
|
|
19
|
+
* - `persistent` 는 core 옵션을 그대로 전달합니다.
|
|
20
20
|
*/
|
|
21
21
|
export interface SdModalCreateOption extends Omit<CoreSdModalCreateOption, 'component'> {
|
|
22
22
|
component: HTMLElement | Component;
|
|
@@ -26,7 +26,7 @@ export interface SdModalCreateOption extends Omit<CoreSdModalCreateOption, 'comp
|
|
|
26
26
|
* Vue-aware `sdModal`.
|
|
27
27
|
*
|
|
28
28
|
* - `sdModal.confirm(options)` — core 와 동일
|
|
29
|
-
* - `sdModal.create({ component, componentProps?,
|
|
29
|
+
* - `sdModal.create({ component, componentProps?, persistent? })` —
|
|
30
30
|
* `component` 가 HTMLElement 면 core 로 위임, Vue 컴포넌트면 메인 앱
|
|
31
31
|
* 컨텍스트 안에서 렌더한 뒤 위임합니다. 모달이 닫히면 자동으로 언마운트됩니다.
|
|
32
32
|
*
|
package/dist/sdModal.js
CHANGED
|
@@ -35,7 +35,7 @@ function mountVueComponent(component, componentProps) {
|
|
|
35
35
|
* Vue-aware `sdModal`.
|
|
36
36
|
*
|
|
37
37
|
* - `sdModal.confirm(options)` — core 와 동일
|
|
38
|
-
* - `sdModal.create({ component, componentProps?,
|
|
38
|
+
* - `sdModal.create({ component, componentProps?, persistent? })` —
|
|
39
39
|
* `component` 가 HTMLElement 면 core 로 위임, Vue 컴포넌트면 메인 앱
|
|
40
40
|
* 컨텍스트 안에서 렌더한 뒤 위임합니다. 모달이 닫히면 자동으로 언마운트됩니다.
|
|
41
41
|
*
|
|
@@ -54,15 +54,15 @@ export const sdModal = {
|
|
|
54
54
|
coreSdModal.configure(options);
|
|
55
55
|
},
|
|
56
56
|
create(input) {
|
|
57
|
-
const { component, componentProps = {},
|
|
57
|
+
const { component, componentProps = {}, persistent } = input;
|
|
58
58
|
// HTMLElement 오버로드: core 로 바로 위임
|
|
59
59
|
if (isHTMLElement(component)) {
|
|
60
|
-
return coreSdModal.create({ component,
|
|
60
|
+
return coreSdModal.create({ component, persistent });
|
|
61
61
|
}
|
|
62
62
|
// Vue 컴포넌트 오버로드 — modalRef 를 먼저 만들어 props 에 주입한 뒤 mount
|
|
63
63
|
const modalRef = _createSdModalRef();
|
|
64
64
|
const { el, host } = mountVueComponent(component, { ...componentProps, modalRef });
|
|
65
|
-
_attachSdModalWithRef(modalRef, { component: el,
|
|
65
|
+
_attachSdModalWithRef(modalRef, { component: el, persistent });
|
|
66
66
|
modalRef.onDismissed(() => {
|
|
67
67
|
render(null, host);
|
|
68
68
|
});
|
package/lib/components.ts
CHANGED
|
@@ -11,6 +11,8 @@ import type { JSX } from '@sellmate/design-system';
|
|
|
11
11
|
export const SdActionModal: StencilVueComponent<JSX.SdActionModal> = /*@__PURE__*/ defineContainer<JSX.SdActionModal>('sd-action-modal', undefined, [
|
|
12
12
|
'modalTitle',
|
|
13
13
|
'buttonProps',
|
|
14
|
+
'width',
|
|
15
|
+
'height',
|
|
14
16
|
'sdClose',
|
|
15
17
|
'sdOk'
|
|
16
18
|
], [
|
package/lib/sdModal.ts
CHANGED
|
@@ -37,7 +37,7 @@ let capturedContext: AppContext | null = null;
|
|
|
37
37
|
* 이 경우 `componentProps` 는 무시됩니다.
|
|
38
38
|
* - `component` 에 Vue 컴포넌트를 넘기면 `componentProps` 로 props 를 지정해
|
|
39
39
|
* 메인 앱 컨텍스트 안에서 렌더한 뒤 core 로 위임합니다.
|
|
40
|
-
* - `
|
|
40
|
+
* - `persistent` 는 core 옵션을 그대로 전달합니다.
|
|
41
41
|
*/
|
|
42
42
|
export interface SdModalCreateOption
|
|
43
43
|
extends Omit<CoreSdModalCreateOption, 'component'> {
|
|
@@ -80,7 +80,7 @@ function mountVueComponent(
|
|
|
80
80
|
* Vue-aware `sdModal`.
|
|
81
81
|
*
|
|
82
82
|
* - `sdModal.confirm(options)` — core 와 동일
|
|
83
|
-
* - `sdModal.create({ component, componentProps?,
|
|
83
|
+
* - `sdModal.create({ component, componentProps?, persistent? })` —
|
|
84
84
|
* `component` 가 HTMLElement 면 core 로 위임, Vue 컴포넌트면 메인 앱
|
|
85
85
|
* 컨텍스트 안에서 렌더한 뒤 위임합니다. 모달이 닫히면 자동으로 언마운트됩니다.
|
|
86
86
|
*
|
|
@@ -102,17 +102,17 @@ export const sdModal = {
|
|
|
102
102
|
},
|
|
103
103
|
|
|
104
104
|
create(input: SdModalCreateOption): ModalDialogRef {
|
|
105
|
-
const { component, componentProps = {},
|
|
105
|
+
const { component, componentProps = {}, persistent } = input;
|
|
106
106
|
|
|
107
107
|
// HTMLElement 오버로드: core 로 바로 위임
|
|
108
108
|
if (isHTMLElement(component)) {
|
|
109
|
-
return coreSdModal.create({ component,
|
|
109
|
+
return coreSdModal.create({ component, persistent });
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
// Vue 컴포넌트 오버로드 — modalRef 를 먼저 만들어 props 에 주입한 뒤 mount
|
|
113
113
|
const modalRef = _createSdModalRef();
|
|
114
114
|
const { el, host } = mountVueComponent(component, { ...componentProps, modalRef });
|
|
115
|
-
_attachSdModalWithRef(modalRef, { component: el,
|
|
115
|
+
_attachSdModalWithRef(modalRef, { component: el, persistent });
|
|
116
116
|
modalRef.onDismissed(() => {
|
|
117
117
|
render(null, host);
|
|
118
118
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sellmate/design-system-vue",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.65",
|
|
4
4
|
"description": "Design System - Vue Component Wrappers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"vue": "^3.4.38"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@sellmate/design-system": "^1.0.
|
|
48
|
+
"@sellmate/design-system": "^1.0.65",
|
|
49
49
|
"@stencil/vue-output-target": "^0.11.8"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|