@ng-nest/ui 20.1.7 → 20.2.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 +10 -2
- package/cascade/index.d.ts +2 -1
- package/collapse/index.d.ts +0 -3
- package/color-picker/index.d.ts +2 -1
- package/core/index.d.ts +2 -41
- package/date-picker/index.d.ts +20 -4
- package/dialog/index.d.ts +8 -10
- package/drawer/index.d.ts +10 -12
- package/dropdown/index.d.ts +2 -1
- package/fesm2022/ng-nest-ui-affix.mjs +11 -11
- package/fesm2022/ng-nest-ui-alert.mjs +13 -13
- package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-anchor.mjs +18 -18
- 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-attachments.mjs +18 -18
- package/fesm2022/ng-nest-ui-auto-complete.mjs +33 -26
- package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-avatar.mjs +18 -18
- package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-back-top.mjs +12 -12
- package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-badge.mjs +13 -13
- package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-base-form.mjs +8 -8
- package/fesm2022/ng-nest-ui-bubble.mjs +20 -20
- package/fesm2022/ng-nest-ui-bubble.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-button.mjs +19 -19
- package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-calendar.mjs +11 -11
- package/fesm2022/ng-nest-ui-card.mjs +11 -11
- package/fesm2022/ng-nest-ui-carousel.mjs +21 -21
- package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-cascade.mjs +27 -25
- package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-checkbox.mjs +12 -12
- package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-collapse.mjs +20 -28
- package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color-picker.mjs +31 -29
- package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color.mjs +11 -11
- package/fesm2022/ng-nest-ui-color.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-comment.mjs +18 -18
- package/fesm2022/ng-nest-ui-container.mjs +35 -35
- package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-core.mjs +20 -148
- package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-coversations.mjs +11 -11
- package/fesm2022/ng-nest-ui-crumb.mjs +11 -11
- package/fesm2022/ng-nest-ui-date-picker.mjs +92 -78
- package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-description.mjs +20 -20
- package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dialog.mjs +68 -67
- 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 +11 -11
- package/fesm2022/ng-nest-ui-drawer.mjs +67 -84
- package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dropdown.mjs +27 -25
- package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-empty.mjs +11 -11
- 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 +12 -12
- package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-form.mjs +19 -19
- package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-highlight.mjs +15 -15
- package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-i18n.mjs +14 -14
- package/fesm2022/ng-nest-ui-icon.mjs +14 -14
- package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-image.mjs +21 -21
- 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 +12 -12
- package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input.mjs +19 -19
- package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-keyword.mjs +11 -11
- package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-layout.mjs +18 -18
- package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-link.mjs +12 -12
- package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-list.mjs +23 -23
- package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-loading.mjs +12 -12
- package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-menu.mjs +18 -18
- 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 +8 -8
- package/fesm2022/ng-nest-ui-page-header.mjs +11 -11
- package/fesm2022/ng-nest-ui-pagination.mjs +11 -11
- 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 +11 -11
- package/fesm2022/ng-nest-ui-popover.mjs +25 -21
- 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 +11 -11
- package/fesm2022/ng-nest-ui-prompts.mjs +11 -11
- package/fesm2022/ng-nest-ui-radio.mjs +12 -12
- package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-rate.mjs +12 -12
- package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-resizable.mjs +11 -11
- package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-result.mjs +11 -11
- package/fesm2022/ng-nest-ui-ripple.mjs +11 -11
- package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-scrollable.mjs +8 -8
- package/fesm2022/ng-nest-ui-scrollable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-select.mjs +34 -26
- package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-sender.mjs +15 -15
- package/fesm2022/ng-nest-ui-sender.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-skeleton.mjs +11 -11
- package/fesm2022/ng-nest-ui-slider-select.mjs +13 -13
- package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider.mjs +12 -12
- package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-statistic.mjs +18 -18
- package/fesm2022/ng-nest-ui-steps.mjs +11 -11
- package/fesm2022/ng-nest-ui-suggestion.mjs +11 -11
- package/fesm2022/ng-nest-ui-switch.mjs +12 -12
- package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table-view.mjs +60 -60
- package/fesm2022/ng-nest-ui-table-view.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table.mjs +58 -47
- package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tabs.mjs +30 -30
- package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tag.mjs +22 -18
- package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-text-retract.mjs +11 -11
- package/fesm2022/ng-nest-ui-textarea.mjs +12 -12
- package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-theme.mjs +11 -11
- package/fesm2022/ng-nest-ui-thought-chain.mjs +11 -11
- package/fesm2022/ng-nest-ui-time-ago.mjs +7 -7
- package/fesm2022/ng-nest-ui-time-picker.mjs +31 -29
- 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 +11 -11
- package/fesm2022/ng-nest-ui-tooltip.mjs +27 -74
- package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-transfer.mjs +12 -12
- package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-file.mjs +11 -11
- package/fesm2022/ng-nest-ui-tree-select.mjs +27 -25
- package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree.mjs +23 -23
- package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-typography.mjs +11 -11
- package/fesm2022/ng-nest-ui-upload.mjs +31 -28
- package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-welcome.mjs +11 -11
- package/package.json +57 -57
- package/popover/index.d.ts +2 -1
- package/select/index.d.ts +11 -2
- package/style/animates/base.scss +32 -0
- package/style/animates/conect.scss +32 -0
- package/style/animates/fade.scss +32 -0
- package/style/animates/index.scss +11 -0
- package/style/animates/move.scss +129 -0
- package/style/animates/opacity.scss +26 -0
- package/style/animates/slide.scss +113 -0
- package/style/core/index.css +353 -0
- package/style/core/index.css.map +1 -1
- package/style/core/index.scss +1 -6
- package/table/index.d.ts +15 -4
- package/table-view/index.d.ts +1 -1
- package/tag/index.d.ts +2 -1
- package/time-picker/index.d.ts +2 -1
- package/tooltip/index.d.ts +2 -12
- package/tree-select/index.d.ts +2 -1
|
@@ -133,13 +133,13 @@ class XCheckboxProperty extends XFormControlFunction(X_CHECKBOX_CONFIG_NAME) {
|
|
|
133
133
|
*/
|
|
134
134
|
this.after = input(...(ngDevMode ? [undefined, { debugName: "after" }] : []));
|
|
135
135
|
}
|
|
136
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
137
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
136
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCheckboxProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
137
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.5", type: XCheckboxProperty, isStandalone: true, selector: "x-checkbox-property", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, button: { classPropertyName: "button", publicName: "button", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, tag: { classPropertyName: "tag", publicName: "tag", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, tagBordered: { classPropertyName: "tagBordered", publicName: "tagBordered", isSignal: true, isRequired: false, transformFunction: null }, tagDark: { classPropertyName: "tagDark", publicName: "tagDark", isSignal: true, isRequired: false, transformFunction: null }, single: { classPropertyName: "single", publicName: "single", isSignal: true, isRequired: false, transformFunction: null }, vertical: { classPropertyName: "vertical", publicName: "vertical", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelWidth: { classPropertyName: "labelWidth", publicName: "labelWidth", isSignal: true, isRequired: false, transformFunction: null }, labelAlign: { classPropertyName: "labelAlign", publicName: "labelAlign", 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 }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, valueTpl: { classPropertyName: "valueTpl", publicName: "valueTpl", isSignal: true, isRequired: false, transformFunction: null }, valueTplContext: { classPropertyName: "valueTplContext", publicName: "valueTplContext", isSignal: true, isRequired: false, transformFunction: null }, before: { classPropertyName: "before", publicName: "before", isSignal: true, isRequired: false, transformFunction: null }, after: { classPropertyName: "after", publicName: "after", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
138
138
|
}
|
|
139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCheckboxProperty, decorators: [{
|
|
140
140
|
type: Component,
|
|
141
141
|
args: [{ selector: `${XCheckboxPrefix}-property`, template: '' }]
|
|
142
|
-
}] });
|
|
142
|
+
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], button: [{ type: i0.Input, args: [{ isSignal: true, alias: "button", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], tag: [{ type: i0.Input, args: [{ isSignal: true, alias: "tag", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], tagBordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "tagBordered", required: false }] }], tagDark: [{ type: i0.Input, args: [{ isSignal: true, alias: "tagDark", required: false }] }], single: [{ type: i0.Input, args: [{ isSignal: true, alias: "single", required: false }] }], vertical: [{ type: i0.Input, args: [{ isSignal: true, alias: "vertical", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelWidth", required: false }] }], labelAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelAlign", required: false }] }], justify: [{ type: i0.Input, args: [{ isSignal: true, alias: "justify", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], valueTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueTpl", required: false }] }], valueTplContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueTplContext", required: false }] }], before: [{ type: i0.Input, args: [{ isSignal: true, alias: "before", required: false }] }], after: [{ type: i0.Input, args: [{ isSignal: true, alias: "after", required: false }] }] } });
|
|
143
143
|
|
|
144
144
|
class XCheckboxComponent extends XCheckboxProperty {
|
|
145
145
|
constructor() {
|
|
@@ -224,20 +224,20 @@ class XCheckboxComponent extends XCheckboxProperty {
|
|
|
224
224
|
this.nodes.set(x);
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
228
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: XCheckboxComponent, isStandalone: true, selector: "x-checkbox", providers: [XValueAccessor(XCheckboxComponent)], viewQueries: [{ propertyName: "checkbox", first: true, predicate: ["checkbox"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\r\n #checkbox\r\n class=\"x-checkbox\"\r\n [class.x-flex]=\"justify() || align() || direction()\"\r\n [class.x-disabled]=\"disabledComputed()\"\r\n [class.x-required]=\"requiredIsEmpty()\"\r\n [class.x-invalid]=\"invalid()\"\r\n [class.x-checkbox-button]=\"button()\"\r\n [class.x-checkbox-icon]=\"icon()\"\r\n [class.x-checkbox-vertical]=\"vertical()\"\r\n [class.x-checkbox-after]=\"after()\"\r\n [class.x-checkbox-before]=\"before()\"\r\n [class.x-checkbox-after-template]=\"afterIsTemplate()\"\r\n [class.x-checkbox-before-template]=\"beforeIsTemplate()\"\r\n [ngClass]=\"classMap()\"\r\n>\r\n @if (label()) {\r\n <label\r\n [class.x-checkbox-label-required]=\"requiredComputed()\"\r\n [style.width]=\"labelWidth()\"\r\n [ngClass]=\"labelMapSignal()\"\r\n *xOutlet=\"label()\"\r\n >\r\n {{ label() }}\r\n </label>\r\n }\r\n <div class=\"x-checkbox-row\">\r\n @if (before()) {\r\n <div class=\"x-checkbox-row-before\">\r\n <ng-container *xOutlet=\"before()\">{{ before() }}</ng-container>\r\n </div>\r\n }\r\n <div class=\"x-checkbox-row-list\">\r\n @switch (checkboxType()) {\r\n @case ('initial') {\r\n @for (item of nodes(); track item.id) {\r\n <div\r\n class=\"x-checkbox-row-item\"\r\n [class.x-checked]=\"item.checked!\"\r\n [class.x-disabled]=\"disabledComputed() || item.disabled\"\r\n [class.x-indeterminate]=\"indeterminate()\"\r\n (click)=\"checkboxClick($event, item)\"\r\n >\r\n <span class=\"x-checkbox-box\"></span>\r\n <span class=\"x-checkbox-label\">\r\n <ng-container *xOutlet=\"item.label; context: { $node: item.node }\">{{ item.label }}</ng-container>\r\n </span>\r\n </div>\r\n }\r\n }\r\n @case ('button') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [title]=\"item.title!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.checked!\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"checkboxClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('icon') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [title]=\"item.title!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.checked!\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"checkboxClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('tag') {\r\n @for (item of nodes(); track item) {\r\n <x-tag\r\n checked\r\n manual\r\n [type]=\"type()\"\r\n [size]=\"size()\"\r\n [bordered]=\"tagBordered()\"\r\n [dark]=\"tagDark()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n [selected]=\"item.checked!\"\r\n (click)=\"checkboxClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n }\r\n }\r\n }\r\n </div>\r\n @if (after()) {\r\n <div class=\"x-checkbox-row-after\">\r\n <ng-container *xOutlet=\"after()\">{{ after() }}</ng-container>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: ["x-checkbox{display:inline-block}.x-checkbox{margin:0;padding:0}.x-checkbox{width:100%}.x-checkbox.x-flex{display:flex}.x-checkbox.x-justify-start{justify-content:flex-start}.x-checkbox.x-justify-center{justify-content:center}.x-checkbox.x-justify-end{justify-content:flex-end}.x-checkbox.x-justify-space-between{justify-content:space-between}.x-checkbox.x-justify-space-around{justify-content:space-around}.x-checkbox.x-align-start{align-items:flex-start}.x-checkbox.x-align-center{align-items:center}.x-checkbox.x-align-end{align-items:flex-end}.x-checkbox.x-direction-column{flex-direction:column}.x-checkbox.x-direction-column-reverse{flex-direction:column-reverse}.x-checkbox.x-direction-row{flex-direction:row}.x-checkbox.x-direction-row-reverse{flex-direction:row-reverse}.x-checkbox>label{display:inline-block;white-space:nowrap;height:var(--x-height-medium);line-height:var(--x-height-medium);position:relative;color:var(--x-text-300);font-weight:500}.x-checkbox>label.x-text-align-start{text-align:start}.x-checkbox>label.x-text-align-center{text-align:center}.x-checkbox>label.x-text-align-end{text-align:end}.x-checkbox-row{flex:1;display:flex;align-items:center;flex-wrap:wrap}.x-checkbox-row .x-checkbox-row-before,.x-checkbox-row .x-checkbox-row-after{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-background-a100);padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-checkbox-row-list{position:relative;display:inline-flex;align-items:center}.x-checkbox-row-list x-tag:not(:first-child){margin-left:var(--x-font-size)}.x-checkbox-row-item{position:relative;display:inline-flex;align-items:center;white-space:nowrap;outline:none;margin-right:var(--x-font-size);font-size:var(--x-font-size);cursor:pointer;transition:all .3s}.x-checkbox-row-item:hover{color:var(--x-primary)}.x-checkbox-row-item:hover .x-checkbox-box{border-color:var(--x-primary)}.x-checkbox-row-item:last-child{margin-right:0}.x-checkbox-row-item.x-indeterminate:not(.x-checked) .x-checkbox-box{border-color:var(--x-primary)}.x-checkbox-row-item.x-indeterminate:not(.x-checked) .x-checkbox-box:after{top:50%;left:50%;width:.75rem;height:.75rem;background-color:var(--x-primary);border:0;transform:translate(-50%,-50%) scale(1);opacity:1;border-radius:.125rem;content:\" \";transition:transform .2s}.x-checkbox-row-item.x-checked .x-checkbox-box{border-color:var(--x-primary);background-color:var(--x-primary)}.x-checkbox-row-item.x-checked .x-checkbox-box:after{border:.125rem solid white;border-top:0;border-left:0;top:.575rem;left:.325rem;width:.425rem;height:.825rem;transform:rotate(40deg) scale(1) translate(-50%,-50%);opacity:1;transition:transform .2s;content:\" \"}.x-checkbox-row-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-checkbox-row-item.x-disabled .x-checkbox-box{border-color:var(--x-border-a900);background-color:var(--x-border-a300)}.x-checkbox-row-item.x-disabled .x-checkbox-box:after{border-color:var(--x-text-400);background-color:transparent}.x-checkbox-button .x-checkbox-row-before,.x-checkbox-icon .x-checkbox-row-before{margin-right:0}.x-checkbox-button .x-checkbox-row-after,.x-checkbox-icon .x-checkbox-row-after{margin-left:0}.x-checkbox-vertical .x-checkbox-row-list{flex-direction:column;align-items:flex-start}.x-checkbox-vertical .x-checkbox-row-list x-tag{margin-left:0}.x-checkbox-vertical .x-checkbox-row-list x-tag:not(:first-child){margin-top:.25rem}.x-checkbox-vertical .x-checkbox-row-item{margin-right:0}.x-checkbox-vertical .x-checkbox-row-item:not(:first-child){margin-top:.25rem}.x-checkbox-box{border:var(--x-border-width) solid var(--x-border);width:calc(var(--x-height-medium) - .875rem);height:calc(var(--x-height-medium) - .875rem);border-radius:.425rem;background-color:var(--x-background-a100);position:relative;display:inline-block;box-sizing:border-box;transition:all .3s}.x-checkbox-box:hover{border-color:var(--x-primary)}.x-checkbox-box:after{position:absolute;top:.35rem;left:.175rem;display:inline-block;width:.3rem;height:.6rem;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-top:0;border-left:0;transform:rotate(40deg) scale(0) translate(-50%,-50%);opacity:0;transition:scale .2s;content:\" \"}.x-checkbox-label{margin-left:.325rem;-webkit-user-select:none;user-select:none}.x-checkbox-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-checkbox-before:not(.x-checkbox-before-template,.x-checkbox-button,.x-checkbox-icon) .x-checkbox-row-before{margin-right:var(--x-padding-medium)}.x-checkbox-before.x-checkbox-button .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button,.x-checkbox-before.x-checkbox-icon .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-checkbox-before.x-checkbox-button .x-checkbox-row-before,.x-checkbox-before.x-checkbox-icon .x-checkbox-row-before{margin-right:0;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.x-checkbox-before-template .x-checkbox-row-before{display:contents}.x-checkbox-before-template .x-checkbox-row-list{margin-left:var(--x-padding-medium)}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list{margin-left:0}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list .x-button,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list .x-button{margin-left:calc(var(--x-border-width) * -1)}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list .x-button:hover,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list .x-button:focus,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list .x-button:hover,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list .x-button:focus{z-index:1}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before input:hover,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before input:focus,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before .x-button:hover,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before .x-button:focus,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before input:hover,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before input:focus,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before .x-button:hover,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before .x-button:focus{z-index:1}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before input,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before .x-button,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before input,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-checkbox-after:not(.x-checkbox-before-template,.x-checkbox-button,.x-checkbox-icon) .x-checkbox-row-after{margin-left:var(--x-padding-medium)}.x-checkbox-after.x-checkbox-button .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button,.x-checkbox-after.x-checkbox-icon .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-checkbox-after.x-checkbox-button .x-checkbox-row-after,.x-checkbox-after.x-checkbox-icon .x-checkbox-row-after{margin-left:0;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.x-checkbox-after-template .x-checkbox-row-after{display:contents}.x-checkbox-after-template .x-checkbox-row-list{margin-right:var(--x-padding-medium)}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list{margin-right:0}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list .x-button,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list .x-button{margin-right:calc(var(--x-border-width) * -1)}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list .x-button:hover,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list .x-button:focus,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list .x-button:hover,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list .x-button:focus{z-index:1}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after input:hover,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after input:focus,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after .x-button:hover,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after .x-button:focus,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after input:hover,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after input:focus,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after .x-button:hover,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after .x-button:focus{z-index:1}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after input,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after .x-button,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after input,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-checkbox.x-disabled .x-checkbox-item.x-indeterminate .x-checkbox-box:after{background-color:var(--x-text-400)}.x-checkbox.x-disabled .x-checkbox-item.x-checked .x-checkbox-box:after{background-color:transparent}.x-checkbox.x-disabled .x-checkbox-item{color:var(--x-text-400);cursor:not-allowed}.x-checkbox.x-disabled .x-checkbox-item .x-checkbox-box{border-color:var(--x-border-a900);background-color:var(--x-border-a300)}.x-checkbox.x-disabled .x-checkbox-item .x-checkbox-box:after{border-color:var(--x-text-400);background-color:transparent}.x-checkbox.x-invalid>label,.x-checkbox.x-required>label{color:var(--x-danger)}.x-checkbox.x-direction-row>label{padding:0 .5rem 0 0}.x-checkbox.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-checkbox.x-direction-column,.x-checkbox.x-direction-column-reverse{align-items:inherit}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: XButtonComponent, selector: "x-button" }, { kind: "component", type: XButtonsComponent, selector: "x-buttons" }, { kind: "component", type: XTagComponent, selector: "x-tag" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
227
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
228
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.5", type: XCheckboxComponent, isStandalone: true, selector: "x-checkbox", providers: [XValueAccessor(XCheckboxComponent)], viewQueries: [{ propertyName: "checkbox", first: true, predicate: ["checkbox"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\r\n #checkbox\r\n class=\"x-checkbox\"\r\n [class.x-flex]=\"justify() || align() || direction()\"\r\n [class.x-disabled]=\"disabledComputed()\"\r\n [class.x-required]=\"requiredIsEmpty()\"\r\n [class.x-invalid]=\"invalid()\"\r\n [class.x-checkbox-button]=\"button()\"\r\n [class.x-checkbox-icon]=\"icon()\"\r\n [class.x-checkbox-vertical]=\"vertical()\"\r\n [class.x-checkbox-after]=\"after()\"\r\n [class.x-checkbox-before]=\"before()\"\r\n [class.x-checkbox-after-template]=\"afterIsTemplate()\"\r\n [class.x-checkbox-before-template]=\"beforeIsTemplate()\"\r\n [ngClass]=\"classMap()\"\r\n>\r\n @if (label()) {\r\n <label\r\n [class.x-checkbox-label-required]=\"requiredComputed()\"\r\n [style.width]=\"labelWidth()\"\r\n [ngClass]=\"labelMapSignal()\"\r\n *xOutlet=\"label()\"\r\n >\r\n {{ label() }}\r\n </label>\r\n }\r\n <div class=\"x-checkbox-row\">\r\n @if (before()) {\r\n <div class=\"x-checkbox-row-before\">\r\n <ng-container *xOutlet=\"before()\">{{ before() }}</ng-container>\r\n </div>\r\n }\r\n <div class=\"x-checkbox-row-list\">\r\n @switch (checkboxType()) {\r\n @case ('initial') {\r\n @for (item of nodes(); track item.id) {\r\n <div\r\n class=\"x-checkbox-row-item\"\r\n [class.x-checked]=\"item.checked!\"\r\n [class.x-disabled]=\"disabledComputed() || item.disabled\"\r\n [class.x-indeterminate]=\"indeterminate()\"\r\n (click)=\"checkboxClick($event, item)\"\r\n >\r\n <span class=\"x-checkbox-box\"></span>\r\n <span class=\"x-checkbox-label\">\r\n <ng-container *xOutlet=\"item.label; context: { $node: item.node }\">{{ item.label }}</ng-container>\r\n </span>\r\n </div>\r\n }\r\n }\r\n @case ('button') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [title]=\"item.title!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.checked!\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"checkboxClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('icon') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [title]=\"item.title!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.checked!\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"checkboxClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('tag') {\r\n @for (item of nodes(); track item) {\r\n <x-tag\r\n checked\r\n manual\r\n [type]=\"type()\"\r\n [size]=\"size()\"\r\n [bordered]=\"tagBordered()\"\r\n [dark]=\"tagDark()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n [selected]=\"item.checked!\"\r\n (click)=\"checkboxClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n }\r\n }\r\n }\r\n </div>\r\n @if (after()) {\r\n <div class=\"x-checkbox-row-after\">\r\n <ng-container *xOutlet=\"after()\">{{ after() }}</ng-container>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: ["x-checkbox{display:inline-block}.x-checkbox{margin:0;padding:0}.x-checkbox{width:100%}.x-checkbox.x-flex{display:flex}.x-checkbox.x-justify-start{justify-content:flex-start}.x-checkbox.x-justify-center{justify-content:center}.x-checkbox.x-justify-end{justify-content:flex-end}.x-checkbox.x-justify-space-between{justify-content:space-between}.x-checkbox.x-justify-space-around{justify-content:space-around}.x-checkbox.x-align-start{align-items:flex-start}.x-checkbox.x-align-center{align-items:center}.x-checkbox.x-align-end{align-items:flex-end}.x-checkbox.x-direction-column{flex-direction:column}.x-checkbox.x-direction-column-reverse{flex-direction:column-reverse}.x-checkbox.x-direction-row{flex-direction:row}.x-checkbox.x-direction-row-reverse{flex-direction:row-reverse}.x-checkbox>label{display:inline-block;white-space:nowrap;height:var(--x-height-medium);line-height:var(--x-height-medium);position:relative;color:var(--x-text-300);font-weight:500}.x-checkbox>label.x-text-align-start{text-align:start}.x-checkbox>label.x-text-align-center{text-align:center}.x-checkbox>label.x-text-align-end{text-align:end}.x-checkbox-row{flex:1;display:flex;align-items:center;flex-wrap:wrap}.x-checkbox-row .x-checkbox-row-before,.x-checkbox-row .x-checkbox-row-after{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-background-a100);padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-checkbox-row-list{position:relative;display:inline-flex;align-items:center}.x-checkbox-row-list x-tag:not(:first-child){margin-left:var(--x-font-size)}.x-checkbox-row-item{position:relative;display:inline-flex;align-items:center;white-space:nowrap;outline:none;margin-right:var(--x-font-size);font-size:var(--x-font-size);cursor:pointer;transition:all .3s}.x-checkbox-row-item:hover{color:var(--x-primary)}.x-checkbox-row-item:hover .x-checkbox-box{border-color:var(--x-primary)}.x-checkbox-row-item:last-child{margin-right:0}.x-checkbox-row-item.x-indeterminate:not(.x-checked) .x-checkbox-box{border-color:var(--x-primary)}.x-checkbox-row-item.x-indeterminate:not(.x-checked) .x-checkbox-box:after{top:50%;left:50%;width:.75rem;height:.75rem;background-color:var(--x-primary);border:0;transform:translate(-50%,-50%) scale(1);opacity:1;border-radius:.125rem;content:\" \";transition:transform .2s}.x-checkbox-row-item.x-checked .x-checkbox-box{border-color:var(--x-primary);background-color:var(--x-primary)}.x-checkbox-row-item.x-checked .x-checkbox-box:after{border:.125rem solid white;border-top:0;border-left:0;top:.575rem;left:.325rem;width:.425rem;height:.825rem;transform:rotate(40deg) scale(1) translate(-50%,-50%);opacity:1;transition:transform .2s;content:\" \"}.x-checkbox-row-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-checkbox-row-item.x-disabled .x-checkbox-box{border-color:var(--x-border-a900);background-color:var(--x-border-a300)}.x-checkbox-row-item.x-disabled .x-checkbox-box:after{border-color:var(--x-text-400);background-color:transparent}.x-checkbox-button .x-checkbox-row-before,.x-checkbox-icon .x-checkbox-row-before{margin-right:0}.x-checkbox-button .x-checkbox-row-after,.x-checkbox-icon .x-checkbox-row-after{margin-left:0}.x-checkbox-vertical .x-checkbox-row-list{flex-direction:column;align-items:flex-start}.x-checkbox-vertical .x-checkbox-row-list x-tag{margin-left:0}.x-checkbox-vertical .x-checkbox-row-list x-tag:not(:first-child){margin-top:.25rem}.x-checkbox-vertical .x-checkbox-row-item{margin-right:0}.x-checkbox-vertical .x-checkbox-row-item:not(:first-child){margin-top:.25rem}.x-checkbox-box{border:var(--x-border-width) solid var(--x-border);width:calc(var(--x-height-medium) - .875rem);height:calc(var(--x-height-medium) - .875rem);border-radius:.425rem;background-color:var(--x-background-a100);position:relative;display:inline-block;box-sizing:border-box;transition:all .3s}.x-checkbox-box:hover{border-color:var(--x-primary)}.x-checkbox-box:after{position:absolute;top:.35rem;left:.175rem;display:inline-block;width:.3rem;height:.6rem;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-top:0;border-left:0;transform:rotate(40deg) scale(0) translate(-50%,-50%);opacity:0;transition:scale .2s;content:\" \"}.x-checkbox-label{margin-left:.325rem;-webkit-user-select:none;user-select:none}.x-checkbox-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-checkbox-before:not(.x-checkbox-before-template,.x-checkbox-button,.x-checkbox-icon) .x-checkbox-row-before{margin-right:var(--x-padding-medium)}.x-checkbox-before.x-checkbox-button .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button,.x-checkbox-before.x-checkbox-icon .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-checkbox-before.x-checkbox-button .x-checkbox-row-before,.x-checkbox-before.x-checkbox-icon .x-checkbox-row-before{margin-right:0;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.x-checkbox-before-template .x-checkbox-row-before{display:contents}.x-checkbox-before-template .x-checkbox-row-list{margin-left:var(--x-padding-medium)}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list{margin-left:0}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list .x-button,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list .x-button{margin-left:calc(var(--x-border-width) * -1)}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list .x-button:hover,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list .x-button:focus,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list .x-button:hover,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list .x-button:focus{z-index:1}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before input:hover,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before input:focus,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before .x-button:hover,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before .x-button:focus,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before input:hover,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before input:focus,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before .x-button:hover,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before .x-button:focus{z-index:1}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before input,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before .x-button,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before input,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-checkbox-after:not(.x-checkbox-before-template,.x-checkbox-button,.x-checkbox-icon) .x-checkbox-row-after{margin-left:var(--x-padding-medium)}.x-checkbox-after.x-checkbox-button .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button,.x-checkbox-after.x-checkbox-icon .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-checkbox-after.x-checkbox-button .x-checkbox-row-after,.x-checkbox-after.x-checkbox-icon .x-checkbox-row-after{margin-left:0;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.x-checkbox-after-template .x-checkbox-row-after{display:contents}.x-checkbox-after-template .x-checkbox-row-list{margin-right:var(--x-padding-medium)}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list{margin-right:0}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list .x-button,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list .x-button{margin-right:calc(var(--x-border-width) * -1)}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list .x-button:hover,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list .x-button:focus,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list .x-button:hover,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list .x-button:focus{z-index:1}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after input:hover,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after input:focus,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after .x-button:hover,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after .x-button:focus,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after input:hover,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after input:focus,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after .x-button:hover,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after .x-button:focus{z-index:1}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after input,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after .x-button,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after input,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-checkbox.x-disabled .x-checkbox-item.x-indeterminate .x-checkbox-box:after{background-color:var(--x-text-400)}.x-checkbox.x-disabled .x-checkbox-item.x-checked .x-checkbox-box:after{background-color:transparent}.x-checkbox.x-disabled .x-checkbox-item{color:var(--x-text-400);cursor:not-allowed}.x-checkbox.x-disabled .x-checkbox-item .x-checkbox-box{border-color:var(--x-border-a900);background-color:var(--x-border-a300)}.x-checkbox.x-disabled .x-checkbox-item .x-checkbox-box:after{border-color:var(--x-text-400);background-color:transparent}.x-checkbox.x-invalid>label,.x-checkbox.x-required>label{color:var(--x-danger)}.x-checkbox.x-direction-row>label{padding:0 .5rem 0 0}.x-checkbox.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-checkbox.x-direction-column,.x-checkbox.x-direction-column-reverse{align-items:inherit}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: XButtonComponent, selector: "x-button" }, { kind: "component", type: XButtonsComponent, selector: "x-buttons" }, { kind: "component", type: XTagComponent, selector: "x-tag" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
229
229
|
}
|
|
230
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCheckboxComponent, decorators: [{
|
|
231
231
|
type: Component,
|
|
232
232
|
args: [{ selector: `${XCheckboxPrefix}`, imports: [NgClass, FormsModule, XButtonComponent, XButtonsComponent, XTagComponent, XOutletDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XCheckboxComponent)], template: "<div\r\n #checkbox\r\n class=\"x-checkbox\"\r\n [class.x-flex]=\"justify() || align() || direction()\"\r\n [class.x-disabled]=\"disabledComputed()\"\r\n [class.x-required]=\"requiredIsEmpty()\"\r\n [class.x-invalid]=\"invalid()\"\r\n [class.x-checkbox-button]=\"button()\"\r\n [class.x-checkbox-icon]=\"icon()\"\r\n [class.x-checkbox-vertical]=\"vertical()\"\r\n [class.x-checkbox-after]=\"after()\"\r\n [class.x-checkbox-before]=\"before()\"\r\n [class.x-checkbox-after-template]=\"afterIsTemplate()\"\r\n [class.x-checkbox-before-template]=\"beforeIsTemplate()\"\r\n [ngClass]=\"classMap()\"\r\n>\r\n @if (label()) {\r\n <label\r\n [class.x-checkbox-label-required]=\"requiredComputed()\"\r\n [style.width]=\"labelWidth()\"\r\n [ngClass]=\"labelMapSignal()\"\r\n *xOutlet=\"label()\"\r\n >\r\n {{ label() }}\r\n </label>\r\n }\r\n <div class=\"x-checkbox-row\">\r\n @if (before()) {\r\n <div class=\"x-checkbox-row-before\">\r\n <ng-container *xOutlet=\"before()\">{{ before() }}</ng-container>\r\n </div>\r\n }\r\n <div class=\"x-checkbox-row-list\">\r\n @switch (checkboxType()) {\r\n @case ('initial') {\r\n @for (item of nodes(); track item.id) {\r\n <div\r\n class=\"x-checkbox-row-item\"\r\n [class.x-checked]=\"item.checked!\"\r\n [class.x-disabled]=\"disabledComputed() || item.disabled\"\r\n [class.x-indeterminate]=\"indeterminate()\"\r\n (click)=\"checkboxClick($event, item)\"\r\n >\r\n <span class=\"x-checkbox-box\"></span>\r\n <span class=\"x-checkbox-label\">\r\n <ng-container *xOutlet=\"item.label; context: { $node: item.node }\">{{ item.label }}</ng-container>\r\n </span>\r\n </div>\r\n }\r\n }\r\n @case ('button') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [title]=\"item.title!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.checked!\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"checkboxClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('icon') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [title]=\"item.title!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.checked!\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"checkboxClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('tag') {\r\n @for (item of nodes(); track item) {\r\n <x-tag\r\n checked\r\n manual\r\n [type]=\"type()\"\r\n [size]=\"size()\"\r\n [bordered]=\"tagBordered()\"\r\n [dark]=\"tagDark()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n [selected]=\"item.checked!\"\r\n (click)=\"checkboxClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n }\r\n }\r\n }\r\n </div>\r\n @if (after()) {\r\n <div class=\"x-checkbox-row-after\">\r\n <ng-container *xOutlet=\"after()\">{{ after() }}</ng-container>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: ["x-checkbox{display:inline-block}.x-checkbox{margin:0;padding:0}.x-checkbox{width:100%}.x-checkbox.x-flex{display:flex}.x-checkbox.x-justify-start{justify-content:flex-start}.x-checkbox.x-justify-center{justify-content:center}.x-checkbox.x-justify-end{justify-content:flex-end}.x-checkbox.x-justify-space-between{justify-content:space-between}.x-checkbox.x-justify-space-around{justify-content:space-around}.x-checkbox.x-align-start{align-items:flex-start}.x-checkbox.x-align-center{align-items:center}.x-checkbox.x-align-end{align-items:flex-end}.x-checkbox.x-direction-column{flex-direction:column}.x-checkbox.x-direction-column-reverse{flex-direction:column-reverse}.x-checkbox.x-direction-row{flex-direction:row}.x-checkbox.x-direction-row-reverse{flex-direction:row-reverse}.x-checkbox>label{display:inline-block;white-space:nowrap;height:var(--x-height-medium);line-height:var(--x-height-medium);position:relative;color:var(--x-text-300);font-weight:500}.x-checkbox>label.x-text-align-start{text-align:start}.x-checkbox>label.x-text-align-center{text-align:center}.x-checkbox>label.x-text-align-end{text-align:end}.x-checkbox-row{flex:1;display:flex;align-items:center;flex-wrap:wrap}.x-checkbox-row .x-checkbox-row-before,.x-checkbox-row .x-checkbox-row-after{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-background-a100);padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-checkbox-row-list{position:relative;display:inline-flex;align-items:center}.x-checkbox-row-list x-tag:not(:first-child){margin-left:var(--x-font-size)}.x-checkbox-row-item{position:relative;display:inline-flex;align-items:center;white-space:nowrap;outline:none;margin-right:var(--x-font-size);font-size:var(--x-font-size);cursor:pointer;transition:all .3s}.x-checkbox-row-item:hover{color:var(--x-primary)}.x-checkbox-row-item:hover .x-checkbox-box{border-color:var(--x-primary)}.x-checkbox-row-item:last-child{margin-right:0}.x-checkbox-row-item.x-indeterminate:not(.x-checked) .x-checkbox-box{border-color:var(--x-primary)}.x-checkbox-row-item.x-indeterminate:not(.x-checked) .x-checkbox-box:after{top:50%;left:50%;width:.75rem;height:.75rem;background-color:var(--x-primary);border:0;transform:translate(-50%,-50%) scale(1);opacity:1;border-radius:.125rem;content:\" \";transition:transform .2s}.x-checkbox-row-item.x-checked .x-checkbox-box{border-color:var(--x-primary);background-color:var(--x-primary)}.x-checkbox-row-item.x-checked .x-checkbox-box:after{border:.125rem solid white;border-top:0;border-left:0;top:.575rem;left:.325rem;width:.425rem;height:.825rem;transform:rotate(40deg) scale(1) translate(-50%,-50%);opacity:1;transition:transform .2s;content:\" \"}.x-checkbox-row-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-checkbox-row-item.x-disabled .x-checkbox-box{border-color:var(--x-border-a900);background-color:var(--x-border-a300)}.x-checkbox-row-item.x-disabled .x-checkbox-box:after{border-color:var(--x-text-400);background-color:transparent}.x-checkbox-button .x-checkbox-row-before,.x-checkbox-icon .x-checkbox-row-before{margin-right:0}.x-checkbox-button .x-checkbox-row-after,.x-checkbox-icon .x-checkbox-row-after{margin-left:0}.x-checkbox-vertical .x-checkbox-row-list{flex-direction:column;align-items:flex-start}.x-checkbox-vertical .x-checkbox-row-list x-tag{margin-left:0}.x-checkbox-vertical .x-checkbox-row-list x-tag:not(:first-child){margin-top:.25rem}.x-checkbox-vertical .x-checkbox-row-item{margin-right:0}.x-checkbox-vertical .x-checkbox-row-item:not(:first-child){margin-top:.25rem}.x-checkbox-box{border:var(--x-border-width) solid var(--x-border);width:calc(var(--x-height-medium) - .875rem);height:calc(var(--x-height-medium) - .875rem);border-radius:.425rem;background-color:var(--x-background-a100);position:relative;display:inline-block;box-sizing:border-box;transition:all .3s}.x-checkbox-box:hover{border-color:var(--x-primary)}.x-checkbox-box:after{position:absolute;top:.35rem;left:.175rem;display:inline-block;width:.3rem;height:.6rem;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-top:0;border-left:0;transform:rotate(40deg) scale(0) translate(-50%,-50%);opacity:0;transition:scale .2s;content:\" \"}.x-checkbox-label{margin-left:.325rem;-webkit-user-select:none;user-select:none}.x-checkbox-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-checkbox-before:not(.x-checkbox-before-template,.x-checkbox-button,.x-checkbox-icon) .x-checkbox-row-before{margin-right:var(--x-padding-medium)}.x-checkbox-before.x-checkbox-button .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button,.x-checkbox-before.x-checkbox-icon .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-checkbox-before.x-checkbox-button .x-checkbox-row-before,.x-checkbox-before.x-checkbox-icon .x-checkbox-row-before{margin-right:0;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.x-checkbox-before-template .x-checkbox-row-before{display:contents}.x-checkbox-before-template .x-checkbox-row-list{margin-left:var(--x-padding-medium)}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list{margin-left:0}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list .x-button,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list .x-button{margin-left:calc(var(--x-border-width) * -1)}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list .x-button:hover,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list .x-button:focus,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list .x-button:hover,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list .x-button:focus{z-index:1}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before input:hover,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before input:focus,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before .x-button:hover,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before .x-button:focus,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before input:hover,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before input:focus,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before .x-button:hover,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before .x-button:focus{z-index:1}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before input,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before .x-button,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before input,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-checkbox-after:not(.x-checkbox-before-template,.x-checkbox-button,.x-checkbox-icon) .x-checkbox-row-after{margin-left:var(--x-padding-medium)}.x-checkbox-after.x-checkbox-button .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button,.x-checkbox-after.x-checkbox-icon .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-checkbox-after.x-checkbox-button .x-checkbox-row-after,.x-checkbox-after.x-checkbox-icon .x-checkbox-row-after{margin-left:0;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.x-checkbox-after-template .x-checkbox-row-after{display:contents}.x-checkbox-after-template .x-checkbox-row-list{margin-right:var(--x-padding-medium)}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list{margin-right:0}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list .x-button,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list .x-button{margin-right:calc(var(--x-border-width) * -1)}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list .x-button:hover,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list .x-button:focus,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list .x-button:hover,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list .x-button:focus{z-index:1}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after input:hover,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after input:focus,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after .x-button:hover,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after .x-button:focus,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after input:hover,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after input:focus,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after .x-button:hover,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after .x-button:focus{z-index:1}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after input,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after .x-button,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after input,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-checkbox.x-disabled .x-checkbox-item.x-indeterminate .x-checkbox-box:after{background-color:var(--x-text-400)}.x-checkbox.x-disabled .x-checkbox-item.x-checked .x-checkbox-box:after{background-color:transparent}.x-checkbox.x-disabled .x-checkbox-item{color:var(--x-text-400);cursor:not-allowed}.x-checkbox.x-disabled .x-checkbox-item .x-checkbox-box{border-color:var(--x-border-a900);background-color:var(--x-border-a300)}.x-checkbox.x-disabled .x-checkbox-item .x-checkbox-box:after{border-color:var(--x-text-400);background-color:transparent}.x-checkbox.x-invalid>label,.x-checkbox.x-required>label{color:var(--x-danger)}.x-checkbox.x-direction-row>label{padding:0 .5rem 0 0}.x-checkbox.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-checkbox.x-direction-column,.x-checkbox.x-direction-column-reverse{align-items:inherit}\n"] }]
|
|
233
|
-
}], ctorParameters: () => [] });
|
|
233
|
+
}], ctorParameters: () => [], propDecorators: { checkbox: [{ type: i0.ViewChild, args: ['checkbox', { ...{ read: (ElementRef) }, isSignal: true }] }] } });
|
|
234
234
|
|
|
235
235
|
class XCheckboxModule {
|
|
236
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
237
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
238
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
236
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
237
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.5", ngImport: i0, type: XCheckboxModule, imports: [XCheckboxComponent], exports: [XCheckboxComponent] }); }
|
|
238
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCheckboxModule, imports: [XCheckboxComponent] }); }
|
|
239
239
|
}
|
|
240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCheckboxModule, decorators: [{
|
|
241
241
|
type: NgModule,
|
|
242
242
|
args: [{
|
|
243
243
|
exports: [XCheckboxComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-checkbox.mjs","sources":["../../../../lib/ng-nest/ui/checkbox/checkbox.property.ts","../../../../lib/ng-nest/ui/checkbox/checkbox.component.ts","../../../../lib/ng-nest/ui/checkbox/checkbox.component.html","../../../../lib/ng-nest/ui/checkbox/checkbox.module.ts","../../../../lib/ng-nest/ui/checkbox/ng-nest-ui-checkbox.ts"],"sourcesContent":["import { XToBoolean, XToCssPixelValue, XToDataConvert } from '@ng-nest/ui/core';\r\nimport { Component, TemplateRef, input } from '@angular/core';\r\nimport { XButtonType } from '@ng-nest/ui/button';\r\nimport { XFormControlFunction, XFormOption } from '@ng-nest/ui/base-form';\r\nimport type {\r\n XData,\r\n XTemplate,\r\n XIdentityProperty,\r\n XBoolean,\r\n XDirection,\r\n XAlign,\r\n XJustify,\r\n XNumber\r\n} from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Checkbox\r\n * @selector x-checkbox\r\n * @decorator component\r\n */\r\nexport const XCheckboxPrefix = 'x-checkbox';\r\nconst X_CHECKBOX_CONFIG_NAME = 'checkbox';\r\n\r\n/**\r\n * Checkbox Property\r\n */\r\n@Component({ selector: `${XCheckboxPrefix}-property`, template: '' })\r\nexport class XCheckboxProperty extends XFormControlFunction(X_CHECKBOX_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 多选框数据\r\n * @en_US Checkbox data\r\n */\r\n readonly data = input<XData<XCheckboxNode>, XData<XCheckboxNode>>([], { transform: XToDataConvert });\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n readonly button = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n readonly icon = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN tag 标签样式\r\n * @en_US Tag style\r\n */\r\n readonly tag = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 不确定状态的样式\r\n * @en_US Uncertain state style\r\n */\r\n readonly indeterminate = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 按钮/图标/ tag 标签样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n readonly type = input<XButtonType>('initial');\r\n /**\r\n * @zh_CN tag 标签边框\r\n * @en_US Tag bordered\r\n */\r\n readonly tagBordered = input<boolean, XBoolean>(true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN tag 标签深色主题\r\n * @en_US Tag dark theme\r\n */\r\n readonly tagDark = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 只有一个选项,启动此参数时,value 的值为 true / false\r\n * @en_US There is only one option, when this parameter is activated, the value is true or false\r\n */\r\n readonly single = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 垂直布局,不支持 button 和 icon 样式\r\n * @en_US Vertical layout, does not support button and icon styles\r\n */\r\n readonly vertical = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 标签\r\n * @en_US Label\r\n */\r\n override readonly label = input<XTemplate>('');\r\n /**\r\n * @zh_CN 标签宽度\r\n * @en_US Label width\r\n */\r\n override readonly labelWidth = input<string, XNumber>('', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 标签文字对齐方式\r\n * @en_US Label text alignment method\r\n */\r\n override readonly labelAlign = input<XAlign>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素水平排列方式\r\n * @en_US The level of sub-element level arrangement under flex layout\r\n */\r\n override readonly justify = input<XJustify>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素垂直排列方式\r\n * @en_US sub-element vertical arrangement method under flex layout\r\n */\r\n override readonly align = input<XAlign>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素排列方向\r\n * @en_US The direction of the sub-element arrangement under flex layout\r\n */\r\n override readonly direction = input<XDirection>('column');\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n override readonly disabled = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 必填\r\n * @en_US Required\r\n */\r\n override readonly required = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 值模板\r\n * @en_US Node template\r\n */\r\n override readonly valueTpl = input<TemplateRef<any>>();\r\n /**\r\n * @zh_CN 值模板参数\r\n * @en_US Node template\r\n */\r\n override readonly valueTplContext = input();\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n override readonly before = input<XTemplate>();\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n override readonly after = input<XTemplate>();\r\n}\r\n\r\n/**\r\n * Checkbox Option\r\n */\r\nexport interface XCheckboxOption extends XFormOption {\r\n /**\r\n * @zh_CN 多选框数据\r\n * @en_US Checkbox data\r\n */\r\n data?: XData<XCheckboxNode>;\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n button?: boolean;\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n icon?: boolean;\r\n /**\r\n * @zh_CN tag 标签样式\r\n * @en_US Tag style\r\n */\r\n tag?: boolean;\r\n /**\r\n * @zh_CN 不确定状态的样式\r\n * @en_US Uncertain state style\r\n */\r\n indeterminate?: boolean;\r\n /**\r\n * @zh_CN 按钮/图标/ tag 标签样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n type?: XButtonType;\r\n /**\r\n * @zh_CN tag 标签边框\r\n * @en_US Tag bordered\r\n */\r\n tagBordered?: boolean;\r\n /**\r\n * @zh_CN tag 标签深色主题\r\n * @en_US Tag dark theme\r\n */\r\n tagDark?: boolean;\r\n /**\r\n * @zh_CN 只有一个选项,启动此参数时,value 的值为 true / false\r\n * @en_US There is only one option, when this parameter is activated, the value is true or false\r\n */\r\n single?: boolean;\r\n /**\r\n * @zh_CN 垂直布局,不支持 button 和 icon 样式\r\n * @en_US Vertical layout, does not support button and icon styles\r\n */\r\n vertical?: boolean;\r\n /**\r\n * @zh_CN 标签\r\n * @en_US Label\r\n */\r\n label?: string;\r\n /**\r\n * @zh_CN 标签宽度\r\n * @en_US Label width\r\n */\r\n labelWidth?: string;\r\n /**\r\n * @zh_CN 标签文字对齐方式\r\n * @en_US Label text alignment method\r\n */\r\n labelAlign?: XAlign;\r\n /**\r\n * @zh_CN flex 布局下的子元素水平排列方式\r\n * @en_US The level of sub-element level arrangement under flex layout\r\n */\r\n justify?: XJustify;\r\n /**\r\n * @zh_CN flex 布局下的子元素垂直排列方式\r\n * @en_US sub-element vertical arrangement method under flex layout\r\n */\r\n align?: XAlign;\r\n /**\r\n * @zh_CN flex 布局下的子元素排列方向\r\n * @en_US The direction of the sub-element arrangement under flex layout\r\n */\r\n direction?: XDirection;\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n disabled?: boolean;\r\n /**\r\n * @zh_CN 必填\r\n * @en_US Required\r\n */\r\n required?: boolean;\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n before?: XTemplate;\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n after?: XTemplate;\r\n}\r\n\r\n/**\r\n * @zh_CN Checkbox 数据对象\r\n * @en_US Checkbox data object\r\n */\r\nexport interface XCheckboxNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disable\r\n */\r\n disabled?: boolean;\r\n /**\r\n * @zh_CN 选中\r\n * @en_US Disable\r\n */\r\n checked?: boolean;\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n icon?: string;\r\n /**\r\n * @zh_CN 图标的提示信息\r\n * @en_US Icon message\r\n */\r\n title?: string;\r\n /**\r\n * @zh_CN 标签文字\r\n * @en_US Label text\r\n */\r\n label?: XTemplate;\r\n /**\r\n * @zh_CN label 为模板参数的时候\r\n * @en_US Label when setting template parameters\r\n */\r\n node?: XCheckboxNode;\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n OnChanges,\r\n SimpleChanges,\r\n TemplateRef,\r\n OnDestroy,\r\n computed,\r\n viewChild,\r\n signal,\r\n effect\r\n} from '@angular/core';\r\nimport { XCheckboxPrefix, XCheckboxNode, XCheckboxProperty } from './checkbox.property';\r\nimport { Subject } from 'rxjs';\r\nimport { XIsChange, XSetData } from '@ng-nest/ui/core';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\nimport { XTagComponent } from '@ng-nest/ui/tag';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonComponent, XButtonsComponent } from '@ng-nest/ui/button';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { NgClass } from '@angular/common';\r\n\r\n@Component({\r\n selector: `${XCheckboxPrefix}`,\r\n imports: [NgClass, FormsModule, XButtonComponent, XButtonsComponent, XTagComponent, XOutletDirective],\r\n templateUrl: './checkbox.component.html',\r\n styleUrls: ['./checkbox.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XCheckboxComponent)]\r\n})\r\nexport class XCheckboxComponent extends XCheckboxProperty implements OnChanges, OnDestroy {\r\n checkbox = viewChild.required('checkbox', { read: ElementRef<HTMLElement> });\r\n\r\n beforeIsTemplate = computed(() => this.before() instanceof TemplateRef);\r\n afterIsTemplate = computed(() => this.after() instanceof TemplateRef);\r\n\r\n nodes = signal<XCheckboxNode[]>([]);\r\n private unSubject = new Subject<void>();\r\n\r\n classMap = computed(() => ({\r\n [`x-justify-${this.justify()}`]: !!this.justify(),\r\n [`x-align-${this.align()}`]: !!this.align(),\r\n [`x-direction-${this.direction()}`]: !!this.direction()\r\n }));\r\n labelMapSignal = computed(() => ({\r\n [`x-text-align-${this.labelAlign()}`]: !!this.labelAlign()\r\n }));\r\n checkboxType = computed(() => {\r\n if (this.button()) {\r\n return 'button';\r\n } else if (this.icon()) {\r\n return 'icon';\r\n } else if (this.tag()) {\r\n return 'tag';\r\n } else {\r\n return 'initial';\r\n }\r\n });\r\n\r\n constructor() {\r\n super();\r\n effect(() => {\r\n this.value();\r\n this.setChecked();\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n const { data } = changes;\r\n XIsChange(data) && this.setData();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.unSubject.next();\r\n this.unSubject.complete();\r\n }\r\n\r\n checkboxClick(event: Event, node: XCheckboxNode) {\r\n event.preventDefault();\r\n if (this.disabledComputed() || node.disabled) return;\r\n this.formControlValidator();\r\n if (this.single()) {\r\n this.value.update((x) => !x);\r\n } else {\r\n this.value.set((this.value() as Array<any>) || []);\r\n let index = this.value().indexOf(node.id);\r\n if (index >= 0) {\r\n this.value().splice(index, 1);\r\n this.value.set([...this.value()]);\r\n } else this.value.set([...this.value(), node.id]);\r\n }\r\n if (this.onChange) this.onChange(this.value());\r\n }\r\n\r\n isChecked(id: any): boolean {\r\n if (this.single()) return this.value() as boolean;\r\n else return Array.isArray(this.value()) && this.value().includes(id);\r\n }\r\n\r\n setChecked() {\r\n this.nodes.update((x) => {\r\n x.forEach((y) => {\r\n y.checked = this.isChecked(y.id);\r\n });\r\n return [...x];\r\n });\r\n }\r\n\r\n private setData() {\r\n XSetData<XCheckboxNode>(this.data(), this.unSubject).subscribe((x) => {\r\n this.nodes.set(x);\r\n });\r\n }\r\n}\r\n","<div\r\n #checkbox\r\n class=\"x-checkbox\"\r\n [class.x-flex]=\"justify() || align() || direction()\"\r\n [class.x-disabled]=\"disabledComputed()\"\r\n [class.x-required]=\"requiredIsEmpty()\"\r\n [class.x-invalid]=\"invalid()\"\r\n [class.x-checkbox-button]=\"button()\"\r\n [class.x-checkbox-icon]=\"icon()\"\r\n [class.x-checkbox-vertical]=\"vertical()\"\r\n [class.x-checkbox-after]=\"after()\"\r\n [class.x-checkbox-before]=\"before()\"\r\n [class.x-checkbox-after-template]=\"afterIsTemplate()\"\r\n [class.x-checkbox-before-template]=\"beforeIsTemplate()\"\r\n [ngClass]=\"classMap()\"\r\n>\r\n @if (label()) {\r\n <label\r\n [class.x-checkbox-label-required]=\"requiredComputed()\"\r\n [style.width]=\"labelWidth()\"\r\n [ngClass]=\"labelMapSignal()\"\r\n *xOutlet=\"label()\"\r\n >\r\n {{ label() }}\r\n </label>\r\n }\r\n <div class=\"x-checkbox-row\">\r\n @if (before()) {\r\n <div class=\"x-checkbox-row-before\">\r\n <ng-container *xOutlet=\"before()\">{{ before() }}</ng-container>\r\n </div>\r\n }\r\n <div class=\"x-checkbox-row-list\">\r\n @switch (checkboxType()) {\r\n @case ('initial') {\r\n @for (item of nodes(); track item.id) {\r\n <div\r\n class=\"x-checkbox-row-item\"\r\n [class.x-checked]=\"item.checked!\"\r\n [class.x-disabled]=\"disabledComputed() || item.disabled\"\r\n [class.x-indeterminate]=\"indeterminate()\"\r\n (click)=\"checkboxClick($event, item)\"\r\n >\r\n <span class=\"x-checkbox-box\"></span>\r\n <span class=\"x-checkbox-label\">\r\n <ng-container *xOutlet=\"item.label; context: { $node: item.node }\">{{ item.label }}</ng-container>\r\n </span>\r\n </div>\r\n }\r\n }\r\n @case ('button') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [title]=\"item.title!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.checked!\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"checkboxClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('icon') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [title]=\"item.title!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.checked!\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"checkboxClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('tag') {\r\n @for (item of nodes(); track item) {\r\n <x-tag\r\n checked\r\n manual\r\n [type]=\"type()\"\r\n [size]=\"size()\"\r\n [bordered]=\"tagBordered()\"\r\n [dark]=\"tagDark()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n [selected]=\"item.checked!\"\r\n (click)=\"checkboxClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n }\r\n }\r\n }\r\n </div>\r\n @if (after()) {\r\n <div class=\"x-checkbox-row-after\">\r\n <ng-container *xOutlet=\"after()\">{{ after() }}</ng-container>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XCheckboxComponent } from './checkbox.component';\r\n\r\n@NgModule({\r\n exports: [XCheckboxComponent],\r\n imports: [XCheckboxComponent]\r\n})\r\nexport class XCheckboxModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAeA;;;;AAIG;AACI,MAAM,eAAe,GAAG;AAC/B,MAAM,sBAAsB,GAAG,UAAU;AAEzC;;AAEG;MAEU,iBAAkB,SAAQ,oBAAoB,CAAC,sBAAsB,CAAC,CAAA;AADnF,IAAA,WAAA,GAAA;;AAEE;;;AAGG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAA6C,EAAE,wCAAI,SAAS,EAAE,cAAc,EAAA,CAAA,GAAA,CAA3B,EAAE,SAAS,EAAE,cAAc,EAAE,GAAC;AACpG;;;AAGG;AACM,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAoB,KAAK,0CAAI,SAAS,EAAE,UAAU,EAAA,CAAA,GAAA,CAAvB,EAAE,SAAS,EAAE,UAAU,EAAE,GAAC;AAC5E;;;AAGG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAoB,KAAK,wCAAI,SAAS,EAAE,UAAU,EAAA,CAAA,GAAA,CAAvB,EAAE,SAAS,EAAE,UAAU,EAAE,GAAC;AAC1E;;;AAGG;AACM,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAAoB,KAAK,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C;oBAC7B,OAAO,EAAE,CAAC,kBAAkB;AAC7B,iBAAA;;;ACND;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-checkbox.mjs","sources":["../../../../lib/ng-nest/ui/checkbox/checkbox.property.ts","../../../../lib/ng-nest/ui/checkbox/checkbox.component.ts","../../../../lib/ng-nest/ui/checkbox/checkbox.component.html","../../../../lib/ng-nest/ui/checkbox/checkbox.module.ts","../../../../lib/ng-nest/ui/checkbox/ng-nest-ui-checkbox.ts"],"sourcesContent":["import { XToBoolean, XToCssPixelValue, XToDataConvert } from '@ng-nest/ui/core';\r\nimport { Component, TemplateRef, input } from '@angular/core';\r\nimport { XButtonType } from '@ng-nest/ui/button';\r\nimport { XFormControlFunction, XFormOption } from '@ng-nest/ui/base-form';\r\nimport type {\r\n XData,\r\n XTemplate,\r\n XIdentityProperty,\r\n XBoolean,\r\n XDirection,\r\n XAlign,\r\n XJustify,\r\n XNumber\r\n} from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Checkbox\r\n * @selector x-checkbox\r\n * @decorator component\r\n */\r\nexport const XCheckboxPrefix = 'x-checkbox';\r\nconst X_CHECKBOX_CONFIG_NAME = 'checkbox';\r\n\r\n/**\r\n * Checkbox Property\r\n */\r\n@Component({ selector: `${XCheckboxPrefix}-property`, template: '' })\r\nexport class XCheckboxProperty extends XFormControlFunction(X_CHECKBOX_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 多选框数据\r\n * @en_US Checkbox data\r\n */\r\n readonly data = input<XData<XCheckboxNode>, XData<XCheckboxNode>>([], { transform: XToDataConvert });\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n readonly button = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n readonly icon = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN tag 标签样式\r\n * @en_US Tag style\r\n */\r\n readonly tag = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 不确定状态的样式\r\n * @en_US Uncertain state style\r\n */\r\n readonly indeterminate = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 按钮/图标/ tag 标签样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n readonly type = input<XButtonType>('initial');\r\n /**\r\n * @zh_CN tag 标签边框\r\n * @en_US Tag bordered\r\n */\r\n readonly tagBordered = input<boolean, XBoolean>(true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN tag 标签深色主题\r\n * @en_US Tag dark theme\r\n */\r\n readonly tagDark = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 只有一个选项,启动此参数时,value 的值为 true / false\r\n * @en_US There is only one option, when this parameter is activated, the value is true or false\r\n */\r\n readonly single = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 垂直布局,不支持 button 和 icon 样式\r\n * @en_US Vertical layout, does not support button and icon styles\r\n */\r\n readonly vertical = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 标签\r\n * @en_US Label\r\n */\r\n override readonly label = input<XTemplate>('');\r\n /**\r\n * @zh_CN 标签宽度\r\n * @en_US Label width\r\n */\r\n override readonly labelWidth = input<string, XNumber>('', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 标签文字对齐方式\r\n * @en_US Label text alignment method\r\n */\r\n override readonly labelAlign = input<XAlign>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素水平排列方式\r\n * @en_US The level of sub-element level arrangement under flex layout\r\n */\r\n override readonly justify = input<XJustify>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素垂直排列方式\r\n * @en_US sub-element vertical arrangement method under flex layout\r\n */\r\n override readonly align = input<XAlign>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素排列方向\r\n * @en_US The direction of the sub-element arrangement under flex layout\r\n */\r\n override readonly direction = input<XDirection>('column');\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n override readonly disabled = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 必填\r\n * @en_US Required\r\n */\r\n override readonly required = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 值模板\r\n * @en_US Node template\r\n */\r\n override readonly valueTpl = input<TemplateRef<any>>();\r\n /**\r\n * @zh_CN 值模板参数\r\n * @en_US Node template\r\n */\r\n override readonly valueTplContext = input();\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n override readonly before = input<XTemplate>();\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n override readonly after = input<XTemplate>();\r\n}\r\n\r\n/**\r\n * Checkbox Option\r\n */\r\nexport interface XCheckboxOption extends XFormOption {\r\n /**\r\n * @zh_CN 多选框数据\r\n * @en_US Checkbox data\r\n */\r\n data?: XData<XCheckboxNode>;\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n button?: boolean;\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n icon?: boolean;\r\n /**\r\n * @zh_CN tag 标签样式\r\n * @en_US Tag style\r\n */\r\n tag?: boolean;\r\n /**\r\n * @zh_CN 不确定状态的样式\r\n * @en_US Uncertain state style\r\n */\r\n indeterminate?: boolean;\r\n /**\r\n * @zh_CN 按钮/图标/ tag 标签样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n type?: XButtonType;\r\n /**\r\n * @zh_CN tag 标签边框\r\n * @en_US Tag bordered\r\n */\r\n tagBordered?: boolean;\r\n /**\r\n * @zh_CN tag 标签深色主题\r\n * @en_US Tag dark theme\r\n */\r\n tagDark?: boolean;\r\n /**\r\n * @zh_CN 只有一个选项,启动此参数时,value 的值为 true / false\r\n * @en_US There is only one option, when this parameter is activated, the value is true or false\r\n */\r\n single?: boolean;\r\n /**\r\n * @zh_CN 垂直布局,不支持 button 和 icon 样式\r\n * @en_US Vertical layout, does not support button and icon styles\r\n */\r\n vertical?: boolean;\r\n /**\r\n * @zh_CN 标签\r\n * @en_US Label\r\n */\r\n label?: string;\r\n /**\r\n * @zh_CN 标签宽度\r\n * @en_US Label width\r\n */\r\n labelWidth?: string;\r\n /**\r\n * @zh_CN 标签文字对齐方式\r\n * @en_US Label text alignment method\r\n */\r\n labelAlign?: XAlign;\r\n /**\r\n * @zh_CN flex 布局下的子元素水平排列方式\r\n * @en_US The level of sub-element level arrangement under flex layout\r\n */\r\n justify?: XJustify;\r\n /**\r\n * @zh_CN flex 布局下的子元素垂直排列方式\r\n * @en_US sub-element vertical arrangement method under flex layout\r\n */\r\n align?: XAlign;\r\n /**\r\n * @zh_CN flex 布局下的子元素排列方向\r\n * @en_US The direction of the sub-element arrangement under flex layout\r\n */\r\n direction?: XDirection;\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n disabled?: boolean;\r\n /**\r\n * @zh_CN 必填\r\n * @en_US Required\r\n */\r\n required?: boolean;\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n before?: XTemplate;\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n after?: XTemplate;\r\n}\r\n\r\n/**\r\n * @zh_CN Checkbox 数据对象\r\n * @en_US Checkbox data object\r\n */\r\nexport interface XCheckboxNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disable\r\n */\r\n disabled?: boolean;\r\n /**\r\n * @zh_CN 选中\r\n * @en_US Disable\r\n */\r\n checked?: boolean;\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n icon?: string;\r\n /**\r\n * @zh_CN 图标的提示信息\r\n * @en_US Icon message\r\n */\r\n title?: string;\r\n /**\r\n * @zh_CN 标签文字\r\n * @en_US Label text\r\n */\r\n label?: XTemplate;\r\n /**\r\n * @zh_CN label 为模板参数的时候\r\n * @en_US Label when setting template parameters\r\n */\r\n node?: XCheckboxNode;\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n OnChanges,\r\n SimpleChanges,\r\n TemplateRef,\r\n OnDestroy,\r\n computed,\r\n viewChild,\r\n signal,\r\n effect\r\n} from '@angular/core';\r\nimport { XCheckboxPrefix, XCheckboxNode, XCheckboxProperty } from './checkbox.property';\r\nimport { Subject } from 'rxjs';\r\nimport { XIsChange, XSetData } from '@ng-nest/ui/core';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\nimport { XTagComponent } from '@ng-nest/ui/tag';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonComponent, XButtonsComponent } from '@ng-nest/ui/button';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { NgClass } from '@angular/common';\r\n\r\n@Component({\r\n selector: `${XCheckboxPrefix}`,\r\n imports: [NgClass, FormsModule, XButtonComponent, XButtonsComponent, XTagComponent, XOutletDirective],\r\n templateUrl: './checkbox.component.html',\r\n styleUrls: ['./checkbox.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XCheckboxComponent)]\r\n})\r\nexport class XCheckboxComponent extends XCheckboxProperty implements OnChanges, OnDestroy {\r\n checkbox = viewChild.required('checkbox', { read: ElementRef<HTMLElement> });\r\n\r\n beforeIsTemplate = computed(() => this.before() instanceof TemplateRef);\r\n afterIsTemplate = computed(() => this.after() instanceof TemplateRef);\r\n\r\n nodes = signal<XCheckboxNode[]>([]);\r\n private unSubject = new Subject<void>();\r\n\r\n classMap = computed(() => ({\r\n [`x-justify-${this.justify()}`]: !!this.justify(),\r\n [`x-align-${this.align()}`]: !!this.align(),\r\n [`x-direction-${this.direction()}`]: !!this.direction()\r\n }));\r\n labelMapSignal = computed(() => ({\r\n [`x-text-align-${this.labelAlign()}`]: !!this.labelAlign()\r\n }));\r\n checkboxType = computed(() => {\r\n if (this.button()) {\r\n return 'button';\r\n } else if (this.icon()) {\r\n return 'icon';\r\n } else if (this.tag()) {\r\n return 'tag';\r\n } else {\r\n return 'initial';\r\n }\r\n });\r\n\r\n constructor() {\r\n super();\r\n effect(() => {\r\n this.value();\r\n this.setChecked();\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n const { data } = changes;\r\n XIsChange(data) && this.setData();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.unSubject.next();\r\n this.unSubject.complete();\r\n }\r\n\r\n checkboxClick(event: Event, node: XCheckboxNode) {\r\n event.preventDefault();\r\n if (this.disabledComputed() || node.disabled) return;\r\n this.formControlValidator();\r\n if (this.single()) {\r\n this.value.update((x) => !x);\r\n } else {\r\n this.value.set((this.value() as Array<any>) || []);\r\n let index = this.value().indexOf(node.id);\r\n if (index >= 0) {\r\n this.value().splice(index, 1);\r\n this.value.set([...this.value()]);\r\n } else this.value.set([...this.value(), node.id]);\r\n }\r\n if (this.onChange) this.onChange(this.value());\r\n }\r\n\r\n isChecked(id: any): boolean {\r\n if (this.single()) return this.value() as boolean;\r\n else return Array.isArray(this.value()) && this.value().includes(id);\r\n }\r\n\r\n setChecked() {\r\n this.nodes.update((x) => {\r\n x.forEach((y) => {\r\n y.checked = this.isChecked(y.id);\r\n });\r\n return [...x];\r\n });\r\n }\r\n\r\n private setData() {\r\n XSetData<XCheckboxNode>(this.data(), this.unSubject).subscribe((x) => {\r\n this.nodes.set(x);\r\n });\r\n }\r\n}\r\n","<div\r\n #checkbox\r\n class=\"x-checkbox\"\r\n [class.x-flex]=\"justify() || align() || direction()\"\r\n [class.x-disabled]=\"disabledComputed()\"\r\n [class.x-required]=\"requiredIsEmpty()\"\r\n [class.x-invalid]=\"invalid()\"\r\n [class.x-checkbox-button]=\"button()\"\r\n [class.x-checkbox-icon]=\"icon()\"\r\n [class.x-checkbox-vertical]=\"vertical()\"\r\n [class.x-checkbox-after]=\"after()\"\r\n [class.x-checkbox-before]=\"before()\"\r\n [class.x-checkbox-after-template]=\"afterIsTemplate()\"\r\n [class.x-checkbox-before-template]=\"beforeIsTemplate()\"\r\n [ngClass]=\"classMap()\"\r\n>\r\n @if (label()) {\r\n <label\r\n [class.x-checkbox-label-required]=\"requiredComputed()\"\r\n [style.width]=\"labelWidth()\"\r\n [ngClass]=\"labelMapSignal()\"\r\n *xOutlet=\"label()\"\r\n >\r\n {{ label() }}\r\n </label>\r\n }\r\n <div class=\"x-checkbox-row\">\r\n @if (before()) {\r\n <div class=\"x-checkbox-row-before\">\r\n <ng-container *xOutlet=\"before()\">{{ before() }}</ng-container>\r\n </div>\r\n }\r\n <div class=\"x-checkbox-row-list\">\r\n @switch (checkboxType()) {\r\n @case ('initial') {\r\n @for (item of nodes(); track item.id) {\r\n <div\r\n class=\"x-checkbox-row-item\"\r\n [class.x-checked]=\"item.checked!\"\r\n [class.x-disabled]=\"disabledComputed() || item.disabled\"\r\n [class.x-indeterminate]=\"indeterminate()\"\r\n (click)=\"checkboxClick($event, item)\"\r\n >\r\n <span class=\"x-checkbox-box\"></span>\r\n <span class=\"x-checkbox-label\">\r\n <ng-container *xOutlet=\"item.label; context: { $node: item.node }\">{{ item.label }}</ng-container>\r\n </span>\r\n </div>\r\n }\r\n }\r\n @case ('button') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [title]=\"item.title!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.checked!\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"checkboxClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('icon') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [title]=\"item.title!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.checked!\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"checkboxClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('tag') {\r\n @for (item of nodes(); track item) {\r\n <x-tag\r\n checked\r\n manual\r\n [type]=\"type()\"\r\n [size]=\"size()\"\r\n [bordered]=\"tagBordered()\"\r\n [dark]=\"tagDark()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n [selected]=\"item.checked!\"\r\n (click)=\"checkboxClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n }\r\n }\r\n }\r\n </div>\r\n @if (after()) {\r\n <div class=\"x-checkbox-row-after\">\r\n <ng-container *xOutlet=\"after()\">{{ after() }}</ng-container>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XCheckboxComponent } from './checkbox.component';\r\n\r\n@NgModule({\r\n exports: [XCheckboxComponent],\r\n imports: [XCheckboxComponent]\r\n})\r\nexport class XCheckboxModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAeA;;;;AAIG;AACI,MAAM,eAAe,GAAG;AAC/B,MAAM,sBAAsB,GAAG,UAAU;AAEzC;;AAEG;MAEU,iBAAkB,SAAQ,oBAAoB,CAAC,sBAAsB,CAAC,CAAA;AADnF,IAAA,WAAA,GAAA;;AAEE;;;AAGG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAA6C,EAAE,wCAAI,SAAS,EAAE,cAAc,EAAA,CAAA,GAAA,CAA3B,EAAE,SAAS,EAAE,cAAc,EAAE,GAAC;AACpG;;;AAGG;AACM,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAoB,KAAK,0CAAI,SAAS,EAAE,UAAU,EAAA,CAAA,GAAA,C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,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAAf,eAAe,EAAA,OAAA,EAAA,CAFhB,kBAAkB,CAAA,EAAA,OAAA,EAAA,CADlB,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAGjB,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,eAAe,YAFhB,kBAAkB,CAAA,EAAA,CAAA,CAAA;;2FAEjB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,OAAO,EAAE,CAAC,kBAAkB;AAC7B,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, Component, signal, ChangeDetectionStrategy, ViewEncapsulation, inject, NgModule } from '@angular/core';
|
|
3
|
-
import { XPropertyFunction, XToBoolean, XProperty
|
|
3
|
+
import { XPropertyFunction, XToBoolean, XProperty } from '@ng-nest/ui/core';
|
|
4
4
|
import { XIconComponent } from '@ng-nest/ui/icon';
|
|
5
5
|
import { XOutletDirective } from '@ng-nest/ui/outlet';
|
|
6
6
|
|
|
@@ -105,13 +105,13 @@ class XCollapseProperty extends XPropertyFunction(X_COLLAPSE_CONFIG_NAME) {
|
|
|
105
105
|
*/
|
|
106
106
|
this.bordered = input(this.config?.bordered ?? false, ...(ngDevMode ? [{ debugName: "bordered", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
107
107
|
}
|
|
108
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
109
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
108
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCollapseProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
109
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.5", type: XCollapseProperty, isStandalone: true, selector: "x-collapse-property", inputs: { accordion: { classPropertyName: "accordion", publicName: "accordion", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null }, ghost: { classPropertyName: "ghost", publicName: "ghost", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
110
110
|
}
|
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCollapseProperty, decorators: [{
|
|
112
112
|
type: Component,
|
|
113
113
|
args: [{ selector: `${XCollapsePrefix}-property`, template: '' }]
|
|
114
|
-
}] });
|
|
114
|
+
}], propDecorators: { accordion: [{ type: i0.Input, args: [{ isSignal: true, alias: "accordion", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], iconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPosition", required: false }] }], ghost: [{ type: i0.Input, args: [{ isSignal: true, alias: "ghost", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }] } });
|
|
115
115
|
/**
|
|
116
116
|
* Collapse Panel
|
|
117
117
|
* @selector x-collapse-panel
|
|
@@ -168,13 +168,13 @@ class XCollapsePanelProperty extends XProperty {
|
|
|
168
168
|
*/
|
|
169
169
|
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
170
170
|
}
|
|
171
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
172
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
171
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCollapsePanelProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
172
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.5", type: XCollapsePanelProperty, isStandalone: true, selector: "x-collapse-panel-property", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
173
173
|
}
|
|
174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCollapsePanelProperty, decorators: [{
|
|
175
175
|
type: Component,
|
|
176
176
|
args: [{ selector: `${XCollapsePanelPrefix}-property`, template: '' }]
|
|
177
|
-
}] });
|
|
177
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
178
178
|
|
|
179
179
|
class XCollapseComponent extends XCollapseProperty {
|
|
180
180
|
constructor() {
|
|
@@ -204,10 +204,10 @@ class XCollapseComponent extends XCollapseProperty {
|
|
|
204
204
|
return;
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
208
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
207
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCollapseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
208
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.5", type: XCollapseComponent, isStandalone: true, selector: "x-collapse", usesInheritance: true, ngImport: i0, template: "<div #collapse class=\"x-collapse\" [class.x-collapse-ghost]=\"ghost()\" [class.x-collapse-bordered]=\"bordered()\">\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".x-collapse{margin:0;padding:0}.x-collapse{font-size:var(--x-font-size);box-sizing:border-box;border-top:var(--x-border-width) var(--x-border-style) var(--x-border);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-collapse x-collapse-panel:last-child .x-collapse-panel-header{border-bottom-color:transparent}.x-collapse x-collapse-panel:last-child .x-collapse-panel-body{border-bottom-color:transparent}.x-collapse-bordered{border-left:var(--x-border-width) var(--x-border-style) var(--x-border);border-right:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius)}.x-collapse-bordered x-collapse-panel .x-collapse-panel-header{padding-left:var(--x-padding-medium);padding-right:var(--x-padding-medium)}.x-collapse-bordered x-collapse-panel .x-collapse-panel-body{padding-left:var(--x-padding-medium);padding-right:var(--x-padding-medium)}.x-collapse-ghost{border-top:none;border-bottom:none}.x-collapse-ghost x-collapse-panel .x-collapse-panel-header{border-bottom:none}.x-collapse-ghost x-collapse-panel .x-collapse-panel-body{border-bottom:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
209
209
|
}
|
|
210
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCollapseComponent, decorators: [{
|
|
211
211
|
type: Component,
|
|
212
212
|
args: [{ selector: `${XCollapsePrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #collapse class=\"x-collapse\" [class.x-collapse-ghost]=\"ghost()\" [class.x-collapse-bordered]=\"bordered()\">\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".x-collapse{margin:0;padding:0}.x-collapse{font-size:var(--x-font-size);box-sizing:border-box;border-top:var(--x-border-width) var(--x-border-style) var(--x-border);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-collapse x-collapse-panel:last-child .x-collapse-panel-header{border-bottom-color:transparent}.x-collapse x-collapse-panel:last-child .x-collapse-panel-body{border-bottom-color:transparent}.x-collapse-bordered{border-left:var(--x-border-width) var(--x-border-style) var(--x-border);border-right:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius)}.x-collapse-bordered x-collapse-panel .x-collapse-panel-header{padding-left:var(--x-padding-medium);padding-right:var(--x-padding-medium)}.x-collapse-bordered x-collapse-panel .x-collapse-panel-body{padding-left:var(--x-padding-medium);padding-right:var(--x-padding-medium)}.x-collapse-ghost{border-top:none;border-bottom:none}.x-collapse-ghost x-collapse-panel .x-collapse-panel-header{border-bottom:none}.x-collapse-ghost x-collapse-panel .x-collapse-panel-body{border-bottom:none}\n"] }]
|
|
213
213
|
}] });
|
|
@@ -217,13 +217,8 @@ class XCollapsePanelComponent extends XCollapsePanelProperty {
|
|
|
217
217
|
super(...arguments);
|
|
218
218
|
this.index = signal(0, ...(ngDevMode ? [{ debugName: "index" }] : []));
|
|
219
219
|
this.collapseComponent = inject(XCollapseComponent, { optional: true, host: true });
|
|
220
|
-
this.show = signal(false, ...(ngDevMode ? [{ debugName: "show" }] : []));
|
|
221
220
|
this.activeSignal = signal(false, ...(ngDevMode ? [{ debugName: "activeSignal" }] : []));
|
|
222
221
|
}
|
|
223
|
-
done(event) {
|
|
224
|
-
if (!event.toState)
|
|
225
|
-
this.show.set(false);
|
|
226
|
-
}
|
|
227
222
|
ngOnInit() {
|
|
228
223
|
if (!this.collapseComponent)
|
|
229
224
|
return;
|
|
@@ -237,14 +232,11 @@ class XCollapsePanelComponent extends XCollapsePanelProperty {
|
|
|
237
232
|
return [...x];
|
|
238
233
|
});
|
|
239
234
|
if (this.activeSignal()) {
|
|
240
|
-
this.show.set(true);
|
|
241
235
|
this.collapseComponent.change(this.index());
|
|
242
236
|
}
|
|
243
237
|
}
|
|
244
238
|
headerClick() {
|
|
245
239
|
this.activeSignal.update((x) => !x);
|
|
246
|
-
if (this.activeSignal())
|
|
247
|
-
this.show.set(true);
|
|
248
240
|
if (!this.collapseComponent)
|
|
249
241
|
return;
|
|
250
242
|
if (this.activeSignal())
|
|
@@ -252,20 +244,20 @@ class XCollapsePanelComponent extends XCollapsePanelProperty {
|
|
|
252
244
|
else
|
|
253
245
|
this.collapseComponent.change(this.index(), false);
|
|
254
246
|
}
|
|
255
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
256
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
247
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCollapsePanelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
248
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.5", type: XCollapsePanelComponent, isStandalone: true, selector: "x-collapse-panel", usesInheritance: true, ngImport: i0, template: "<div class=\"x-collapse-panel\" [class.x-activated]=\"activeSignal()\" [class.x-collapse-panel-disabled]=\"disabled()\">\r\n <div\r\n class=\"x-collapse-panel-header x-collapse-panel-icon-{{ collapseComponent?.iconPosition() }}\"\r\n (click)=\"!disabled() && headerClick()\"\r\n >\r\n <div class=\"x-collapse-panel-header-title\">\r\n <ng-container *xOutlet=\"label()\">{{ label() }}</ng-container>\r\n </div>\r\n @if (collapseComponent?.showIcon()) {\r\n <ng-container *xOutlet=\"collapseComponent?.icon()\">\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-container>\r\n }\r\n </div>\r\n\r\n <div class=\"x-collapse-panel-body\" [class.x-collapse-panel-active]=\"activeSignal()\">\r\n <div class=\"x-collapse-panel-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".x-collapse-panel{margin:0;padding:0}.x-collapse-panel{box-sizing:border-box}.x-collapse-panel-header{display:flex;align-items:center;justify-content:space-between;padding:var(--x-padding-small) 0;border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);transition:border-color .3s;cursor:pointer}.x-collapse-panel-header-title{flex:1}.x-collapse-panel-header>.x-icon{margin-right:.125rem;color:var(--x-text-300);transition:transform .3s}.x-collapse-panel-disabled .x-collapse-panel-header-title{color:var(--x-text-400);cursor:not-allowed}.x-collapse-panel-icon-left{flex-direction:row-reverse}.x-collapse-panel-body{display:grid;grid-template-rows:0fr;overflow:hidden;border-bottom:var(--x-border-width) var(--x-border-style) transparent;transition:border-color var(--x-animation-duration-base),grid-template-rows var(--x-animation-duration-base);transition-timing-function:ease-in-out}.x-collapse-panel-active{grid-template-rows:1fr}.x-collapse-panel-active .x-collapse-panel-content{padding-bottom:.625rem;visibility:visible;opacity:1}.x-collapse-panel-content{padding-bottom:0;min-height:0;transition:visibility var(--x-animation-duration-base),opacity var(--x-animation-duration-base),padding-bottom var(--x-animation-duration-base);transition-timing-function:ease-in-out;visibility:hidden;overflow:hidden;opacity:0}.x-collapse-panel.x-activated .x-collapse-panel-header{border-bottom-color:transparent}.x-collapse-panel.x-activated .x-collapse-panel-header>.x-icon{transform:rotate(90deg)}.x-collapse-panel.x-activated .x-collapse-panel-body{border-bottom-color:var(--x-border-500)}\n"], dependencies: [{ kind: "component", type: XIconComponent, selector: "x-icon" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
257
249
|
}
|
|
258
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCollapsePanelComponent, decorators: [{
|
|
259
251
|
type: Component,
|
|
260
|
-
args: [{ selector: `${XCollapsePanelPrefix}`, imports: [XIconComponent, XOutletDirective],
|
|
252
|
+
args: [{ selector: `${XCollapsePanelPrefix}`, imports: [XIconComponent, XOutletDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"x-collapse-panel\" [class.x-activated]=\"activeSignal()\" [class.x-collapse-panel-disabled]=\"disabled()\">\r\n <div\r\n class=\"x-collapse-panel-header x-collapse-panel-icon-{{ collapseComponent?.iconPosition() }}\"\r\n (click)=\"!disabled() && headerClick()\"\r\n >\r\n <div class=\"x-collapse-panel-header-title\">\r\n <ng-container *xOutlet=\"label()\">{{ label() }}</ng-container>\r\n </div>\r\n @if (collapseComponent?.showIcon()) {\r\n <ng-container *xOutlet=\"collapseComponent?.icon()\">\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-container>\r\n }\r\n </div>\r\n\r\n <div class=\"x-collapse-panel-body\" [class.x-collapse-panel-active]=\"activeSignal()\">\r\n <div class=\"x-collapse-panel-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".x-collapse-panel{margin:0;padding:0}.x-collapse-panel{box-sizing:border-box}.x-collapse-panel-header{display:flex;align-items:center;justify-content:space-between;padding:var(--x-padding-small) 0;border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);transition:border-color .3s;cursor:pointer}.x-collapse-panel-header-title{flex:1}.x-collapse-panel-header>.x-icon{margin-right:.125rem;color:var(--x-text-300);transition:transform .3s}.x-collapse-panel-disabled .x-collapse-panel-header-title{color:var(--x-text-400);cursor:not-allowed}.x-collapse-panel-icon-left{flex-direction:row-reverse}.x-collapse-panel-body{display:grid;grid-template-rows:0fr;overflow:hidden;border-bottom:var(--x-border-width) var(--x-border-style) transparent;transition:border-color var(--x-animation-duration-base),grid-template-rows var(--x-animation-duration-base);transition-timing-function:ease-in-out}.x-collapse-panel-active{grid-template-rows:1fr}.x-collapse-panel-active .x-collapse-panel-content{padding-bottom:.625rem;visibility:visible;opacity:1}.x-collapse-panel-content{padding-bottom:0;min-height:0;transition:visibility var(--x-animation-duration-base),opacity var(--x-animation-duration-base),padding-bottom var(--x-animation-duration-base);transition-timing-function:ease-in-out;visibility:hidden;overflow:hidden;opacity:0}.x-collapse-panel.x-activated .x-collapse-panel-header{border-bottom-color:transparent}.x-collapse-panel.x-activated .x-collapse-panel-header>.x-icon{transform:rotate(90deg)}.x-collapse-panel.x-activated .x-collapse-panel-body{border-bottom-color:var(--x-border-500)}\n"] }]
|
|
261
253
|
}] });
|
|
262
254
|
|
|
263
255
|
class XCollapseModule {
|
|
264
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
265
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
266
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
256
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCollapseModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
257
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.5", ngImport: i0, type: XCollapseModule, imports: [XCollapseComponent, XCollapsePanelComponent], exports: [XCollapseComponent, XCollapsePanelComponent] }); }
|
|
258
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCollapseModule, imports: [XCollapsePanelComponent] }); }
|
|
267
259
|
}
|
|
268
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
260
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XCollapseModule, decorators: [{
|
|
269
261
|
type: NgModule,
|
|
270
262
|
args: [{
|
|
271
263
|
exports: [XCollapseComponent, XCollapsePanelComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-collapse.mjs","sources":["../../../../lib/ng-nest/ui/collapse/collapse.property.ts","../../../../lib/ng-nest/ui/collapse/collapse.component.ts","../../../../lib/ng-nest/ui/collapse/collapse.component.html","../../../../lib/ng-nest/ui/collapse/collapse-panel.component.ts","../../../../lib/ng-nest/ui/collapse/collapse-panel.component.html","../../../../lib/ng-nest/ui/collapse/collapse.module.ts","../../../../lib/ng-nest/ui/collapse/ng-nest-ui-collapse.ts"],"sourcesContent":["import { XProperty, XPropertyFunction, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, input } from '@angular/core';\r\nimport type { XTemplate, XBoolean } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Collapse\r\n * @selector x-collapse\r\n * @decorator component\r\n */\r\nexport const XCollapsePrefix = 'x-collapse';\r\nconst X_COLLAPSE_CONFIG_NAME = 'collapse';\r\n\r\n/**\r\n * Collapse Property\r\n */\r\n@Component({ selector: `${XCollapsePrefix}-property`, template: '' })\r\nexport class XCollapseProperty extends XPropertyFunction(X_COLLAPSE_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 是否以手风琴的方式展示,只展开一个面板\r\n * @en_US Whether to display as an accordion, only expand one panel\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse accordion>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly accordion = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 显示的图标\r\n * @en_US The icon displayed on the right\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse [icon]=\"iconTpl\">\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * <ng-template #iconTpl>\r\n * <x-icon type=\"ado-caret-right\"></x-icon>\r\n * </ng-template>\r\n * ```\r\n *\r\n */\r\n readonly icon = input<XTemplate>();\r\n /**\r\n * @zh_CN 显示/隐藏图标\r\n * @en_US Show / hide icon\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse showIcon=\"false\">\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly showIcon = input<boolean, XBoolean>(this.config?.showIcon ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 图标位置\r\n * @en_US Icon position\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse iconPosition=\"left\">\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly iconPosition = input<XCollapseIconPosition>(this.config?.iconPosition ?? 'right');\r\n /**\r\n * @zh_CN 幽灵面板\r\n * @en_US Ghost panel\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse ghost>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly ghost = input<boolean, XBoolean>(this.config?.ghost ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 边框\r\n * @en_US border\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse bordered>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly bordered = input<boolean, XBoolean>(this.config?.bordered ?? false, { transform: XToBoolean });\r\n}\r\n\r\n/**\r\n * @zh_CN 图标位置\r\n * @en_US Icon position\r\n */\r\nexport type XCollapseIconPosition = 'left' | 'right';\r\n\r\n/**\r\n * Collapse Panel\r\n * @selector x-collapse-panel\r\n * @decorator component\r\n */\r\nexport const XCollapsePanelPrefix = 'x-collapse-panel';\r\n\r\n/**\r\n * Collapse Panel Property\r\n */\r\n@Component({ selector: `${XCollapsePanelPrefix}-property`, template: '' })\r\nexport class XCollapsePanelProperty extends XProperty {\r\n /**\r\n * @zh_CN 标题,支持模板自定义\r\n * @en_US Title, support template customization\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel [label]=\"labelTpl\"></x-collapse-panel>\r\n * </x-collapse>\r\n * <ng-template #labelTpl>Title 2</ng-template>\r\n * ```\r\n *\r\n */\r\n readonly label = input<XTemplate>();\r\n /**\r\n * @zh_CN 激活当前面板\r\n * @en_US Activate the current panel\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\" active></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly active = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US disabled\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\" disabled></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly disabled = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n}\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, signal } from '@angular/core';\r\nimport { XCollapsePrefix, XCollapseProperty } from './collapse.property';\r\n\r\n@Component({\r\n selector: `${XCollapsePrefix}`,\r\n templateUrl: './collapse.component.html',\r\n styleUrls: ['./collapse.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCollapseComponent extends XCollapseProperty {\r\n start = signal(0);\r\n panelChanges = signal<(() => void)[]>([]);\r\n active = signal<number[]>([]);\r\n\r\n change(num: number, add = true) {\r\n const i = this.active().indexOf(num);\r\n if (i === -1) {\r\n if (add) {\r\n this.active.update((x) => [...x, num]);\r\n }\r\n } else {\r\n if (!add) {\r\n this.active.update((x) => {\r\n x.splice(i, 1);\r\n return [...x];\r\n });\r\n }\r\n }\r\n if (this.accordion() && this.active().length === 2) {\r\n const panel = this.panelChanges()[this.active()[0] as number];\r\n panel && panel();\r\n return;\r\n }\r\n }\r\n}\r\n","<div #collapse class=\"x-collapse\" [class.x-collapse-ghost]=\"ghost()\" [class.x-collapse-bordered]=\"bordered()\">\r\n <ng-content></ng-content>\r\n</div>\r\n","import { Component, OnInit, ViewEncapsulation, ChangeDetectionStrategy, inject, signal } from '@angular/core';\r\nimport { XCollapsePanelPrefix, XCollapsePanelProperty } from './collapse.property';\r\nimport { XDropAnimation } from '@ng-nest/ui/core';\r\nimport { XCollapseComponent } from './collapse.component';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport type { AnimationEvent } from '@angular/animations';\r\n\r\n@Component({\r\n selector: `${XCollapsePanelPrefix}`,\r\n imports: [XIconComponent, XOutletDirective],\r\n templateUrl: './collapse-panel.component.html',\r\n styleUrls: ['./collapse-panel.component.scss'],\r\n animations: [XDropAnimation],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCollapsePanelComponent extends XCollapsePanelProperty implements OnInit {\r\n index = signal<number>(0);\r\n collapseComponent = inject(XCollapseComponent, { optional: true, host: true });\r\n show = signal(false);\r\n activeSignal = signal(false);\r\n\r\n done(event: AnimationEvent) {\r\n if (!event.toState) this.show.set(false);\r\n }\r\n\r\n ngOnInit() {\r\n if (!this.collapseComponent) return;\r\n this.activeSignal.set(this.active());\r\n this.index.set(this.collapseComponent.start());\r\n this.collapseComponent.start.update((x) => x + 1);\r\n this.collapseComponent.panelChanges.update((x) => {\r\n x.push(() => {\r\n this.headerClick();\r\n });\r\n return [...x];\r\n });\r\n if (this.activeSignal()) {\r\n this.show.set(true);\r\n this.collapseComponent.change(this.index());\r\n }\r\n }\r\n\r\n headerClick() {\r\n this.activeSignal.update((x) => !x);\r\n if (this.activeSignal()) this.show.set(true);\r\n if (!this.collapseComponent) return;\r\n if (this.activeSignal()) this.collapseComponent.change(this.index());\r\n else this.collapseComponent.change(this.index(), false);\r\n }\r\n}\r\n","<div class=\"x-collapse-panel\" [class.x-activated]=\"activeSignal()\" [class.x-collapse-panel-disabled]=\"disabled()\">\r\n <div\r\n class=\"x-collapse-panel-header x-collapse-panel-icon-{{ collapseComponent?.iconPosition() }}\"\r\n (click)=\"!disabled() && headerClick()\"\r\n >\r\n <div class=\"x-collapse-panel-header-title\">\r\n <ng-container *xOutlet=\"label()\">{{ label() }}</ng-container>\r\n </div>\r\n @if (collapseComponent?.showIcon()) {\r\n <ng-container *xOutlet=\"collapseComponent?.icon()\">\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-container>\r\n }\r\n </div>\r\n @if (show()) {\r\n <div class=\"x-collapse-panel-body\">\r\n <div\r\n class=\"x-collapse-panel-content\"\r\n [@x-drop-animation]=\"activeSignal()\"\r\n (@x-drop-animation.done)=\"done($event)\"\r\n >\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XCollapseComponent } from './collapse.component';\r\nimport { XCollapsePanelComponent } from './collapse-panel.component';\r\n\r\n@NgModule({\r\n exports: [XCollapseComponent, XCollapsePanelComponent],\r\n imports: [XCollapseComponent, XCollapsePanelComponent]\r\n})\r\nexport class XCollapseModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAIA;;;;AAIG;AACI,MAAM,eAAe,GAAG;AAC/B,MAAM,sBAAsB,GAAG,UAAU;AAEzC;;AAEG;MAEU,iBAAkB,SAAQ,iBAAiB,CAAC,sBAAsB,CAAC,CAAA;AADhF,IAAA,WAAA,GAAA;;AAEE;;;;;;;;;;;;AAYG;AACM,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAoB,KAAK,6CAAI,SAAS,EAAE,UAAU,EAAA,CAAA,GAAA,CAAvB,EAAE,SAAS,EAAE,UAAU,EAAE,GAAC;AAC/E;;;;;;;;;;;;;;;AAeG;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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,eAAe,YAFI,uBAAuB,CAAA,EAAA,CAAA,CAAA;;2FAE1C,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,CAAC;AACtD,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,uBAAuB;AACtD,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-collapse.mjs","sources":["../../../../lib/ng-nest/ui/collapse/collapse.property.ts","../../../../lib/ng-nest/ui/collapse/collapse.component.ts","../../../../lib/ng-nest/ui/collapse/collapse.component.html","../../../../lib/ng-nest/ui/collapse/collapse-panel.component.ts","../../../../lib/ng-nest/ui/collapse/collapse-panel.component.html","../../../../lib/ng-nest/ui/collapse/collapse.module.ts","../../../../lib/ng-nest/ui/collapse/ng-nest-ui-collapse.ts"],"sourcesContent":["import { XProperty, XPropertyFunction, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, input } from '@angular/core';\r\nimport type { XTemplate, XBoolean } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Collapse\r\n * @selector x-collapse\r\n * @decorator component\r\n */\r\nexport const XCollapsePrefix = 'x-collapse';\r\nconst X_COLLAPSE_CONFIG_NAME = 'collapse';\r\n\r\n/**\r\n * Collapse Property\r\n */\r\n@Component({ selector: `${XCollapsePrefix}-property`, template: '' })\r\nexport class XCollapseProperty extends XPropertyFunction(X_COLLAPSE_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 是否以手风琴的方式展示,只展开一个面板\r\n * @en_US Whether to display as an accordion, only expand one panel\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse accordion>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly accordion = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 显示的图标\r\n * @en_US The icon displayed on the right\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse [icon]=\"iconTpl\">\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * <ng-template #iconTpl>\r\n * <x-icon type=\"ado-caret-right\"></x-icon>\r\n * </ng-template>\r\n * ```\r\n *\r\n */\r\n readonly icon = input<XTemplate>();\r\n /**\r\n * @zh_CN 显示/隐藏图标\r\n * @en_US Show / hide icon\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse showIcon=\"false\">\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly showIcon = input<boolean, XBoolean>(this.config?.showIcon ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 图标位置\r\n * @en_US Icon position\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse iconPosition=\"left\">\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly iconPosition = input<XCollapseIconPosition>(this.config?.iconPosition ?? 'right');\r\n /**\r\n * @zh_CN 幽灵面板\r\n * @en_US Ghost panel\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse ghost>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly ghost = input<boolean, XBoolean>(this.config?.ghost ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 边框\r\n * @en_US border\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse bordered>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly bordered = input<boolean, XBoolean>(this.config?.bordered ?? false, { transform: XToBoolean });\r\n}\r\n\r\n/**\r\n * @zh_CN 图标位置\r\n * @en_US Icon position\r\n */\r\nexport type XCollapseIconPosition = 'left' | 'right';\r\n\r\n/**\r\n * Collapse Panel\r\n * @selector x-collapse-panel\r\n * @decorator component\r\n */\r\nexport const XCollapsePanelPrefix = 'x-collapse-panel';\r\n\r\n/**\r\n * Collapse Panel Property\r\n */\r\n@Component({ selector: `${XCollapsePanelPrefix}-property`, template: '' })\r\nexport class XCollapsePanelProperty extends XProperty {\r\n /**\r\n * @zh_CN 标题,支持模板自定义\r\n * @en_US Title, support template customization\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel [label]=\"labelTpl\"></x-collapse-panel>\r\n * </x-collapse>\r\n * <ng-template #labelTpl>Title 2</ng-template>\r\n * ```\r\n *\r\n */\r\n readonly label = input<XTemplate>();\r\n /**\r\n * @zh_CN 激活当前面板\r\n * @en_US Activate the current panel\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\" active></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly active = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US disabled\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\" disabled></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly disabled = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n}\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, signal } from '@angular/core';\r\nimport { XCollapsePrefix, XCollapseProperty } from './collapse.property';\r\n\r\n@Component({\r\n selector: `${XCollapsePrefix}`,\r\n templateUrl: './collapse.component.html',\r\n styleUrls: ['./collapse.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCollapseComponent extends XCollapseProperty {\r\n start = signal(0);\r\n panelChanges = signal<(() => void)[]>([]);\r\n active = signal<number[]>([]);\r\n\r\n change(num: number, add = true) {\r\n const i = this.active().indexOf(num);\r\n if (i === -1) {\r\n if (add) {\r\n this.active.update((x) => [...x, num]);\r\n }\r\n } else {\r\n if (!add) {\r\n this.active.update((x) => {\r\n x.splice(i, 1);\r\n return [...x];\r\n });\r\n }\r\n }\r\n if (this.accordion() && this.active().length === 2) {\r\n const panel = this.panelChanges()[this.active()[0] as number];\r\n panel && panel();\r\n return;\r\n }\r\n }\r\n}\r\n","<div #collapse class=\"x-collapse\" [class.x-collapse-ghost]=\"ghost()\" [class.x-collapse-bordered]=\"bordered()\">\r\n <ng-content></ng-content>\r\n</div>\r\n","import { Component, OnInit, ViewEncapsulation, ChangeDetectionStrategy, inject, signal } from '@angular/core';\r\nimport { XCollapsePanelPrefix, XCollapsePanelProperty } from './collapse.property';\r\nimport { XCollapseComponent } from './collapse.component';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\n\r\n@Component({\r\n selector: `${XCollapsePanelPrefix}`,\r\n imports: [XIconComponent, XOutletDirective],\r\n templateUrl: './collapse-panel.component.html',\r\n styleUrls: ['./collapse-panel.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCollapsePanelComponent extends XCollapsePanelProperty implements OnInit {\r\n index = signal<number>(0);\r\n collapseComponent = inject(XCollapseComponent, { optional: true, host: true });\r\n activeSignal = signal(false);\r\n\r\n ngOnInit() {\r\n if (!this.collapseComponent) return;\r\n this.activeSignal.set(this.active());\r\n this.index.set(this.collapseComponent.start());\r\n this.collapseComponent.start.update((x) => x + 1);\r\n this.collapseComponent.panelChanges.update((x) => {\r\n x.push(() => {\r\n this.headerClick();\r\n });\r\n return [...x];\r\n });\r\n if (this.activeSignal()) {\r\n this.collapseComponent.change(this.index());\r\n }\r\n }\r\n\r\n headerClick() {\r\n this.activeSignal.update((x) => !x);\r\n if (!this.collapseComponent) return;\r\n if (this.activeSignal()) this.collapseComponent.change(this.index());\r\n else this.collapseComponent.change(this.index(), false);\r\n }\r\n}\r\n","<div class=\"x-collapse-panel\" [class.x-activated]=\"activeSignal()\" [class.x-collapse-panel-disabled]=\"disabled()\">\r\n <div\r\n class=\"x-collapse-panel-header x-collapse-panel-icon-{{ collapseComponent?.iconPosition() }}\"\r\n (click)=\"!disabled() && headerClick()\"\r\n >\r\n <div class=\"x-collapse-panel-header-title\">\r\n <ng-container *xOutlet=\"label()\">{{ label() }}</ng-container>\r\n </div>\r\n @if (collapseComponent?.showIcon()) {\r\n <ng-container *xOutlet=\"collapseComponent?.icon()\">\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-container>\r\n }\r\n </div>\r\n\r\n <div class=\"x-collapse-panel-body\" [class.x-collapse-panel-active]=\"activeSignal()\">\r\n <div class=\"x-collapse-panel-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XCollapseComponent } from './collapse.component';\r\nimport { XCollapsePanelComponent } from './collapse-panel.component';\r\n\r\n@NgModule({\r\n exports: [XCollapseComponent, XCollapsePanelComponent],\r\n imports: [XCollapseComponent, XCollapsePanelComponent]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