@ng-nest/ui 21.0.12 → 22.0.0
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/fesm2022/ng-nest-ui-affix.mjs +12 -12
- package/fesm2022/ng-nest-ui-affix.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-alert.mjs +46 -34
- package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-anchor.mjs +43 -31
- package/fesm2022/ng-nest-ui-anchor.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-api.mjs +7 -7
- package/fesm2022/ng-nest-ui-attachments.mjs +74 -48
- package/fesm2022/ng-nest-ui-attachments.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-auto-complete.mjs +114 -70
- package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-avatar.mjs +47 -32
- package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-back-top.mjs +23 -18
- package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-badge.mjs +30 -23
- package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-base-form.mjs +75 -44
- package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-bubble.mjs +76 -48
- package/fesm2022/ng-nest-ui-bubble.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-button.mjs +53 -42
- package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-calendar.mjs +30 -20
- package/fesm2022/ng-nest-ui-calendar.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-card.mjs +21 -16
- package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-carousel.mjs +68 -46
- package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-cascade.mjs +121 -73
- package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-checkbox.mjs +54 -38
- package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-collapse.mjs +38 -30
- package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color-picker.mjs +119 -72
- package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color.mjs +22 -16
- package/fesm2022/ng-nest-ui-color.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-comment.mjs +23 -21
- package/fesm2022/ng-nest-ui-comment.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-container.mjs +40 -37
- package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-contextmenu.mjs +71 -45
- package/fesm2022/ng-nest-ui-contextmenu.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-core.mjs +24 -21
- package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-coversations.mjs +25 -18
- package/fesm2022/ng-nest-ui-coversations.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-crumb.mjs +15 -13
- package/fesm2022/ng-nest-ui-crumb.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-date-picker.mjs +425 -256
- package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-description.mjs +42 -31
- package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dialog.mjs +106 -82
- package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-divider.mjs +24 -17
- package/fesm2022/ng-nest-ui-divider.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-doc.mjs +7 -7
- package/fesm2022/ng-nest-ui-drag.mjs +10 -10
- package/fesm2022/ng-nest-ui-drawer.mjs +52 -43
- package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dropdown.mjs +94 -58
- package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-empty.mjs +14 -12
- package/fesm2022/ng-nest-ui-empty.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-examples.mjs +7 -7
- package/fesm2022/ng-nest-ui-find.mjs +111 -71
- package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-form.mjs +45 -33
- package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-highlight.mjs +26 -20
- package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-i18n.mjs +16 -15
- package/fesm2022/ng-nest-ui-i18n.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-icon.mjs +28 -21
- package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-image.mjs +57 -51
- package/fesm2022/ng-nest-ui-image.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-inner.mjs +11 -11
- package/fesm2022/ng-nest-ui-inner.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input-number.mjs +63 -42
- package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input.mjs +130 -85
- package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-keyword.mjs +19 -15
- package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-layout.mjs +37 -31
- package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-link.mjs +23 -18
- package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-list.mjs +137 -89
- package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-loading.mjs +36 -25
- package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-menu.mjs +68 -45
- package/fesm2022/ng-nest-ui-menu.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-message-box.mjs +10 -10
- package/fesm2022/ng-nest-ui-message.mjs +10 -10
- package/fesm2022/ng-nest-ui-notification.mjs +10 -10
- package/fesm2022/ng-nest-ui-outlet.mjs +11 -9
- package/fesm2022/ng-nest-ui-outlet.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-page-header.mjs +20 -15
- package/fesm2022/ng-nest-ui-page-header.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-pagination.mjs +69 -48
- package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-pattern.mjs +7 -7
- package/fesm2022/ng-nest-ui-popconfirm.mjs +40 -27
- package/fesm2022/ng-nest-ui-popconfirm.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-popover.mjs +57 -38
- package/fesm2022/ng-nest-ui-popover.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-portal.mjs +7 -7
- package/fesm2022/ng-nest-ui-progress.mjs +60 -41
- package/fesm2022/ng-nest-ui-progress.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-prompts.mjs +18 -15
- package/fesm2022/ng-nest-ui-prompts.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-radio.mjs +50 -35
- package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-rate.mjs +43 -29
- package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-resizable.mjs +18 -16
- package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-result.mjs +22 -16
- package/fesm2022/ng-nest-ui-result.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-ripple.mjs +14 -13
- package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-scrollable.mjs +41 -24
- package/fesm2022/ng-nest-ui-scrollable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-select.mjs +196 -117
- package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-sender.mjs +43 -31
- package/fesm2022/ng-nest-ui-sender.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-skeleton.mjs +17 -15
- package/fesm2022/ng-nest-ui-skeleton.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider-select.mjs +85 -53
- package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider.mjs +58 -37
- package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-splitter.mjs +32 -24
- package/fesm2022/ng-nest-ui-splitter.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-statistic.mjs +44 -30
- package/fesm2022/ng-nest-ui-statistic.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-steps.mjs +30 -22
- package/fesm2022/ng-nest-ui-steps.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-suggestion.mjs +23 -20
- package/fesm2022/ng-nest-ui-suggestion.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-switch.mjs +35 -25
- package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table-view.mjs +78 -69
- package/fesm2022/ng-nest-ui-table-view.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table.mjs +320 -205
- package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tabs.mjs +74 -56
- package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tag.mjs +30 -23
- package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-text-retract.mjs +19 -15
- package/fesm2022/ng-nest-ui-text-retract.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-textarea.mjs +69 -44
- package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-theme.mjs +34 -23
- package/fesm2022/ng-nest-ui-theme.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-thought-chain.mjs +26 -19
- package/fesm2022/ng-nest-ui-thought-chain.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-ago.mjs +7 -7
- package/fesm2022/ng-nest-ui-time-picker.mjs +164 -96
- package/fesm2022/ng-nest-ui-time-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-range.mjs +7 -7
- package/fesm2022/ng-nest-ui-timeline.mjs +26 -19
- package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tooltip.mjs +53 -35
- package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-transfer.mjs +66 -40
- package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-file.mjs +39 -28
- package/fesm2022/ng-nest-ui-tree-file.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-select.mjs +186 -111
- package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree.mjs +166 -105
- package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-typography.mjs +16 -13
- package/fesm2022/ng-nest-ui-typography.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-upload.mjs +81 -53
- package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-watermark.mjs +44 -34
- package/fesm2022/ng-nest-ui-watermark.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-welcome.mjs +22 -16
- package/fesm2022/ng-nest-ui-welcome.mjs.map +1 -1
- package/package.json +3 -2
- package/types/ng-nest-ui-base-form.d.ts +3 -3
- package/types/ng-nest-ui-carousel.d.ts +1 -1
- package/types/ng-nest-ui-container.d.ts +1 -1
- package/types/ng-nest-ui-core.d.ts +1 -1
- package/types/ng-nest-ui-dialog.d.ts +1 -1
- package/types/ng-nest-ui-drawer.d.ts +1 -1
- package/types/ng-nest-ui-form.d.ts +12 -12
- package/types/ng-nest-ui-layout.d.ts +1 -1
- package/types/ng-nest-ui-list.d.ts +1 -1
- package/types/ng-nest-ui-portal.d.ts +3 -3
- package/types/ng-nest-ui-table-view.d.ts +1 -1
- package/types/ng-nest-ui-table.d.ts +1 -1
- package/types/ng-nest-ui-tabs.d.ts +1 -1
- package/types/ng-nest-ui-tree.d.ts +1 -1
|
@@ -27,67 +27,76 @@ class XPopconfirmProperty extends XPropertyFunction(X_POPCONFIRM_CONFIG_NAME) {
|
|
|
27
27
|
* @zh_CN 标题,支持自定义模板
|
|
28
28
|
* @en_US Title, support custom template
|
|
29
29
|
*/
|
|
30
|
-
this.title = input('',
|
|
30
|
+
this.title = input('', /* @ts-ignore */
|
|
31
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
31
32
|
/**
|
|
32
33
|
* @zh_CN 内容,支持自定义模板
|
|
33
34
|
* @en_US Content, support custom templates
|
|
34
35
|
*/
|
|
35
|
-
this.content = input('',
|
|
36
|
+
this.content = input('', /* @ts-ignore */
|
|
37
|
+
...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
36
38
|
/**
|
|
37
39
|
* @zh_CN 弹出的位置
|
|
38
40
|
* @en_US Pop-up position
|
|
39
41
|
*/
|
|
40
|
-
this.placement = input(this.config?.placement ?? 'bottom',
|
|
42
|
+
this.placement = input(this.config?.placement ?? 'bottom', /* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
41
44
|
/**
|
|
42
45
|
* @zh_CN 激活方式
|
|
43
46
|
* @en_US Activation method
|
|
44
47
|
*/
|
|
45
|
-
this.trigger = input(this.config?.trigger ?? 'click',
|
|
48
|
+
this.trigger = input(this.config?.trigger ?? 'click', /* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []));
|
|
46
50
|
/**
|
|
47
51
|
* @zh_CN 宽度
|
|
48
52
|
* @en_US width
|
|
49
53
|
*/
|
|
50
|
-
this.width = input(this.config?.width ?? '', { ...(ngDevMode ? { debugName: "width" } : {}), transform: XToCssPixelValue });
|
|
54
|
+
this.width = input(this.config?.width ?? '', { ...(ngDevMode ? { debugName: "width" } : /* istanbul ignore next */ {}), transform: XToCssPixelValue });
|
|
51
55
|
/**
|
|
52
56
|
* @zh_CN 最大宽度
|
|
53
57
|
* @en_US Max width
|
|
54
58
|
*/
|
|
55
|
-
this.maxWidth = input(this.config?.maxWidth ?? '15rem', { ...(ngDevMode ? { debugName: "maxWidth" } : {}), transform: XToCssPixelValue });
|
|
59
|
+
this.maxWidth = input(this.config?.maxWidth ?? '15rem', { ...(ngDevMode ? { debugName: "maxWidth" } : /* istanbul ignore next */ {}), transform: XToCssPixelValue });
|
|
56
60
|
/**
|
|
57
61
|
* @zh_CN 最小宽度
|
|
58
62
|
* @en_US Min width
|
|
59
63
|
*/
|
|
60
|
-
this.minWidth = input(this.config?.minWidth ?? '15rem', { ...(ngDevMode ? { debugName: "minWidth" } : {}), transform: XToCssPixelValue });
|
|
64
|
+
this.minWidth = input(this.config?.minWidth ?? '15rem', { ...(ngDevMode ? { debugName: "minWidth" } : /* istanbul ignore next */ {}), transform: XToCssPixelValue });
|
|
61
65
|
/**
|
|
62
66
|
* @zh_CN 图标
|
|
63
67
|
* @en_US Icon
|
|
64
68
|
*/
|
|
65
|
-
this.icon = input(this.config?.icon ?? 'fto-help-circle',
|
|
69
|
+
this.icon = input(this.config?.icon ?? 'fto-help-circle', /* @ts-ignore */
|
|
70
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
66
71
|
/**
|
|
67
72
|
* @zh_CN 图标颜色
|
|
68
73
|
* @en_US Icon color
|
|
69
74
|
*/
|
|
70
|
-
this.iconColor = input(this.config?.iconColor ?? '#e6a23c',
|
|
75
|
+
this.iconColor = input(this.config?.iconColor ?? '#e6a23c', /* @ts-ignore */
|
|
76
|
+
...(ngDevMode ? [{ debugName: "iconColor" }] : /* istanbul ignore next */ []));
|
|
71
77
|
/**
|
|
72
78
|
* @zh_CN 取消的文字
|
|
73
79
|
* @en_US Canceled text
|
|
74
80
|
*/
|
|
75
|
-
this.cancelText = input(this.config?.cancelText ?? '',
|
|
81
|
+
this.cancelText = input(this.config?.cancelText ?? '', /* @ts-ignore */
|
|
82
|
+
...(ngDevMode ? [{ debugName: "cancelText" }] : /* istanbul ignore next */ []));
|
|
76
83
|
/**
|
|
77
84
|
* @zh_CN 确认的文字
|
|
78
85
|
* @en_US Confirmed text
|
|
79
86
|
*/
|
|
80
|
-
this.confirmText = input(this.config?.confirmText ?? '',
|
|
87
|
+
this.confirmText = input(this.config?.confirmText ?? '', /* @ts-ignore */
|
|
88
|
+
...(ngDevMode ? [{ debugName: "confirmText" }] : /* istanbul ignore next */ []));
|
|
81
89
|
/**
|
|
82
90
|
* @zh_CN 确认异步 Observable
|
|
83
91
|
* @en_US Confirm async
|
|
84
92
|
*/
|
|
85
|
-
this.confirmAsync = input(
|
|
93
|
+
this.confirmAsync = input(/* @ts-ignore */
|
|
94
|
+
...(ngDevMode ? [undefined, { debugName: "confirmAsync" }] : /* istanbul ignore next */ []));
|
|
86
95
|
/**
|
|
87
96
|
* @zh_CN 条件触发
|
|
88
97
|
* @en_US condition trigger
|
|
89
98
|
*/
|
|
90
|
-
this.condition = input(false, { ...(ngDevMode ? { debugName: "condition" } : {}), transform: XToBoolean });
|
|
99
|
+
this.condition = input(false, { ...(ngDevMode ? { debugName: "condition" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
91
100
|
/**
|
|
92
101
|
* @zh_CN 取消的点击事件
|
|
93
102
|
* @en_US Cancelled click event
|
|
@@ -99,10 +108,10 @@ class XPopconfirmProperty extends XPropertyFunction(X_POPCONFIRM_CONFIG_NAME) {
|
|
|
99
108
|
*/
|
|
100
109
|
this.confirm = output();
|
|
101
110
|
}
|
|
102
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
103
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
111
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XPopconfirmProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
112
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: XPopconfirmProperty, isStandalone: true, selector: "x-popconfirm-property", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null }, cancelText: { classPropertyName: "cancelText", publicName: "cancelText", isSignal: true, isRequired: false, transformFunction: null }, confirmText: { classPropertyName: "confirmText", publicName: "confirmText", isSignal: true, isRequired: false, transformFunction: null }, confirmAsync: { classPropertyName: "confirmAsync", publicName: "confirmAsync", isSignal: true, isRequired: false, transformFunction: null }, condition: { classPropertyName: "condition", publicName: "condition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cancel: "cancel", confirm: "confirm" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
104
113
|
}
|
|
105
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XPopconfirmProperty, decorators: [{
|
|
106
115
|
type: Component,
|
|
107
116
|
args: [{ selector: `${XPopconfirmPrefix}-property`, template: '' }]
|
|
108
117
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "trigger", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconColor", required: false }] }], cancelText: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelText", required: false }] }], confirmText: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmText", required: false }] }], confirmAsync: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmAsync", required: false }] }], condition: [{ type: i0.Input, args: [{ isSignal: true, alias: "condition", required: false }] }], cancel: [{ type: i0.Output, args: ["cancel"] }], confirm: [{ type: i0.Output, args: ["confirm"] }] } });
|
|
@@ -111,14 +120,18 @@ class XPopconfirmComponent extends XPopconfirmProperty {
|
|
|
111
120
|
constructor() {
|
|
112
121
|
super(...arguments);
|
|
113
122
|
this.i18n = inject(XI18nService);
|
|
114
|
-
this.visible = signal(false,
|
|
115
|
-
|
|
123
|
+
this.visible = signal(false, /* @ts-ignore */
|
|
124
|
+
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
125
|
+
this.loading = signal(false, /* @ts-ignore */
|
|
126
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
116
127
|
this.asyncUnSub = new Subject();
|
|
117
128
|
this.locale = toSignal(this.i18n.localeChange.pipe(map((x) => x.popconfirm)), {
|
|
118
129
|
initialValue: zh_CN.popconfirm
|
|
119
130
|
});
|
|
120
|
-
this.cancelTextSignal = computed(() => this.cancelText() || this.locale().cancelText,
|
|
121
|
-
|
|
131
|
+
this.cancelTextSignal = computed(() => this.cancelText() || this.locale().cancelText, /* @ts-ignore */
|
|
132
|
+
...(ngDevMode ? [{ debugName: "cancelTextSignal" }] : /* istanbul ignore next */ []));
|
|
133
|
+
this.confirmTextSignal = computed(() => this.confirmText() || this.locale().confirmText, /* @ts-ignore */
|
|
134
|
+
...(ngDevMode ? [{ debugName: "confirmTextSignal" }] : /* istanbul ignore next */ []));
|
|
122
135
|
}
|
|
123
136
|
ngOnDestroy() {
|
|
124
137
|
this.asyncUnSub.next();
|
|
@@ -147,20 +160,20 @@ class XPopconfirmComponent extends XPopconfirmProperty {
|
|
|
147
160
|
onClick(event) {
|
|
148
161
|
this.condition() && this.onConfirm(event);
|
|
149
162
|
}
|
|
150
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
151
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
163
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XPopconfirmComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
164
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: XPopconfirmComponent, isStandalone: true, selector: "x-popconfirm", usesInheritance: true, ngImport: i0, template: "<div\r\n #popconfirm\r\n class=\"x-popconfirm\"\r\n x-popover\r\n [title]=\"titleTpl\"\r\n [content]=\"content()\"\r\n [footer]=\"footerTpl\"\r\n [placement]=\"placement()\"\r\n [trigger]=\"trigger()\"\r\n [width]=\"width()\"\r\n [maxWidth]=\"maxWidth()\"\r\n [minWidth]=\"minWidth()\"\r\n [condition]=\"condition()\"\r\n [(visible)]=\"visible\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n<ng-template #titleTpl>\r\n <div class=\"x-popconfirm-title\">\r\n <ng-container *xOutlet=\"title()\">\r\n @if (icon()) {\r\n <x-icon [style.color]=\"iconColor()\" [type]=\"icon()\"></x-icon>\r\n }\r\n <span>{{ title() }}</span>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #footerTpl>\r\n <div class=\"x-popconfirm-buttons\">\r\n <x-button class=\"x-popconfirm-cancel\" (click)=\"onCancel($event)\" flat plain>{{ cancelTextSignal() }}</x-button>\r\n <x-button class=\"x-popconfirm-confirm\" type=\"primary\" flat (click)=\"onConfirm($event)\" [loading]=\"loading()\">{{\r\n confirmTextSignal()\r\n }}</x-button>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-popconfirm{margin:0;padding:0}.x-popconfirm{display:inline-block}.x-popconfirm-buttons{display:flex;justify-content:flex-end}.x-popconfirm-buttons>x-button:not(:first-child){margin-left:.5rem}.x-popconfirm-title{display:flex;align-items:center}.x-popconfirm-title>.x-icon{margin-right:.325rem;font-size:1rem}\n"], dependencies: [{ kind: "directive", type: XPopoverDirective, selector: "[x-popover], x-popover" }, { kind: "component", type: XButtonComponent, selector: "x-button" }, { kind: "component", type: XIconComponent, selector: "x-icon" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
152
165
|
}
|
|
153
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XPopconfirmComponent, decorators: [{
|
|
154
167
|
type: Component,
|
|
155
168
|
args: [{ selector: `${XPopconfirmPrefix}`, imports: [XPopoverDirective, XButtonComponent, XIconComponent, XOutletDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n #popconfirm\r\n class=\"x-popconfirm\"\r\n x-popover\r\n [title]=\"titleTpl\"\r\n [content]=\"content()\"\r\n [footer]=\"footerTpl\"\r\n [placement]=\"placement()\"\r\n [trigger]=\"trigger()\"\r\n [width]=\"width()\"\r\n [maxWidth]=\"maxWidth()\"\r\n [minWidth]=\"minWidth()\"\r\n [condition]=\"condition()\"\r\n [(visible)]=\"visible\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n<ng-template #titleTpl>\r\n <div class=\"x-popconfirm-title\">\r\n <ng-container *xOutlet=\"title()\">\r\n @if (icon()) {\r\n <x-icon [style.color]=\"iconColor()\" [type]=\"icon()\"></x-icon>\r\n }\r\n <span>{{ title() }}</span>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #footerTpl>\r\n <div class=\"x-popconfirm-buttons\">\r\n <x-button class=\"x-popconfirm-cancel\" (click)=\"onCancel($event)\" flat plain>{{ cancelTextSignal() }}</x-button>\r\n <x-button class=\"x-popconfirm-confirm\" type=\"primary\" flat (click)=\"onConfirm($event)\" [loading]=\"loading()\">{{\r\n confirmTextSignal()\r\n }}</x-button>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-popconfirm{margin:0;padding:0}.x-popconfirm{display:inline-block}.x-popconfirm-buttons{display:flex;justify-content:flex-end}.x-popconfirm-buttons>x-button:not(:first-child){margin-left:.5rem}.x-popconfirm-title{display:flex;align-items:center}.x-popconfirm-title>.x-icon{margin-right:.325rem;font-size:1rem}\n"] }]
|
|
156
169
|
}] });
|
|
157
170
|
|
|
158
171
|
class XPopconfirmModule {
|
|
159
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
160
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
161
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
172
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XPopconfirmModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
173
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: XPopconfirmModule, imports: [XPopconfirmComponent], exports: [XPopconfirmComponent] }); }
|
|
174
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XPopconfirmModule, imports: [XPopconfirmComponent] }); }
|
|
162
175
|
}
|
|
163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XPopconfirmModule, decorators: [{
|
|
164
177
|
type: NgModule,
|
|
165
178
|
args: [{
|
|
166
179
|
exports: [XPopconfirmComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-popconfirm.mjs","sources":["../../../../lib/ng-nest/ui/popconfirm/popconfirm.property.ts","../../../../lib/ng-nest/ui/popconfirm/popconfirm.component.ts","../../../../lib/ng-nest/ui/popconfirm/popconfirm.component.html","../../../../lib/ng-nest/ui/popconfirm/popconfirm.module.ts","../../../../lib/ng-nest/ui/popconfirm/ng-nest-ui-popconfirm.ts"],"sourcesContent":["import { XPropertyFunction, XToCssPixelValue, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, input, output } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport type { XPopoverTrigger } from '@ng-nest/ui/popover';\r\nimport type { XPlacement, XTemplate, XBoolean, XNumber } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Popconfirm\r\n * @selector x-popconfirm\r\n * @decorator component\r\n */\r\nexport const XPopconfirmPrefix = 'x-popconfirm';\r\nconst X_POPCONFIRM_CONFIG_NAME = 'popconfirm';\r\n\r\n/**\r\n * Popconfirm Property\r\n */\r\n@Component({ selector: `${XPopconfirmPrefix}-property`, template: '' })\r\nexport class XPopconfirmProperty extends XPropertyFunction(X_POPCONFIRM_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 标题,支持自定义模板\r\n * @en_US Title, support custom template\r\n */\r\n readonly title = input<XTemplate>('');\r\n /**\r\n * @zh_CN 内容,支持自定义模板\r\n * @en_US Content, support custom templates\r\n */\r\n readonly content = input<XTemplate>('');\r\n /**\r\n * @zh_CN 弹出的位置\r\n * @en_US Pop-up position\r\n */\r\n readonly placement = input<XPlacement>(this.config?.placement ?? 'bottom');\r\n /**\r\n * @zh_CN 激活方式\r\n * @en_US Activation method\r\n */\r\n readonly trigger = input<XPopoverTrigger>(this.config?.trigger ?? 'click');\r\n /**\r\n * @zh_CN 宽度\r\n * @en_US width\r\n */\r\n readonly width = input<string, XNumber>(this.config?.width ?? '', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 最大宽度\r\n * @en_US Max width\r\n */\r\n readonly maxWidth = input<string, XNumber>(this.config?.maxWidth ?? '15rem', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 最小宽度\r\n * @en_US Min width\r\n */\r\n readonly minWidth = input<string, XNumber>(this.config?.minWidth ?? '15rem', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n readonly icon = input<string>(this.config?.icon ?? 'fto-help-circle');\r\n /**\r\n * @zh_CN 图标颜色\r\n * @en_US Icon color\r\n */\r\n readonly iconColor = input<string>(this.config?.iconColor ?? '#e6a23c');\r\n /**\r\n * @zh_CN 取消的文字\r\n * @en_US Canceled text\r\n */\r\n readonly cancelText = input<string>(this.config?.cancelText ?? '');\r\n /**\r\n * @zh_CN 确认的文字\r\n * @en_US Confirmed text\r\n */\r\n readonly confirmText = input<string>(this.config?.confirmText ?? '');\r\n /**\r\n * @zh_CN 确认异步 Observable\r\n * @en_US Confirm async\r\n */\r\n readonly confirmAsync = input<Observable<void>>();\r\n /**\r\n * @zh_CN 条件触发\r\n * @en_US condition trigger\r\n */\r\n readonly condition = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 取消的点击事件\r\n * @en_US Cancelled click event\r\n */\r\n readonly cancel = output<Event>();\r\n /**\r\n * @zh_CN 确认的点击事件\r\n * @en_US Confirmed click event\r\n */\r\n readonly confirm = output<Event>();\r\n}\r\n","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n OnDestroy,\r\n inject,\r\n computed,\r\n signal\r\n} from '@angular/core';\r\nimport { XPopconfirmProperty, XPopconfirmPrefix } from './popconfirm.property';\r\nimport { Subject } from 'rxjs';\r\nimport { XI18nService, XI18nPopconfirm, zh_CN } from '@ng-nest/ui/i18n';\r\nimport { map, takeUntil } from 'rxjs/operators';\r\nimport { XPopoverDirective } from '@ng-nest/ui/popover';\r\nimport { XButtonComponent } from '@ng-nest/ui/button';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { toSignal } from '@angular/core/rxjs-interop';\r\n\r\n@Component({\r\n selector: `${XPopconfirmPrefix}`,\r\n imports: [XPopoverDirective, XButtonComponent, XIconComponent, XOutletDirective],\r\n templateUrl: './popconfirm.component.html',\r\n styleUrls: ['./popconfirm.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XPopconfirmComponent extends XPopconfirmProperty implements OnDestroy {\r\n private i18n = inject(XI18nService);\r\n visible = signal(false);\r\n loading = signal(false);\r\n\r\n private asyncUnSub = new Subject<void>();\r\n\r\n locale = toSignal(this.i18n.localeChange.pipe(map((x) => x.popconfirm as XI18nPopconfirm)), {\r\n initialValue: zh_CN.popconfirm\r\n });\r\n\r\n cancelTextSignal = computed(() => this.cancelText() || this.locale().cancelText);\r\n confirmTextSignal = computed(() => this.confirmText() || this.locale().confirmText);\r\n\r\n ngOnDestroy(): void {\r\n this.asyncUnSub.next();\r\n this.asyncUnSub.complete();\r\n }\r\n\r\n onCancel(event: Event) {\r\n this.visible.set(false);\r\n this.cancel.emit(event);\r\n }\r\n\r\n onConfirm(event: Event) {\r\n const confirmAsync = this.confirmAsync();\r\n if (confirmAsync) {\r\n this.loading.set(true);\r\n confirmAsync.pipe(takeUntil(this.asyncUnSub)).subscribe(() => {\r\n this.loading.set(false);\r\n this.visible.set(false);\r\n this.confirm.emit(event);\r\n this.asyncUnSub.next();\r\n });\r\n } else {\r\n this.visible.set(false);\r\n this.confirm.emit(event);\r\n }\r\n }\r\n\r\n onClick(event: Event) {\r\n this.condition() && this.onConfirm(event);\r\n }\r\n}\r\n","<div\r\n #popconfirm\r\n class=\"x-popconfirm\"\r\n x-popover\r\n [title]=\"titleTpl\"\r\n [content]=\"content()\"\r\n [footer]=\"footerTpl\"\r\n [placement]=\"placement()\"\r\n [trigger]=\"trigger()\"\r\n [width]=\"width()\"\r\n [maxWidth]=\"maxWidth()\"\r\n [minWidth]=\"minWidth()\"\r\n [condition]=\"condition()\"\r\n [(visible)]=\"visible\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n<ng-template #titleTpl>\r\n <div class=\"x-popconfirm-title\">\r\n <ng-container *xOutlet=\"title()\">\r\n @if (icon()) {\r\n <x-icon [style.color]=\"iconColor()\" [type]=\"icon()\"></x-icon>\r\n }\r\n <span>{{ title() }}</span>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #footerTpl>\r\n <div class=\"x-popconfirm-buttons\">\r\n <x-button class=\"x-popconfirm-cancel\" (click)=\"onCancel($event)\" flat plain>{{ cancelTextSignal() }}</x-button>\r\n <x-button class=\"x-popconfirm-confirm\" type=\"primary\" flat (click)=\"onConfirm($event)\" [loading]=\"loading()\">{{\r\n confirmTextSignal()\r\n }}</x-button>\r\n </div>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { XPopconfirmComponent } from './popconfirm.component';\r\n\r\n@NgModule({\r\n exports: [XPopconfirmComponent],\r\n imports: [XPopconfirmComponent]\r\n})\r\nexport class XPopconfirmModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAMA;;;;AAIG;AACI,MAAM,iBAAiB,GAAG;AACjC,MAAM,wBAAwB,GAAG,YAAY;AAE7C;;AAEG;MAEU,mBAAoB,SAAQ,iBAAiB,CAAC,wBAAwB,CAAC,CAAA;AADpF,IAAA,WAAA,GAAA;;AAEE;;;AAGG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAY,EAAE,iDAAC;AACrC;;;AAGG;AACM,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAY,EAAE,mDAAC;AACvC;;;AAGG;QACM,IAAA,CAAA,SAAS,GAAG,KAAK,CAAa,IAAI,CAAC,MAAM,EAAE,SAAS,IAAI,QAAQ,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;AAC1E;;;AAGG;QACM,I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../../../lib/ng-nest/ui/popconfirm/popconfirm.component.html","../../../../lib/ng-nest/ui/popconfirm/popconfirm.module.ts","../../../../lib/ng-nest/ui/popconfirm/ng-nest-ui-popconfirm.ts"],"sourcesContent":["import { XPropertyFunction, XToCssPixelValue, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, input, output } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport type { XPopoverTrigger } from '@ng-nest/ui/popover';\r\nimport type { XPlacement, XTemplate, XBoolean, XNumber } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Popconfirm\r\n * @selector x-popconfirm\r\n * @decorator component\r\n */\r\nexport const XPopconfirmPrefix = 'x-popconfirm';\r\nconst X_POPCONFIRM_CONFIG_NAME = 'popconfirm';\r\n\r\n/**\r\n * Popconfirm Property\r\n */\r\n@Component({ selector: `${XPopconfirmPrefix}-property`, template: '' })\r\nexport class XPopconfirmProperty extends XPropertyFunction(X_POPCONFIRM_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 标题,支持自定义模板\r\n * @en_US Title, support custom template\r\n */\r\n readonly title = input<XTemplate>('');\r\n /**\r\n * @zh_CN 内容,支持自定义模板\r\n * @en_US Content, support custom templates\r\n */\r\n readonly content = input<XTemplate>('');\r\n /**\r\n * @zh_CN 弹出的位置\r\n * @en_US Pop-up position\r\n */\r\n readonly placement = input<XPlacement>(this.config?.placement ?? 'bottom');\r\n /**\r\n * @zh_CN 激活方式\r\n * @en_US Activation method\r\n */\r\n readonly trigger = input<XPopoverTrigger>(this.config?.trigger ?? 'click');\r\n /**\r\n * @zh_CN 宽度\r\n * @en_US width\r\n */\r\n readonly width = input<string, XNumber>(this.config?.width ?? '', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 最大宽度\r\n * @en_US Max width\r\n */\r\n readonly maxWidth = input<string, XNumber>(this.config?.maxWidth ?? '15rem', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 最小宽度\r\n * @en_US Min width\r\n */\r\n readonly minWidth = input<string, XNumber>(this.config?.minWidth ?? '15rem', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n readonly icon = input<string>(this.config?.icon ?? 'fto-help-circle');\r\n /**\r\n * @zh_CN 图标颜色\r\n * @en_US Icon color\r\n */\r\n readonly iconColor = input<string>(this.config?.iconColor ?? '#e6a23c');\r\n /**\r\n * @zh_CN 取消的文字\r\n * @en_US Canceled text\r\n */\r\n readonly cancelText = input<string>(this.config?.cancelText ?? '');\r\n /**\r\n * @zh_CN 确认的文字\r\n * @en_US Confirmed text\r\n */\r\n readonly confirmText = input<string>(this.config?.confirmText ?? '');\r\n /**\r\n * @zh_CN 确认异步 Observable\r\n * @en_US Confirm async\r\n */\r\n readonly confirmAsync = input<Observable<void>>();\r\n /**\r\n * @zh_CN 条件触发\r\n * @en_US condition trigger\r\n */\r\n readonly condition = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 取消的点击事件\r\n * @en_US Cancelled click event\r\n */\r\n readonly cancel = output<Event>();\r\n /**\r\n * @zh_CN 确认的点击事件\r\n * @en_US Confirmed click event\r\n */\r\n readonly confirm = output<Event>();\r\n}\r\n","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n OnDestroy,\r\n inject,\r\n computed,\r\n signal\r\n} from '@angular/core';\r\nimport { XPopconfirmProperty, XPopconfirmPrefix } from './popconfirm.property';\r\nimport { Subject } from 'rxjs';\r\nimport { XI18nService, XI18nPopconfirm, zh_CN } from '@ng-nest/ui/i18n';\r\nimport { map, takeUntil } from 'rxjs/operators';\r\nimport { XPopoverDirective } from '@ng-nest/ui/popover';\r\nimport { XButtonComponent } from '@ng-nest/ui/button';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { toSignal } from '@angular/core/rxjs-interop';\r\n\r\n@Component({\r\n selector: `${XPopconfirmPrefix}`,\r\n imports: [XPopoverDirective, XButtonComponent, XIconComponent, XOutletDirective],\r\n templateUrl: './popconfirm.component.html',\r\n styleUrls: ['./popconfirm.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XPopconfirmComponent extends XPopconfirmProperty implements OnDestroy {\r\n private i18n = inject(XI18nService);\r\n visible = signal(false);\r\n loading = signal(false);\r\n\r\n private asyncUnSub = new Subject<void>();\r\n\r\n locale = toSignal(this.i18n.localeChange.pipe(map((x) => x.popconfirm as XI18nPopconfirm)), {\r\n initialValue: zh_CN.popconfirm\r\n });\r\n\r\n cancelTextSignal = computed(() => this.cancelText() || this.locale().cancelText);\r\n confirmTextSignal = computed(() => this.confirmText() || this.locale().confirmText);\r\n\r\n ngOnDestroy(): void {\r\n this.asyncUnSub.next();\r\n this.asyncUnSub.complete();\r\n }\r\n\r\n onCancel(event: Event) {\r\n this.visible.set(false);\r\n this.cancel.emit(event);\r\n }\r\n\r\n onConfirm(event: Event) {\r\n const confirmAsync = this.confirmAsync();\r\n if (confirmAsync) {\r\n this.loading.set(true);\r\n confirmAsync.pipe(takeUntil(this.asyncUnSub)).subscribe(() => {\r\n this.loading.set(false);\r\n this.visible.set(false);\r\n this.confirm.emit(event);\r\n this.asyncUnSub.next();\r\n });\r\n } else {\r\n this.visible.set(false);\r\n this.confirm.emit(event);\r\n }\r\n }\r\n\r\n onClick(event: Event) {\r\n this.condition() && this.onConfirm(event);\r\n }\r\n}\r\n","<div\r\n #popconfirm\r\n class=\"x-popconfirm\"\r\n x-popover\r\n [title]=\"titleTpl\"\r\n [content]=\"content()\"\r\n [footer]=\"footerTpl\"\r\n [placement]=\"placement()\"\r\n [trigger]=\"trigger()\"\r\n [width]=\"width()\"\r\n [maxWidth]=\"maxWidth()\"\r\n [minWidth]=\"minWidth()\"\r\n [condition]=\"condition()\"\r\n [(visible)]=\"visible\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n<ng-template #titleTpl>\r\n <div class=\"x-popconfirm-title\">\r\n <ng-container *xOutlet=\"title()\">\r\n @if (icon()) {\r\n <x-icon [style.color]=\"iconColor()\" [type]=\"icon()\"></x-icon>\r\n }\r\n <span>{{ title() }}</span>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #footerTpl>\r\n <div class=\"x-popconfirm-buttons\">\r\n <x-button class=\"x-popconfirm-cancel\" (click)=\"onCancel($event)\" flat plain>{{ cancelTextSignal() }}</x-button>\r\n <x-button class=\"x-popconfirm-confirm\" type=\"primary\" flat (click)=\"onConfirm($event)\" [loading]=\"loading()\">{{\r\n confirmTextSignal()\r\n }}</x-button>\r\n </div>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { XPopconfirmComponent } from './popconfirm.component';\r\n\r\n@NgModule({\r\n exports: [XPopconfirmComponent],\r\n imports: [XPopconfirmComponent]\r\n})\r\nexport class XPopconfirmModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAMA;;;;AAIG;AACI,MAAM,iBAAiB,GAAG;AACjC,MAAM,wBAAwB,GAAG,YAAY;AAE7C;;AAEG;MAEU,mBAAoB,SAAQ,iBAAiB,CAAC,wBAAwB,CAAC,CAAA;AADpF,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QACM,IAAA,CAAA,KAAK,GAAG,KAAK,CAAY,EAAE;kFAAC;AACrC;;;AAGG;QACM,IAAA,CAAA,OAAO,GAAG,KAAK,CAAY,EAAE;oFAAC;AACvC;;;AAGG;QACM,IAAA,CAAA,SAAS,GAAG,KAAK,CAAa,IAAI,CAAC,MAAM,EAAE,SAAS,IAAI,QAAQ;sFAAC;AAC1E;;;AAGG;QACM,IAAA,CAAA,OAAO,GAAG,KAAK,CAAkB,IAAI,CAAC,MAAM,EAAE,OAAO,IAAI,OAAO;oFAAC;AAC1E;;;AAGG;AACM,QA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,oBAAoB,CAAA,EAAA,OAAA,EAAA,CADpB,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAGnB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAFlB,oBAAoB,CAAA,EAAA,CAAA,CAAA;;2FAEnB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,OAAO,EAAE,CAAC,oBAAoB;AAC/B,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -25,77 +25,85 @@ class XPopoverProperty extends XPropertyFunction(X_POPOVER_CONFIG_NAME) {
|
|
|
25
25
|
* @zh_CN 标题,支持自定义模板
|
|
26
26
|
* @en_US Title, support custom template
|
|
27
27
|
*/
|
|
28
|
-
this.title = input('',
|
|
28
|
+
this.title = input('', /* @ts-ignore */
|
|
29
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
29
30
|
/**
|
|
30
31
|
* @zh_CN 内容,支持自定义模板
|
|
31
32
|
* @en_US Content, support custom templates
|
|
32
33
|
*/
|
|
33
|
-
this.content = input('',
|
|
34
|
+
this.content = input('', /* @ts-ignore */
|
|
35
|
+
...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
34
36
|
/**
|
|
35
37
|
* @zh_CN 底部,支持自定义模板
|
|
36
38
|
* @en_US At the bottom, support custom templates
|
|
37
39
|
*/
|
|
38
|
-
this.footer = input('',
|
|
40
|
+
this.footer = input('', /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "footer" }] : /* istanbul ignore next */ []));
|
|
39
42
|
/**
|
|
40
43
|
* @zh_CN 内部样式
|
|
41
44
|
* @en_US panel class
|
|
42
45
|
*/
|
|
43
|
-
this.panelClass = input('',
|
|
46
|
+
this.panelClass = input('', /* @ts-ignore */
|
|
47
|
+
...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
|
|
44
48
|
/**
|
|
45
49
|
* @zh_CN 指定参考对象
|
|
46
50
|
* @en_US specify reference object
|
|
47
51
|
*/
|
|
48
|
-
this.connectTo = input(
|
|
52
|
+
this.connectTo = input(/* @ts-ignore */
|
|
53
|
+
...(ngDevMode ? [undefined, { debugName: "connectTo" }] : /* istanbul ignore next */ []));
|
|
49
54
|
/**
|
|
50
55
|
* @zh_CN 弹出的位置
|
|
51
56
|
* @en_US Pop-up position
|
|
52
57
|
*/
|
|
53
|
-
this.placement = input(this.config?.placement ?? 'top',
|
|
58
|
+
this.placement = input(this.config?.placement ?? 'top', /* @ts-ignore */
|
|
59
|
+
...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
54
60
|
/**
|
|
55
61
|
* @zh_CN 激活方式
|
|
56
62
|
* @en_US Activation method
|
|
57
63
|
*/
|
|
58
|
-
this.trigger = input(this.config?.trigger ?? 'hover',
|
|
64
|
+
this.trigger = input(this.config?.trigger ?? 'hover', /* @ts-ignore */
|
|
65
|
+
...(ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []));
|
|
59
66
|
/**
|
|
60
67
|
* @zh_CN 宽度
|
|
61
68
|
* @en_US width
|
|
62
69
|
*/
|
|
63
|
-
this.width = input(this.config?.width ?? '', { ...(ngDevMode ? { debugName: "width" } : {}), transform: XToCssPixelValue });
|
|
70
|
+
this.width = input(this.config?.width ?? '', { ...(ngDevMode ? { debugName: "width" } : /* istanbul ignore next */ {}), transform: XToCssPixelValue });
|
|
64
71
|
/**
|
|
65
72
|
* @zh_CN 最大宽度
|
|
66
73
|
* @en_US Max width
|
|
67
74
|
*/
|
|
68
|
-
this.maxWidth = input(this.config?.maxWidth ?? '10rem', { ...(ngDevMode ? { debugName: "maxWidth" } : {}), transform: XToCssPixelValue });
|
|
75
|
+
this.maxWidth = input(this.config?.maxWidth ?? '10rem', { ...(ngDevMode ? { debugName: "maxWidth" } : /* istanbul ignore next */ {}), transform: XToCssPixelValue });
|
|
69
76
|
/**
|
|
70
77
|
* @zh_CN 最小宽度
|
|
71
78
|
* @en_US Min width
|
|
72
79
|
*/
|
|
73
|
-
this.minWidth = input(this.config?.minWidth ?? '10rem', { ...(ngDevMode ? { debugName: "minWidth" } : {}), transform: XToCssPixelValue });
|
|
80
|
+
this.minWidth = input(this.config?.minWidth ?? '10rem', { ...(ngDevMode ? { debugName: "minWidth" } : /* istanbul ignore next */ {}), transform: XToCssPixelValue });
|
|
74
81
|
/**
|
|
75
82
|
* @zh_CN 显示/隐藏控制
|
|
76
83
|
* @en_US Show/hide control
|
|
77
84
|
*/
|
|
78
|
-
this.visible = model(false,
|
|
85
|
+
this.visible = model(false, /* @ts-ignore */
|
|
86
|
+
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
79
87
|
/**
|
|
80
88
|
* @zh_CN 条件触发
|
|
81
89
|
* @en_US condition trigger
|
|
82
90
|
*/
|
|
83
|
-
this.condition = input(false, { ...(ngDevMode ? { debugName: "condition" } : {}), transform: XToBoolean });
|
|
91
|
+
this.condition = input(false, { ...(ngDevMode ? { debugName: "condition" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
84
92
|
/**
|
|
85
93
|
* @zh_CN 鼠标移入后延时多少才显示
|
|
86
94
|
* @en_US How much is the mouse transfer after transfer
|
|
87
95
|
*/
|
|
88
|
-
this.mouseEnterDelay = input(150, { ...(ngDevMode ? { debugName: "mouseEnterDelay" } : {}), transform: XToNumber });
|
|
96
|
+
this.mouseEnterDelay = input(150, { ...(ngDevMode ? { debugName: "mouseEnterDelay" } : /* istanbul ignore next */ {}), transform: XToNumber });
|
|
89
97
|
/**
|
|
90
98
|
* @zh_CN 鼠标移出后延时多少才隐藏
|
|
91
99
|
* @en_US How much hidden is hidden after the mouse is removed
|
|
92
100
|
*/
|
|
93
|
-
this.mouseLeaveDelay = input(100, { ...(ngDevMode ? { debugName: "mouseLeaveDelay" } : {}), transform: XToNumber });
|
|
101
|
+
this.mouseLeaveDelay = input(100, { ...(ngDevMode ? { debugName: "mouseLeaveDelay" } : /* istanbul ignore next */ {}), transform: XToNumber });
|
|
94
102
|
}
|
|
95
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
96
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
103
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XPopoverProperty, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
104
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: XPopoverProperty, isStandalone: true, selector: "[x-popover], x-popover", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, footer: { classPropertyName: "footer", publicName: "footer", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, connectTo: { classPropertyName: "connectTo", publicName: "connectTo", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, condition: { classPropertyName: "condition", publicName: "condition", isSignal: true, isRequired: false, transformFunction: null }, mouseEnterDelay: { classPropertyName: "mouseEnterDelay", publicName: "mouseEnterDelay", isSignal: true, isRequired: false, transformFunction: null }, mouseLeaveDelay: { classPropertyName: "mouseLeaveDelay", publicName: "mouseLeaveDelay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange" }, usesInheritance: true, ngImport: i0 }); }
|
|
97
105
|
}
|
|
98
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XPopoverProperty, decorators: [{
|
|
99
107
|
type: Directive,
|
|
100
108
|
args: [{ selector: `[${XPopoverPrefix}], ${XPopoverPrefix}` }]
|
|
101
109
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], footer: [{ type: i0.Input, args: [{ isSignal: true, alias: "footer", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], connectTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "connectTo", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "trigger", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], condition: [{ type: i0.Input, args: [{ isSignal: true, alias: "condition", required: false }] }], mouseEnterDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "mouseEnterDelay", required: false }] }], mouseLeaveDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "mouseLeaveDelay", required: false }] }] } });
|
|
@@ -108,20 +116,29 @@ const XPopoverPortalPrefix = 'x-popover-portal';
|
|
|
108
116
|
|
|
109
117
|
class XPopoverPortalComponent {
|
|
110
118
|
constructor() {
|
|
111
|
-
this.title = input(
|
|
112
|
-
|
|
113
|
-
this.
|
|
114
|
-
|
|
115
|
-
this.
|
|
116
|
-
|
|
117
|
-
this.
|
|
118
|
-
|
|
119
|
+
this.title = input(/* @ts-ignore */
|
|
120
|
+
...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
|
|
121
|
+
this.content = input(/* @ts-ignore */
|
|
122
|
+
...(ngDevMode ? [undefined, { debugName: "content" }] : /* istanbul ignore next */ []));
|
|
123
|
+
this.footer = input(/* @ts-ignore */
|
|
124
|
+
...(ngDevMode ? [undefined, { debugName: "footer" }] : /* istanbul ignore next */ []));
|
|
125
|
+
this.width = input(/* @ts-ignore */
|
|
126
|
+
...(ngDevMode ? [undefined, { debugName: "width" }] : /* istanbul ignore next */ []));
|
|
127
|
+
this.minWidth = input(/* @ts-ignore */
|
|
128
|
+
...(ngDevMode ? [undefined, { debugName: "minWidth" }] : /* istanbul ignore next */ []));
|
|
129
|
+
this.maxWidth = input(/* @ts-ignore */
|
|
130
|
+
...(ngDevMode ? [undefined, { debugName: "maxWidth" }] : /* istanbul ignore next */ []));
|
|
131
|
+
this.trigger = input(/* @ts-ignore */
|
|
132
|
+
...(ngDevMode ? [undefined, { debugName: "trigger" }] : /* istanbul ignore next */ []));
|
|
133
|
+
this.placement = input(/* @ts-ignore */
|
|
134
|
+
...(ngDevMode ? [undefined, { debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
119
135
|
this.portalHover = output();
|
|
120
136
|
this.animateEnter = 'x-fade-enter';
|
|
121
137
|
this.animateLeave = 'x-fade-leave';
|
|
122
138
|
this.classMap = computed(() => ({
|
|
123
139
|
[`${XPopoverPortalPrefix}-${this.placement()}`]: !XIsEmpty(this.placement())
|
|
124
|
-
}),
|
|
140
|
+
}), /* @ts-ignore */
|
|
141
|
+
...(ngDevMode ? [{ debugName: "classMap" }] : /* istanbul ignore next */ []));
|
|
125
142
|
}
|
|
126
143
|
mouseenter() {
|
|
127
144
|
if (this.trigger() === 'hover') {
|
|
@@ -136,10 +153,10 @@ class XPopoverPortalComponent {
|
|
|
136
153
|
stopPropagation(event) {
|
|
137
154
|
event.stopPropagation();
|
|
138
155
|
}
|
|
139
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
140
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
156
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XPopoverPortalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
157
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: XPopoverPortalComponent, isStandalone: true, selector: "x-popover-portal", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, footer: { classPropertyName: "footer", publicName: "footer", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { portalHover: "portalHover" }, host: { listeners: { "mouseenter": "mouseenter()", "mouseleave": "mouseleave()" }, properties: { "animate.enter": "this.animateEnter", "animate.leave": "this.animateLeave" } }, ngImport: i0, template: "<div #popoverPortal class=\"x-popover-portal\" [ngClass]=\"classMap()\" (click)=\"stopPropagation($event)\">\r\n <div\r\n class=\"x-popover-portal-inner\"\r\n [style.width]=\"width()\"\r\n [style.minWidth]=\"minWidth()\"\r\n [style.maxWidth]=\"maxWidth()\"\r\n >\r\n @if (title()) {\r\n <div class=\"x-popover-portal-title\">\r\n <ng-container *xOutlet=\"title()\">\r\n {{ title() }}\r\n </ng-container>\r\n </div>\r\n }\r\n @if (content()) {\r\n <div class=\"x-popover-portal-content\">\r\n <ng-container *xOutlet=\"content()\">\r\n {{ content() }}\r\n </ng-container>\r\n </div>\r\n }\r\n @if (footer()) {\r\n <div class=\"x-popover-portal-footer\">\r\n <ng-container *xOutlet=\"footer()\">\r\n {{ footer() }}\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n <div #popoverArrow class=\"x-popover-portal-arrow\"></div>\r\n</div>\r\n", styles: ["x-popover{display:inline-block}.x-popover-portal{margin:0;padding:0}.x-popover-portal{display:inline-flex;position:relative;justify-content:center;align-items:center}.x-popover-portal>.x-popover-portal-inner{font-size:var(--x-font-size);background-color:var(--x-background-100);color:var(--x-text);padding:var(--x-font-size);border-radius:var(--x-border-radius);box-shadow:var(--x-box-shadow)}.x-popover-portal .x-popover-portal-title{margin-bottom:calc(var(--x-font-size) - .5rem);font-weight:600;display:flex;align-items:center}.x-popover-portal .x-popover-portal-footer{margin-top:calc(var(--x-font-size) - .5rem)}.x-popover-portal .x-popover-portal-arrow,.x-popover-portal .x-popover-portal-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.x-popover-portal-top,.x-popover-portal-top-start,.x-popover-portal-top-end{padding-bottom:.525rem}.x-popover-portal-top>.x-popover-portal-arrow,.x-popover-portal-top-start>.x-popover-portal-arrow,.x-popover-portal-top-end>.x-popover-portal-arrow{bottom:.1rem}.x-popover-portal-top .x-popover-portal-arrow:after,.x-popover-portal-top-start .x-popover-portal-arrow:after,.x-popover-portal-top-end .x-popover-portal-arrow:after{bottom:.1rem;margin-left:-.375rem}.x-popover-portal-left,.x-popover-portal-left-start,.x-popover-portal-left-end{padding-right:.525rem}.x-popover-portal-left>.x-popover-portal-arrow,.x-popover-portal-left-start>.x-popover-portal-arrow,.x-popover-portal-left-end>.x-popover-portal-arrow{right:.1rem}.x-popover-portal-left .x-popover-portal-arrow:after,.x-popover-portal-left-start .x-popover-portal-arrow:after,.x-popover-portal-left-end .x-popover-portal-arrow:after{right:.1rem;margin-top:-.375rem}.x-popover-portal-right,.x-popover-portal-right-start,.x-popover-portal-right-end{padding-left:.525rem}.x-popover-portal-right>.x-popover-portal-arrow,.x-popover-portal-right-start>.x-popover-portal-arrow,.x-popover-portal-right-end>.x-popover-portal-arrow{left:.1rem}.x-popover-portal-right .x-popover-portal-arrow:after,.x-popover-portal-right-start .x-popover-portal-arrow:after,.x-popover-portal-right-end .x-popover-portal-arrow:after{left:.1rem;margin-top:-.375rem}.x-popover-portal-bottom,.x-popover-portal-bottom-start,.x-popover-portal-bottom-end{padding-top:.525rem}.x-popover-portal-bottom .x-popover-portal-arrow,.x-popover-portal-bottom-start .x-popover-portal-arrow,.x-popover-portal-bottom-end .x-popover-portal-arrow{top:.1rem}.x-popover-portal-bottom .x-popover-portal-arrow:after,.x-popover-portal-bottom-start .x-popover-portal-arrow:after,.x-popover-portal-bottom-end .x-popover-portal-arrow:after{top:.1rem;margin-left:-.375rem}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
141
158
|
}
|
|
142
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XPopoverPortalComponent, decorators: [{
|
|
143
160
|
type: Component,
|
|
144
161
|
args: [{ selector: `${XPopoverPortalPrefix}`, imports: [NgClass, XOutletDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #popoverPortal class=\"x-popover-portal\" [ngClass]=\"classMap()\" (click)=\"stopPropagation($event)\">\r\n <div\r\n class=\"x-popover-portal-inner\"\r\n [style.width]=\"width()\"\r\n [style.minWidth]=\"minWidth()\"\r\n [style.maxWidth]=\"maxWidth()\"\r\n >\r\n @if (title()) {\r\n <div class=\"x-popover-portal-title\">\r\n <ng-container *xOutlet=\"title()\">\r\n {{ title() }}\r\n </ng-container>\r\n </div>\r\n }\r\n @if (content()) {\r\n <div class=\"x-popover-portal-content\">\r\n <ng-container *xOutlet=\"content()\">\r\n {{ content() }}\r\n </ng-container>\r\n </div>\r\n }\r\n @if (footer()) {\r\n <div class=\"x-popover-portal-footer\">\r\n <ng-container *xOutlet=\"footer()\">\r\n {{ footer() }}\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n <div #popoverArrow class=\"x-popover-portal-arrow\"></div>\r\n</div>\r\n", styles: ["x-popover{display:inline-block}.x-popover-portal{margin:0;padding:0}.x-popover-portal{display:inline-flex;position:relative;justify-content:center;align-items:center}.x-popover-portal>.x-popover-portal-inner{font-size:var(--x-font-size);background-color:var(--x-background-100);color:var(--x-text);padding:var(--x-font-size);border-radius:var(--x-border-radius);box-shadow:var(--x-box-shadow)}.x-popover-portal .x-popover-portal-title{margin-bottom:calc(var(--x-font-size) - .5rem);font-weight:600;display:flex;align-items:center}.x-popover-portal .x-popover-portal-footer{margin-top:calc(var(--x-font-size) - .5rem)}.x-popover-portal .x-popover-portal-arrow,.x-popover-portal .x-popover-portal-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.x-popover-portal-top,.x-popover-portal-top-start,.x-popover-portal-top-end{padding-bottom:.525rem}.x-popover-portal-top>.x-popover-portal-arrow,.x-popover-portal-top-start>.x-popover-portal-arrow,.x-popover-portal-top-end>.x-popover-portal-arrow{bottom:.1rem}.x-popover-portal-top .x-popover-portal-arrow:after,.x-popover-portal-top-start .x-popover-portal-arrow:after,.x-popover-portal-top-end .x-popover-portal-arrow:after{bottom:.1rem;margin-left:-.375rem}.x-popover-portal-left,.x-popover-portal-left-start,.x-popover-portal-left-end{padding-right:.525rem}.x-popover-portal-left>.x-popover-portal-arrow,.x-popover-portal-left-start>.x-popover-portal-arrow,.x-popover-portal-left-end>.x-popover-portal-arrow{right:.1rem}.x-popover-portal-left .x-popover-portal-arrow:after,.x-popover-portal-left-start .x-popover-portal-arrow:after,.x-popover-portal-left-end .x-popover-portal-arrow:after{right:.1rem;margin-top:-.375rem}.x-popover-portal-right,.x-popover-portal-right-start,.x-popover-portal-right-end{padding-left:.525rem}.x-popover-portal-right>.x-popover-portal-arrow,.x-popover-portal-right-start>.x-popover-portal-arrow,.x-popover-portal-right-end>.x-popover-portal-arrow{left:.1rem}.x-popover-portal-right .x-popover-portal-arrow:after,.x-popover-portal-right-start .x-popover-portal-arrow:after,.x-popover-portal-right-end .x-popover-portal-arrow:after{left:.1rem;margin-top:-.375rem}.x-popover-portal-bottom,.x-popover-portal-bottom-start,.x-popover-portal-bottom-end{padding-top:.525rem}.x-popover-portal-bottom .x-popover-portal-arrow,.x-popover-portal-bottom-start .x-popover-portal-arrow,.x-popover-portal-bottom-end .x-popover-portal-arrow{top:.1rem}.x-popover-portal-bottom .x-popover-portal-arrow:after,.x-popover-portal-bottom-start .x-popover-portal-arrow:after,.x-popover-portal-bottom-end .x-popover-portal-arrow:after{top:.1rem;margin-left:-.375rem}\n"] }]
|
|
145
162
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], footer: [{ type: i0.Input, args: [{ isSignal: true, alias: "footer", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "trigger", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], portalHover: [{ type: i0.Output, args: ["portalHover"] }], mouseenter: [{
|
|
@@ -198,12 +215,14 @@ class XPopoverDirective extends XPopoverProperty {
|
|
|
198
215
|
constructor() {
|
|
199
216
|
super();
|
|
200
217
|
this.unSubject = new Subject();
|
|
201
|
-
this.realPlacement = signal(null,
|
|
218
|
+
this.realPlacement = signal(null, /* @ts-ignore */
|
|
219
|
+
...(ngDevMode ? [{ debugName: "realPlacement" }] : /* istanbul ignore next */ []));
|
|
202
220
|
this.elementRef = inject(ElementRef);
|
|
203
221
|
this.portalService = inject(XPortalService);
|
|
204
222
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
205
223
|
this.overlay = inject(Overlay);
|
|
206
|
-
this.portalComponent = signal(null,
|
|
224
|
+
this.portalComponent = signal(null, /* @ts-ignore */
|
|
225
|
+
...(ngDevMode ? [{ debugName: "portalComponent" }] : /* istanbul ignore next */ []));
|
|
207
226
|
effect(() => this.portalComponent()?.setInput('title', this.title()));
|
|
208
227
|
effect(() => this.portalComponent()?.setInput('content', this.content()));
|
|
209
228
|
effect(() => this.portalComponent()?.setInput('footer', this.footer()));
|
|
@@ -307,10 +326,10 @@ class XPopoverDirective extends XPopoverProperty {
|
|
|
307
326
|
}
|
|
308
327
|
});
|
|
309
328
|
}
|
|
310
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
311
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
329
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XPopoverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
330
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.1", type: XPopoverDirective, isStandalone: true, selector: "[x-popover], x-popover", host: { listeners: { "click": "click()", "mouseenter": "mouseenter()", "mouseleave": "mouseleave()", "focus": "focus()", "blur": "blur()" }, properties: { "class.x-popover-show": "this._show" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
|
|
312
331
|
}
|
|
313
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
332
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XPopoverDirective, decorators: [{
|
|
314
333
|
type: Directive,
|
|
315
334
|
args: [{ selector: `[${XPopoverPrefix}], ${XPopoverPrefix}` }]
|
|
316
335
|
}], ctorParameters: () => [], propDecorators: { _show: [{
|
|
@@ -334,11 +353,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
334
353
|
}] } });
|
|
335
354
|
|
|
336
355
|
class XPopoverModule {
|
|
337
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
338
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
339
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
356
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XPopoverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
357
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: XPopoverModule, imports: [XPopoverDirective], exports: [XPopoverDirective] }); }
|
|
358
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XPopoverModule }); }
|
|
340
359
|
}
|
|
341
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
360
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XPopoverModule, decorators: [{
|
|
342
361
|
type: NgModule,
|
|
343
362
|
args: [{
|
|
344
363
|
exports: [XPopoverDirective],
|