@ng-nest/ui 20.0.7 → 20.1.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/auto-complete/index.d.ts +33 -8
- package/base-form/index.d.ts +3 -3
- package/calendar/index.d.ts +1 -2
- package/cascade/index.d.ts +33 -8
- package/checkbox/index.d.ts +3 -3
- package/color-picker/index.d.ts +34 -8
- package/core/index.d.ts +40 -8
- package/date-picker/index.d.ts +57 -12
- package/dropdown/index.d.ts +4 -4
- 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 +35 -35
- package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-anchor.mjs +31 -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-api.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-auto-complete.mjs +82 -72
- package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-avatar.mjs +31 -31
- package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-back-top.mjs +18 -18
- package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-badge.mjs +23 -23
- package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-base-form.mjs +45 -45
- package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-button.mjs +42 -42
- package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-calendar.mjs +20 -20
- package/fesm2022/ng-nest-ui-calendar.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-card.mjs +15 -15
- package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-carousel.mjs +46 -46
- package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-cascade.mjs +86 -76
- package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-checkbox.mjs +39 -39
- package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-collapse.mjs +31 -31
- package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color-picker.mjs +91 -72
- package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color.mjs +16 -16
- package/fesm2022/ng-nest-ui-color.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-comment.mjs +21 -21
- package/fesm2022/ng-nest-ui-comment.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-container.mjs +37 -37
- package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-core.mjs +38 -22
- package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-crumb.mjs +13 -13
- package/fesm2022/ng-nest-ui-crumb.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-date-picker.mjs +273 -253
- package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-description.mjs +31 -31
- package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dialog.mjs +81 -81
- package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-doc.mjs +7 -7
- package/fesm2022/ng-nest-ui-doc.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-drag.mjs +10 -10
- package/fesm2022/ng-nest-ui-drag.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-drawer.mjs +42 -42
- package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dropdown.mjs +49 -49
- package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-empty.mjs +12 -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-examples.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-find.mjs +79 -77
- package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-form.mjs +33 -33
- package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-highlight.mjs +20 -20
- package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-i18n.mjs +15 -15
- package/fesm2022/ng-nest-ui-i18n.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-icon.mjs +21 -21
- package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-image.mjs +39 -39
- 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 +42 -42
- package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input.mjs +102 -81
- package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-keyword.mjs +15 -15
- package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-layout.mjs +31 -31
- package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-link.mjs +18 -18
- package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-list.mjs +80 -80
- package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-loading.mjs +22 -22
- package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-menu.mjs +45 -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-box.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-message.mjs +10 -10
- package/fesm2022/ng-nest-ui-message.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-notification.mjs +10 -10
- package/fesm2022/ng-nest-ui-notification.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-outlet.mjs +9 -9
- package/fesm2022/ng-nest-ui-outlet.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-page-header.mjs +15 -15
- package/fesm2022/ng-nest-ui-page-header.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-pagination.mjs +53 -53
- package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-pattern.mjs +7 -7
- package/fesm2022/ng-nest-ui-pattern.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-popconfirm.mjs +27 -27
- package/fesm2022/ng-nest-ui-popconfirm.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-popover.mjs +38 -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-portal.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-progress.mjs +38 -38
- package/fesm2022/ng-nest-ui-progress.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-radio.mjs +36 -36
- package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-rate.mjs +30 -30
- package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-resizable.mjs +16 -16
- package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-result.mjs +16 -16
- package/fesm2022/ng-nest-ui-result.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-ripple.mjs +13 -13
- package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-scrollable.mjs +102 -19
- package/fesm2022/ng-nest-ui-scrollable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-select.mjs +121 -111
- package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-skeleton.mjs +15 -15
- package/fesm2022/ng-nest-ui-skeleton.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider-select.mjs +54 -54
- package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider.mjs +39 -39
- package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-statistic.mjs +30 -30
- package/fesm2022/ng-nest-ui-statistic.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-steps.mjs +19 -19
- package/fesm2022/ng-nest-ui-steps.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-switch.mjs +26 -26
- package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table-view.mjs +490 -242
- package/fesm2022/ng-nest-ui-table-view.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table.mjs +221 -221
- package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tabs.mjs +58 -58
- package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tag.mjs +22 -22
- package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-text-retract.mjs +15 -15
- package/fesm2022/ng-nest-ui-text-retract.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-textarea.mjs +41 -41
- package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-theme.mjs +23 -23
- package/fesm2022/ng-nest-ui-theme.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-ago.mjs +7 -7
- package/fesm2022/ng-nest-ui-time-ago.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-picker.mjs +104 -94
- 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-time-range.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-timeline.mjs +15 -15
- package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tooltip.mjs +38 -38
- package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-transfer.mjs +40 -40
- package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-file.mjs +28 -28
- package/fesm2022/ng-nest-ui-tree-file.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-select.mjs +126 -116
- package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree.mjs +107 -107
- package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-typography.mjs +13 -13
- package/fesm2022/ng-nest-ui-typography.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-upload.mjs +37 -37
- package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
- package/find/index.d.ts +5 -5
- package/form/index.d.ts +1 -1
- package/input/index.d.ts +32 -5
- package/input-number/index.d.ts +5 -5
- package/list/index.d.ts +2 -2
- package/message-box/index.d.ts +4 -5
- package/package.json +20 -20
- package/radio/index.d.ts +3 -3
- package/rate/index.d.ts +5 -5
- package/scrollable/index.d.ts +15 -7
- package/select/index.d.ts +38 -8
- package/slider-select/index.d.ts +3 -3
- package/steps/index.d.ts +1 -2
- package/switch/index.d.ts +3 -3
- package/table-view/index.d.ts +121 -79
- package/textarea/index.d.ts +3 -3
- package/theme/index.d.ts +1 -1
- package/time-picker/index.d.ts +33 -8
- package/transfer/index.d.ts +1 -1
- package/tree-select/index.d.ts +33 -8
- package/upload/index.d.ts +2 -2
|
@@ -33,7 +33,7 @@ class XDescriptionProperty extends XPropertyFunction(X_DESCRIPTION_CONFIG_NAME)
|
|
|
33
33
|
* ```
|
|
34
34
|
*
|
|
35
35
|
*/
|
|
36
|
-
this.title = input();
|
|
36
|
+
this.title = input(...(ngDevMode ? [undefined, { debugName: "title" }] : []));
|
|
37
37
|
/**
|
|
38
38
|
* @zh_CN 是否展示边框
|
|
39
39
|
* @en_US Whether to show column borders
|
|
@@ -46,7 +46,7 @@ class XDescriptionProperty extends XPropertyFunction(X_DESCRIPTION_CONFIG_NAME)
|
|
|
46
46
|
* ```
|
|
47
47
|
*
|
|
48
48
|
*/
|
|
49
|
-
this.bordered = input(this.config?.bordered ?? false, { transform: XToBoolean });
|
|
49
|
+
this.bordered = input(this.config?.bordered ?? false, ...(ngDevMode ? [{ debugName: "bordered", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
50
50
|
/**
|
|
51
51
|
* @zh_CN grid 布局下定义列宽度
|
|
52
52
|
* @en_US Define column width under grid layout
|
|
@@ -60,7 +60,7 @@ class XDescriptionProperty extends XPropertyFunction(X_DESCRIPTION_CONFIG_NAME)
|
|
|
60
60
|
* ```
|
|
61
61
|
*
|
|
62
62
|
*/
|
|
63
|
-
this.gridTemplateColumns = input();
|
|
63
|
+
this.gridTemplateColumns = input(...(ngDevMode ? [undefined, { debugName: "gridTemplateColumns" }] : []));
|
|
64
64
|
/**
|
|
65
65
|
* @zh_CN 尺寸
|
|
66
66
|
* @en_US Size
|
|
@@ -73,12 +73,12 @@ class XDescriptionProperty extends XPropertyFunction(X_DESCRIPTION_CONFIG_NAME)
|
|
|
73
73
|
* ```
|
|
74
74
|
*
|
|
75
75
|
*/
|
|
76
|
-
this.size = input(this.config?.size ?? 'medium');
|
|
76
|
+
this.size = input(this.config?.size ?? 'medium', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
77
77
|
}
|
|
78
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
79
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
78
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XDescriptionProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
79
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.4", type: XDescriptionProperty, isStandalone: true, selector: "x-description-property", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, gridTemplateColumns: { classPropertyName: "gridTemplateColumns", publicName: "gridTemplateColumns", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
80
80
|
}
|
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XDescriptionProperty, decorators: [{
|
|
82
82
|
type: Component,
|
|
83
83
|
args: [{ selector: `${XDescriptionPrefix}-property`, template: '' }]
|
|
84
84
|
}] });
|
|
@@ -105,7 +105,7 @@ class XDescriptionItemProperty {
|
|
|
105
105
|
* ```
|
|
106
106
|
*
|
|
107
107
|
*/
|
|
108
|
-
this.gridArea = input();
|
|
108
|
+
this.gridArea = input(...(ngDevMode ? [undefined, { debugName: "gridArea" }] : []));
|
|
109
109
|
/**
|
|
110
110
|
* @zh_CN 内容的描述,支持自定义模板
|
|
111
111
|
* @en_US Description of content, support custom templates
|
|
@@ -120,7 +120,7 @@ class XDescriptionItemProperty {
|
|
|
120
120
|
* ```
|
|
121
121
|
*
|
|
122
122
|
*/
|
|
123
|
-
this.label = input();
|
|
123
|
+
this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
124
124
|
/**
|
|
125
125
|
* @zh_CN flex 布局下的子元素水平排列方式
|
|
126
126
|
* @en_US Child element under the horizontal arrangement of the layout flex
|
|
@@ -137,7 +137,7 @@ class XDescriptionItemProperty {
|
|
|
137
137
|
* ```
|
|
138
138
|
*
|
|
139
139
|
*/
|
|
140
|
-
this.justify = input('start');
|
|
140
|
+
this.justify = input('start', ...(ngDevMode ? [{ debugName: "justify" }] : []));
|
|
141
141
|
/**
|
|
142
142
|
* @zh_CN flex 布局下的子元素垂直排列方式
|
|
143
143
|
* @en_US Child element under the vertical layout flex arrangement
|
|
@@ -152,7 +152,7 @@ class XDescriptionItemProperty {
|
|
|
152
152
|
* ```
|
|
153
153
|
*
|
|
154
154
|
*/
|
|
155
|
-
this.align = input('start');
|
|
155
|
+
this.align = input('start', ...(ngDevMode ? [{ debugName: "align" }] : []));
|
|
156
156
|
/**
|
|
157
157
|
* @zh_CN flex 布局下的子元素排列方向
|
|
158
158
|
* @en_US Child element under the direction of arrangement of the layout flex
|
|
@@ -168,7 +168,7 @@ class XDescriptionItemProperty {
|
|
|
168
168
|
* ```
|
|
169
169
|
*
|
|
170
170
|
*/
|
|
171
|
-
this.direction = input('row');
|
|
171
|
+
this.direction = input('row', ...(ngDevMode ? [{ debugName: "direction" }] : []));
|
|
172
172
|
/**
|
|
173
173
|
* @zh_CN 宽度
|
|
174
174
|
* @en_US Width
|
|
@@ -182,7 +182,7 @@ class XDescriptionItemProperty {
|
|
|
182
182
|
* ```
|
|
183
183
|
*
|
|
184
184
|
*/
|
|
185
|
-
this.width = input('', { transform: XToCssPixelValue });
|
|
185
|
+
this.width = input('', ...(ngDevMode ? [{ debugName: "width", transform: XToCssPixelValue }] : [{ transform: XToCssPixelValue }]));
|
|
186
186
|
/**
|
|
187
187
|
* @zh_CN flex 比重
|
|
188
188
|
* @en_US Flex proportion
|
|
@@ -196,7 +196,7 @@ class XDescriptionItemProperty {
|
|
|
196
196
|
* ```
|
|
197
197
|
*
|
|
198
198
|
*/
|
|
199
|
-
this.flex = input(0, { transform: XToNumber });
|
|
199
|
+
this.flex = input(0, ...(ngDevMode ? [{ debugName: "flex", transform: XToNumber }] : [{ transform: XToNumber }]));
|
|
200
200
|
/**
|
|
201
201
|
* @zh_CN 是否是标题
|
|
202
202
|
* @en_US Whether it is heading
|
|
@@ -210,12 +210,12 @@ class XDescriptionItemProperty {
|
|
|
210
210
|
* ```
|
|
211
211
|
*
|
|
212
212
|
*/
|
|
213
|
-
this.heading = input(false, { transform: XToBoolean });
|
|
213
|
+
this.heading = input(false, ...(ngDevMode ? [{ debugName: "heading", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
214
214
|
}
|
|
215
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
216
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
215
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XDescriptionItemProperty, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
216
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.4", type: XDescriptionItemProperty, isStandalone: true, selector: "x-description-item-property", inputs: { gridArea: { classPropertyName: "gridArea", publicName: "gridArea", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, flex: { classPropertyName: "flex", publicName: "flex", isSignal: true, isRequired: false, transformFunction: null }, heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '', isInline: true }); }
|
|
217
217
|
}
|
|
218
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XDescriptionItemProperty, decorators: [{
|
|
219
219
|
type: Component,
|
|
220
220
|
args: [{ selector: `${XDescriptionItemPrefix}-property`, template: '' }]
|
|
221
221
|
}] });
|
|
@@ -225,14 +225,14 @@ class XDescriptionItemComponent extends XDescriptionItemProperty {
|
|
|
225
225
|
super(...arguments);
|
|
226
226
|
this.content = viewChild.required(TemplateRef);
|
|
227
227
|
}
|
|
228
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
229
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.
|
|
228
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XDescriptionItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
229
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.2.4", type: XDescriptionItemComponent, isStandalone: true, selector: "x-description-item", viewQueries: [{ propertyName: "content", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
230
230
|
<ng-template>
|
|
231
231
|
<ng-content></ng-content>
|
|
232
232
|
</ng-template>
|
|
233
233
|
`, isInline: true, styles: [".x-description{margin:0;padding:0}.x-description-header{display:flex;align-items:center}.x-description-title{font-weight:700}.x-description-grid{display:grid;grid-auto-flow:row}.x-description-item{display:flex;align-items:baseline}.x-description-item.x-flex{display:flex}.x-description-item.x-justify-start{justify-content:flex-start}.x-description-item.x-justify-center{justify-content:center}.x-description-item.x-justify-end{justify-content:flex-end}.x-description-item.x-justify-space-between{justify-content:space-between}.x-description-item.x-justify-space-around{justify-content:space-around}.x-description-item.x-align-start{align-items:flex-start}.x-description-item.x-align-center{align-items:center}.x-description-item.x-align-end{align-items:flex-end}.x-description-item.x-direction-column{flex-direction:column}.x-description-item.x-direction-column-reverse{flex-direction:column-reverse}.x-description-item.x-direction-row{flex-direction:row}.x-description-item.x-direction-row-reverse{flex-direction:row-reverse}.x-description-item-heading{background-color:var(--x-background-a100)}.x-description-bordered .x-description-item{border:var(--x-border-width) var(--x-border-style) var(--x-border);margin-left:calc(var(--x-border-width) * -1);margin-top:calc(var(--x-border-width) * -1)}.x-description-big .x-description-header{padding:var(--x-padding-big) 0}.x-description-big .x-description-item{padding:calc(var(--x-padding-big) / 2) 0}.x-description-big.x-description-bordered .x-description-item{padding:var(--x-padding-big)}.x-description-large .x-description-header{padding:var(--x-padding-large) 0}.x-description-large .x-description-item{padding:calc(var(--x-padding-large) / 2) 0}.x-description-large.x-description-bordered .x-description-item{padding:var(--x-padding-large)}.x-description-medium .x-description-header{padding:var(--x-padding-medium) 0}.x-description-medium .x-description-item{padding:calc(var(--x-padding-medium) / 2) 0}.x-description-medium.x-description-bordered .x-description-item{padding:var(--x-padding-medium)}.x-description-small .x-description-header{padding:var(--x-padding-small) 0}.x-description-small .x-description-item{padding:calc(var(--x-padding-small) / 2) 0}.x-description-small.x-description-bordered .x-description-item{padding:var(--x-padding-small)}.x-description-mini .x-description-header{padding:var(--x-padding-mini) 0}.x-description-mini .x-description-item{padding:calc(var(--x-padding-mini) / 2) 0}.x-description-mini.x-description-bordered .x-description-item{padding:var(--x-padding-mini)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
234
234
|
}
|
|
235
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
235
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XDescriptionItemComponent, decorators: [{
|
|
236
236
|
type: Component,
|
|
237
237
|
args: [{ selector: `${XDescriptionItemPrefix}`, template: `
|
|
238
238
|
<ng-template>
|
|
@@ -244,10 +244,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
|
|
|
244
244
|
class XDescriptionComponent extends XDescriptionProperty {
|
|
245
245
|
constructor() {
|
|
246
246
|
super(...arguments);
|
|
247
|
-
this.items = contentChildren(XDescriptionItemComponent);
|
|
247
|
+
this.items = contentChildren(XDescriptionItemComponent, ...(ngDevMode ? [{ debugName: "items" }] : []));
|
|
248
248
|
this.classMap = computed(() => ({
|
|
249
249
|
[`${XDescriptionPrefix}-${this.size()}`]: !XIsEmpty(this.size())
|
|
250
|
-
}));
|
|
250
|
+
}), ...(ngDevMode ? [{ debugName: "classMap" }] : []));
|
|
251
251
|
this.gridTemplateColumnsSignal = computed(() => {
|
|
252
252
|
let gridTemplateColumns = this.gridTemplateColumns();
|
|
253
253
|
if (gridTemplateColumns)
|
|
@@ -262,7 +262,7 @@ class XDescriptionComponent extends XDescriptionProperty {
|
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
264
|
return columns.join(' ');
|
|
265
|
-
});
|
|
265
|
+
}, ...(ngDevMode ? [{ debugName: "gridTemplateColumnsSignal" }] : []));
|
|
266
266
|
}
|
|
267
267
|
setFlex(item) {
|
|
268
268
|
let classes = {};
|
|
@@ -274,20 +274,20 @@ class XDescriptionComponent extends XDescriptionProperty {
|
|
|
274
274
|
classes[`x-direction-${item.direction()}`] = true;
|
|
275
275
|
return classes;
|
|
276
276
|
}
|
|
277
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
278
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
277
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XDescriptionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
278
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: XDescriptionComponent, isStandalone: true, selector: "x-description", queries: [{ propertyName: "items", predicate: XDescriptionItemComponent, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"x-description\" [class.x-description-bordered]=\"bordered()\" [ngClass]=\"classMap()\">\r\n @if (title()) {\r\n <div class=\"x-description-header\">\r\n <div class=\"x-description-title\" *xOutlet=\"title()\">\r\n {{ title() }}\r\n </div>\r\n </div>\r\n }\r\n <div class=\"x-description-grid\" [style.grid-template-columns]=\"gridTemplateColumnsSignal()\">\r\n @for (item of items(); track item) {\r\n <div\r\n class=\"x-description-item\"\r\n [style.grid-area]=\"item.gridArea() ? item.gridArea() : '1 / ' + ($index + 1)\"\r\n [class.x-description-item-heading]=\"item.heading()\"\r\n [ngClass]=\"setFlex(item)\"\r\n >\r\n <div class=\"x-description-item-label\">\r\n <ng-container *xOutlet=\"item.label()\">{{ item.label() }}</ng-container>\r\n </div>\r\n <div class=\"x-description-item-content\">\r\n <ng-template [ngTemplateOutlet]=\"item.content()\"></ng-template>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".x-description{margin:0;padding:0}.x-description-header{display:flex;align-items:center}.x-description-title{font-weight:700}.x-description-grid{display:grid;grid-auto-flow:row}.x-description-item{display:flex;align-items:baseline}.x-description-item.x-flex{display:flex}.x-description-item.x-justify-start{justify-content:flex-start}.x-description-item.x-justify-center{justify-content:center}.x-description-item.x-justify-end{justify-content:flex-end}.x-description-item.x-justify-space-between{justify-content:space-between}.x-description-item.x-justify-space-around{justify-content:space-around}.x-description-item.x-align-start{align-items:flex-start}.x-description-item.x-align-center{align-items:center}.x-description-item.x-align-end{align-items:flex-end}.x-description-item.x-direction-column{flex-direction:column}.x-description-item.x-direction-column-reverse{flex-direction:column-reverse}.x-description-item.x-direction-row{flex-direction:row}.x-description-item.x-direction-row-reverse{flex-direction:row-reverse}.x-description-item-heading{background-color:var(--x-background-a100)}.x-description-bordered .x-description-item{border:var(--x-border-width) var(--x-border-style) var(--x-border);margin-left:calc(var(--x-border-width) * -1);margin-top:calc(var(--x-border-width) * -1)}.x-description-big .x-description-header{padding:var(--x-padding-big) 0}.x-description-big .x-description-item{padding:calc(var(--x-padding-big) / 2) 0}.x-description-big.x-description-bordered .x-description-item{padding:var(--x-padding-big)}.x-description-large .x-description-header{padding:var(--x-padding-large) 0}.x-description-large .x-description-item{padding:calc(var(--x-padding-large) / 2) 0}.x-description-large.x-description-bordered .x-description-item{padding:var(--x-padding-large)}.x-description-medium .x-description-header{padding:var(--x-padding-medium) 0}.x-description-medium .x-description-item{padding:calc(var(--x-padding-medium) / 2) 0}.x-description-medium.x-description-bordered .x-description-item{padding:var(--x-padding-medium)}.x-description-small .x-description-header{padding:var(--x-padding-small) 0}.x-description-small .x-description-item{padding:calc(var(--x-padding-small) / 2) 0}.x-description-small.x-description-bordered .x-description-item{padding:var(--x-padding-small)}.x-description-mini .x-description-header{padding:var(--x-padding-mini) 0}.x-description-mini .x-description-item{padding:calc(var(--x-padding-mini) / 2) 0}.x-description-mini.x-description-bordered .x-description-item{padding:var(--x-padding-mini)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
279
279
|
}
|
|
280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XDescriptionComponent, decorators: [{
|
|
281
281
|
type: Component,
|
|
282
282
|
args: [{ selector: `${XDescriptionPrefix}`, imports: [NgClass, NgTemplateOutlet, XOutletDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"x-description\" [class.x-description-bordered]=\"bordered()\" [ngClass]=\"classMap()\">\r\n @if (title()) {\r\n <div class=\"x-description-header\">\r\n <div class=\"x-description-title\" *xOutlet=\"title()\">\r\n {{ title() }}\r\n </div>\r\n </div>\r\n }\r\n <div class=\"x-description-grid\" [style.grid-template-columns]=\"gridTemplateColumnsSignal()\">\r\n @for (item of items(); track item) {\r\n <div\r\n class=\"x-description-item\"\r\n [style.grid-area]=\"item.gridArea() ? item.gridArea() : '1 / ' + ($index + 1)\"\r\n [class.x-description-item-heading]=\"item.heading()\"\r\n [ngClass]=\"setFlex(item)\"\r\n >\r\n <div class=\"x-description-item-label\">\r\n <ng-container *xOutlet=\"item.label()\">{{ item.label() }}</ng-container>\r\n </div>\r\n <div class=\"x-description-item-content\">\r\n <ng-template [ngTemplateOutlet]=\"item.content()\"></ng-template>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".x-description{margin:0;padding:0}.x-description-header{display:flex;align-items:center}.x-description-title{font-weight:700}.x-description-grid{display:grid;grid-auto-flow:row}.x-description-item{display:flex;align-items:baseline}.x-description-item.x-flex{display:flex}.x-description-item.x-justify-start{justify-content:flex-start}.x-description-item.x-justify-center{justify-content:center}.x-description-item.x-justify-end{justify-content:flex-end}.x-description-item.x-justify-space-between{justify-content:space-between}.x-description-item.x-justify-space-around{justify-content:space-around}.x-description-item.x-align-start{align-items:flex-start}.x-description-item.x-align-center{align-items:center}.x-description-item.x-align-end{align-items:flex-end}.x-description-item.x-direction-column{flex-direction:column}.x-description-item.x-direction-column-reverse{flex-direction:column-reverse}.x-description-item.x-direction-row{flex-direction:row}.x-description-item.x-direction-row-reverse{flex-direction:row-reverse}.x-description-item-heading{background-color:var(--x-background-a100)}.x-description-bordered .x-description-item{border:var(--x-border-width) var(--x-border-style) var(--x-border);margin-left:calc(var(--x-border-width) * -1);margin-top:calc(var(--x-border-width) * -1)}.x-description-big .x-description-header{padding:var(--x-padding-big) 0}.x-description-big .x-description-item{padding:calc(var(--x-padding-big) / 2) 0}.x-description-big.x-description-bordered .x-description-item{padding:var(--x-padding-big)}.x-description-large .x-description-header{padding:var(--x-padding-large) 0}.x-description-large .x-description-item{padding:calc(var(--x-padding-large) / 2) 0}.x-description-large.x-description-bordered .x-description-item{padding:var(--x-padding-large)}.x-description-medium .x-description-header{padding:var(--x-padding-medium) 0}.x-description-medium .x-description-item{padding:calc(var(--x-padding-medium) / 2) 0}.x-description-medium.x-description-bordered .x-description-item{padding:var(--x-padding-medium)}.x-description-small .x-description-header{padding:var(--x-padding-small) 0}.x-description-small .x-description-item{padding:calc(var(--x-padding-small) / 2) 0}.x-description-small.x-description-bordered .x-description-item{padding:var(--x-padding-small)}.x-description-mini .x-description-header{padding:var(--x-padding-mini) 0}.x-description-mini .x-description-item{padding:calc(var(--x-padding-mini) / 2) 0}.x-description-mini.x-description-bordered .x-description-item{padding:var(--x-padding-mini)}\n"] }]
|
|
283
283
|
}] });
|
|
284
284
|
|
|
285
285
|
class XDescriptionModule {
|
|
286
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
287
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
288
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
286
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XDescriptionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
287
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: XDescriptionModule, imports: [XDescriptionComponent, XDescriptionItemComponent], exports: [XDescriptionComponent, XDescriptionItemComponent] }); }
|
|
288
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XDescriptionModule }); }
|
|
289
289
|
}
|
|
290
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XDescriptionModule, decorators: [{
|
|
291
291
|
type: NgModule,
|
|
292
292
|
args: [{
|
|
293
293
|
imports: [XDescriptionComponent, XDescriptionItemComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-description.mjs","sources":["../../../../lib/ng-nest/ui/description/description.property.ts","../../../../lib/ng-nest/ui/description/description-item.component.ts","../../../../lib/ng-nest/ui/description/description.component.ts","../../../../lib/ng-nest/ui/description/description.component.html","../../../../lib/ng-nest/ui/description/description.module.ts","../../../../lib/ng-nest/ui/description/ng-nest-ui-description.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\r\nimport { XPropertyFunction, XToBoolean, XToCssPixelValue, XToNumber } from '@ng-nest/ui/core';\r\nimport type { XAlign, XBoolean, XDirection, XJustify, XNumber, XSize, XTemplate } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Description\r\n * @selector x-description\r\n * @decorator component\r\n */\r\nexport const XDescriptionPrefix = 'x-description';\r\nconst X_DESCRIPTION_CONFIG_NAME = 'description';\r\n\r\n/**\r\n * Description Property\r\n */\r\n@Component({ selector: `${XDescriptionPrefix}-property`, template: '' })\r\nexport class XDescriptionProperty extends XPropertyFunction(X_DESCRIPTION_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 描述列表的标题,支持自定义模板\r\n * @en_US Describe the title of the list, support custom template\r\n * @example\r\n *\r\n * ```html\r\n * <x-description title=\"Title\">\r\n * <x-description-item>name</x-description-item>\r\n * </x-description>\r\n * <x-description [title]=\"titleTpl\">\r\n * <x-description-item>name</x-description-item>\r\n * </x-description>\r\n * <ng-template #titleTpl>Title</ng-template>\r\n * ```\r\n *\r\n */\r\n readonly title = input<XTemplate>();\r\n /**\r\n * @zh_CN 是否展示边框\r\n * @en_US Whether to show column borders\r\n * @example\r\n *\r\n * ```html\r\n * <x-description title=\"Title\" bordered>\r\n * <x-description-item>name</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly bordered = input<boolean, XBoolean>(this.config?.bordered ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN grid 布局下定义列宽度\r\n * @en_US Define column width under grid layout\r\n * @example\r\n *\r\n * ```html\r\n * <x-description title=\"Title\" bordered gridTemplateColumns=\"1fr 1fr\">\r\n * <x-description-item gridArea=\"1/1/2/2\">name</x-description-item>\r\n * <x-description-item gridArea=\"1/2/3/2\">age</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly gridTemplateColumns = input<string>();\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n * @example\r\n *\r\n * ```html\r\n * <x-description title=\"Title\" size=\"big\">\r\n * <x-description-item>name</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly size = input<XSize>(this.config?.size ?? 'medium');\r\n}\r\n\r\n/**\r\n * Description Item\r\n * @selector x-description-item\r\n * @decorator component\r\n */\r\nexport const XDescriptionItemPrefix = 'x-description-item';\r\n\r\n/**\r\n * Description Item Property\r\n */\r\n@Component({ selector: `${XDescriptionItemPrefix}-property`, template: '' })\r\nexport class XDescriptionItemProperty {\r\n /**\r\n * @zh_CN 使用 grid 布局\r\n * @en_US Use grid layout to merge cells\r\n * @example\r\n *\r\n * ```html\r\n * <x-description>\r\n * <x-description-item gridArea=\"1/1/2/2\">name</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly gridArea = input<string>();\r\n /**\r\n * @zh_CN 内容的描述,支持自定义模板\r\n * @en_US Description of content, support custom templates\r\n * @example\r\n *\r\n * ```html\r\n * <x-description>\r\n * <x-description-item label=\"name1\">name1</x-description-item>\r\n * <x-description-item [label]=\"nameTpl\">name2</x-description-item>\r\n * </x-description>\r\n * <ng-template #nameTpl></ng-template>\r\n * ```\r\n *\r\n */\r\n readonly label = input<XTemplate>();\r\n /**\r\n * @zh_CN flex 布局下的子元素水平排列方式\r\n * @en_US Child element under the horizontal arrangement of the layout flex\r\n * @example\r\n *\r\n * ```html\r\n * <x-description>\r\n * <x-description-item justify=\"end\">end</x-description-item>\r\n * <x-description-item justify=\"center\">center</x-description-item>\r\n * <x-description-item justify=\"start\">start</x-description-item>\r\n * <x-description-item justify=\"space-around\">space-around</x-description-item>\r\n * <x-description-item justify=\"space-between\">space-between</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly justify = input<XJustify>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素垂直排列方式\r\n * @en_US Child element under the vertical layout flex arrangement\r\n * @example\r\n *\r\n * ```html\r\n * <x-description>\r\n * <x-description-item align=\"end\">end</x-description-item>\r\n * <x-description-item align=\"center\">center</x-description-item>\r\n * <x-description-item align=\"start\">start</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly align = input<XAlign>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素排列方向\r\n * @en_US Child element under the direction of arrangement of the layout flex\r\n * @example\r\n *\r\n * ```html\r\n * <x-description>\r\n * <x-description-item direction=\"column\">column</x-description-item>\r\n * <x-description-item direction=\"column-reverse\">column-reverse</x-description-item>\r\n * <x-description-item direction=\"row\">row</x-description-item>\r\n * <x-description-item direction=\"row-reverse\">row-reverse</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly direction = input<XDirection>('row');\r\n /**\r\n * @zh_CN 宽度\r\n * @en_US Width\r\n * @example\r\n *\r\n * ```html\r\n * <x-description>\r\n * <x-description-item width=\"100px\">width100</x-description-item>\r\n * <x-description-item width=\"200px\">width200</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly width = input<string, XNumber>('', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN flex 比重\r\n * @en_US Flex proportion\r\n * @example\r\n *\r\n * ```html\r\n * <x-description>\r\n * <x-description-item flex=\"1\">flex1</x-description-item>\r\n * <x-description-item flex=\"2\">flex2</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly flex = input<number, XNumber>(0, { transform: XToNumber });\r\n /**\r\n * @zh_CN 是否是标题\r\n * @en_US Whether it is heading\r\n * @example\r\n *\r\n * ```html\r\n * <x-description>\r\n * <x-description-item label=\"name\" heading></x-description-item>\r\n * <x-description-item>name1</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly heading = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n}\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, TemplateRef, viewChild } from '@angular/core';\r\nimport { XDescriptionItemPrefix, XDescriptionItemProperty } from './description.property';\r\n\r\n@Component({\r\n selector: `${XDescriptionItemPrefix}`,\r\n template: `\r\n <ng-template>\r\n <ng-content></ng-content>\r\n </ng-template>\r\n `,\r\n styleUrls: ['./style/index.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XDescriptionItemComponent extends XDescriptionItemProperty {\r\n content = viewChild.required(TemplateRef);\r\n}\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, computed, contentChildren } from '@angular/core';\r\nimport { XDescriptionPrefix, XDescriptionProperty } from './description.property';\r\nimport { XIsEmpty } from '@ng-nest/ui/core';\r\nimport { XDescriptionItemComponent } from './description-item.component';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { NgClass, NgTemplateOutlet } from '@angular/common';\r\n\r\n@Component({\r\n selector: `${XDescriptionPrefix}`,\r\n imports: [NgClass, NgTemplateOutlet, XOutletDirective],\r\n templateUrl: './description.component.html',\r\n styleUrls: ['./style/index.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XDescriptionComponent extends XDescriptionProperty {\r\n items = contentChildren(XDescriptionItemComponent);\r\n\r\n classMap = computed(() => ({\r\n [`${XDescriptionPrefix}-${this.size()}`]: !XIsEmpty(this.size())\r\n }));\r\n\r\n gridTemplateColumnsSignal = computed(() => {\r\n let gridTemplateColumns = this.gridTemplateColumns();\r\n if (gridTemplateColumns) return gridTemplateColumns;\r\n const columns: string[] = [];\r\n this.items().forEach((x) => {\r\n if (x.width()) {\r\n columns.push(x.width());\r\n } else if (x.flex()) {\r\n columns.push(`${x.flex()}fr`);\r\n }\r\n });\r\n return columns.join(' ');\r\n });\r\n\r\n setFlex(item: XDescriptionItemComponent) {\r\n let classes: { [property: string]: boolean } = {};\r\n if (!XIsEmpty(item.justify())) classes[`x-justify-${item.justify()}`] = true;\r\n if (!XIsEmpty(item.align())) classes[`x-align-${item.align()}`] = true;\r\n if (!XIsEmpty(item.direction())) classes[`x-direction-${item.direction()}`] = true;\r\n return classes;\r\n }\r\n}\r\n","<div class=\"x-description\" [class.x-description-bordered]=\"bordered()\" [ngClass]=\"classMap()\">\r\n @if (title()) {\r\n <div class=\"x-description-header\">\r\n <div class=\"x-description-title\" *xOutlet=\"title()\">\r\n {{ title() }}\r\n </div>\r\n </div>\r\n }\r\n <div class=\"x-description-grid\" [style.grid-template-columns]=\"gridTemplateColumnsSignal()\">\r\n @for (item of items(); track item) {\r\n <div\r\n class=\"x-description-item\"\r\n [style.grid-area]=\"item.gridArea() ? item.gridArea() : '1 / ' + ($index + 1)\"\r\n [class.x-description-item-heading]=\"item.heading()\"\r\n [ngClass]=\"setFlex(item)\"\r\n >\r\n <div class=\"x-description-item-label\">\r\n <ng-container *xOutlet=\"item.label()\">{{ item.label() }}</ng-container>\r\n </div>\r\n <div class=\"x-description-item-content\">\r\n <ng-template [ngTemplateOutlet]=\"item.content()\"></ng-template>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XDescriptionItemComponent } from './description-item.component';\r\nimport { XDescriptionComponent } from './description.component';\r\n\r\n@NgModule({\r\n imports: [XDescriptionComponent, XDescriptionItemComponent],\r\n exports: [XDescriptionComponent, XDescriptionItemComponent],\r\n})\r\nexport class XDescriptionModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAIA;;;;AAIG;AACI,MAAM,kBAAkB,GAAG;AAClC,MAAM,yBAAyB,GAAG,aAAa;AAE/C;;AAEG;MAEU,oBAAqB,SAAQ,iBAAiB,CAAC,yBAAyB,CAAC,CAAA;AADtF,IAAA,WAAA,GAAA;;AAEE;;;;;;;;;;;;;;;AAeG;QACM,IAAK,CAAA,KAAA,GAAG,KAAK,EAAa;AACnC;;;;;;;;;;;AAWG;AACM,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAoB,IAAI,CAAC,MAAM,EAAE,QAAQ,IAAI,KAAK,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;AACvG;;;;;;;;;;;;AAYG;QACM,IAAmB,CAAA,mBAAA,GAAG,KAAK,EAAU;AAC9C;;;;;;;;;;;AAWG;QACM,IAAI,CAAA,IAAA,GAAG,KAAK,CAAQ,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,QAA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;AAC5D,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-description.mjs","sources":["../../../../lib/ng-nest/ui/description/description.property.ts","../../../../lib/ng-nest/ui/description/description-item.component.ts","../../../../lib/ng-nest/ui/description/description.component.ts","../../../../lib/ng-nest/ui/description/description.component.html","../../../../lib/ng-nest/ui/description/description.module.ts","../../../../lib/ng-nest/ui/description/ng-nest-ui-description.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\r\nimport { XPropertyFunction, XToBoolean, XToCssPixelValue, XToNumber } from '@ng-nest/ui/core';\r\nimport type { XAlign, XBoolean, XDirection, XJustify, XNumber, XSize, XTemplate } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Description\r\n * @selector x-description\r\n * @decorator component\r\n */\r\nexport const XDescriptionPrefix = 'x-description';\r\nconst X_DESCRIPTION_CONFIG_NAME = 'description';\r\n\r\n/**\r\n * Description Property\r\n */\r\n@Component({ selector: `${XDescriptionPrefix}-property`, template: '' })\r\nexport class XDescriptionProperty extends XPropertyFunction(X_DESCRIPTION_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 描述列表的标题,支持自定义模板\r\n * @en_US Describe the title of the list, support custom template\r\n * @example\r\n *\r\n * ```html\r\n * <x-description title=\"Title\">\r\n * <x-description-item>name</x-description-item>\r\n * </x-description>\r\n * <x-description [title]=\"titleTpl\">\r\n * <x-description-item>name</x-description-item>\r\n * </x-description>\r\n * <ng-template #titleTpl>Title</ng-template>\r\n * ```\r\n *\r\n */\r\n readonly title = input<XTemplate>();\r\n /**\r\n * @zh_CN 是否展示边框\r\n * @en_US Whether to show column borders\r\n * @example\r\n *\r\n * ```html\r\n * <x-description title=\"Title\" bordered>\r\n * <x-description-item>name</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly bordered = input<boolean, XBoolean>(this.config?.bordered ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN grid 布局下定义列宽度\r\n * @en_US Define column width under grid layout\r\n * @example\r\n *\r\n * ```html\r\n * <x-description title=\"Title\" bordered gridTemplateColumns=\"1fr 1fr\">\r\n * <x-description-item gridArea=\"1/1/2/2\">name</x-description-item>\r\n * <x-description-item gridArea=\"1/2/3/2\">age</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly gridTemplateColumns = input<string>();\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n * @example\r\n *\r\n * ```html\r\n * <x-description title=\"Title\" size=\"big\">\r\n * <x-description-item>name</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly size = input<XSize>(this.config?.size ?? 'medium');\r\n}\r\n\r\n/**\r\n * Description Item\r\n * @selector x-description-item\r\n * @decorator component\r\n */\r\nexport const XDescriptionItemPrefix = 'x-description-item';\r\n\r\n/**\r\n * Description Item Property\r\n */\r\n@Component({ selector: `${XDescriptionItemPrefix}-property`, template: '' })\r\nexport class XDescriptionItemProperty {\r\n /**\r\n * @zh_CN 使用 grid 布局\r\n * @en_US Use grid layout to merge cells\r\n * @example\r\n *\r\n * ```html\r\n * <x-description>\r\n * <x-description-item gridArea=\"1/1/2/2\">name</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly gridArea = input<string>();\r\n /**\r\n * @zh_CN 内容的描述,支持自定义模板\r\n * @en_US Description of content, support custom templates\r\n * @example\r\n *\r\n * ```html\r\n * <x-description>\r\n * <x-description-item label=\"name1\">name1</x-description-item>\r\n * <x-description-item [label]=\"nameTpl\">name2</x-description-item>\r\n * </x-description>\r\n * <ng-template #nameTpl></ng-template>\r\n * ```\r\n *\r\n */\r\n readonly label = input<XTemplate>();\r\n /**\r\n * @zh_CN flex 布局下的子元素水平排列方式\r\n * @en_US Child element under the horizontal arrangement of the layout flex\r\n * @example\r\n *\r\n * ```html\r\n * <x-description>\r\n * <x-description-item justify=\"end\">end</x-description-item>\r\n * <x-description-item justify=\"center\">center</x-description-item>\r\n * <x-description-item justify=\"start\">start</x-description-item>\r\n * <x-description-item justify=\"space-around\">space-around</x-description-item>\r\n * <x-description-item justify=\"space-between\">space-between</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly justify = input<XJustify>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素垂直排列方式\r\n * @en_US Child element under the vertical layout flex arrangement\r\n * @example\r\n *\r\n * ```html\r\n * <x-description>\r\n * <x-description-item align=\"end\">end</x-description-item>\r\n * <x-description-item align=\"center\">center</x-description-item>\r\n * <x-description-item align=\"start\">start</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly align = input<XAlign>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素排列方向\r\n * @en_US Child element under the direction of arrangement of the layout flex\r\n * @example\r\n *\r\n * ```html\r\n * <x-description>\r\n * <x-description-item direction=\"column\">column</x-description-item>\r\n * <x-description-item direction=\"column-reverse\">column-reverse</x-description-item>\r\n * <x-description-item direction=\"row\">row</x-description-item>\r\n * <x-description-item direction=\"row-reverse\">row-reverse</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly direction = input<XDirection>('row');\r\n /**\r\n * @zh_CN 宽度\r\n * @en_US Width\r\n * @example\r\n *\r\n * ```html\r\n * <x-description>\r\n * <x-description-item width=\"100px\">width100</x-description-item>\r\n * <x-description-item width=\"200px\">width200</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly width = input<string, XNumber>('', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN flex 比重\r\n * @en_US Flex proportion\r\n * @example\r\n *\r\n * ```html\r\n * <x-description>\r\n * <x-description-item flex=\"1\">flex1</x-description-item>\r\n * <x-description-item flex=\"2\">flex2</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly flex = input<number, XNumber>(0, { transform: XToNumber });\r\n /**\r\n * @zh_CN 是否是标题\r\n * @en_US Whether it is heading\r\n * @example\r\n *\r\n * ```html\r\n * <x-description>\r\n * <x-description-item label=\"name\" heading></x-description-item>\r\n * <x-description-item>name1</x-description-item>\r\n * </x-description>\r\n * ```\r\n *\r\n */\r\n readonly heading = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n}\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, TemplateRef, viewChild } from '@angular/core';\r\nimport { XDescriptionItemPrefix, XDescriptionItemProperty } from './description.property';\r\n\r\n@Component({\r\n selector: `${XDescriptionItemPrefix}`,\r\n template: `\r\n <ng-template>\r\n <ng-content></ng-content>\r\n </ng-template>\r\n `,\r\n styleUrls: ['./style/index.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XDescriptionItemComponent extends XDescriptionItemProperty {\r\n content = viewChild.required(TemplateRef);\r\n}\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, computed, contentChildren } from '@angular/core';\r\nimport { XDescriptionPrefix, XDescriptionProperty } from './description.property';\r\nimport { XIsEmpty } from '@ng-nest/ui/core';\r\nimport { XDescriptionItemComponent } from './description-item.component';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { NgClass, NgTemplateOutlet } from '@angular/common';\r\n\r\n@Component({\r\n selector: `${XDescriptionPrefix}`,\r\n imports: [NgClass, NgTemplateOutlet, XOutletDirective],\r\n templateUrl: './description.component.html',\r\n styleUrls: ['./style/index.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XDescriptionComponent extends XDescriptionProperty {\r\n items = contentChildren(XDescriptionItemComponent);\r\n\r\n classMap = computed(() => ({\r\n [`${XDescriptionPrefix}-${this.size()}`]: !XIsEmpty(this.size())\r\n }));\r\n\r\n gridTemplateColumnsSignal = computed(() => {\r\n let gridTemplateColumns = this.gridTemplateColumns();\r\n if (gridTemplateColumns) return gridTemplateColumns;\r\n const columns: string[] = [];\r\n this.items().forEach((x) => {\r\n if (x.width()) {\r\n columns.push(x.width());\r\n } else if (x.flex()) {\r\n columns.push(`${x.flex()}fr`);\r\n }\r\n });\r\n return columns.join(' ');\r\n });\r\n\r\n setFlex(item: XDescriptionItemComponent) {\r\n let classes: { [property: string]: boolean } = {};\r\n if (!XIsEmpty(item.justify())) classes[`x-justify-${item.justify()}`] = true;\r\n if (!XIsEmpty(item.align())) classes[`x-align-${item.align()}`] = true;\r\n if (!XIsEmpty(item.direction())) classes[`x-direction-${item.direction()}`] = true;\r\n return classes;\r\n }\r\n}\r\n","<div class=\"x-description\" [class.x-description-bordered]=\"bordered()\" [ngClass]=\"classMap()\">\r\n @if (title()) {\r\n <div class=\"x-description-header\">\r\n <div class=\"x-description-title\" *xOutlet=\"title()\">\r\n {{ title() }}\r\n </div>\r\n </div>\r\n }\r\n <div class=\"x-description-grid\" [style.grid-template-columns]=\"gridTemplateColumnsSignal()\">\r\n @for (item of items(); track item) {\r\n <div\r\n class=\"x-description-item\"\r\n [style.grid-area]=\"item.gridArea() ? item.gridArea() : '1 / ' + ($index + 1)\"\r\n [class.x-description-item-heading]=\"item.heading()\"\r\n [ngClass]=\"setFlex(item)\"\r\n >\r\n <div class=\"x-description-item-label\">\r\n <ng-container *xOutlet=\"item.label()\">{{ item.label() }}</ng-container>\r\n </div>\r\n <div class=\"x-description-item-content\">\r\n <ng-template [ngTemplateOutlet]=\"item.content()\"></ng-template>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XDescriptionItemComponent } from './description-item.component';\r\nimport { XDescriptionComponent } from './description.component';\r\n\r\n@NgModule({\r\n imports: [XDescriptionComponent, XDescriptionItemComponent],\r\n exports: [XDescriptionComponent, XDescriptionItemComponent],\r\n})\r\nexport class XDescriptionModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAIA;;;;AAIG;AACI,MAAM,kBAAkB,GAAG;AAClC,MAAM,yBAAyB,G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