ngx-tethys 19.0.4 → 19.0.6
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/CHANGELOG.md +21 -0
- package/anchor/anchor-link.component.d.ts +2 -1
- package/anchor/anchor.component.d.ts +2 -1
- package/anchor/anchor.token.d.ts +9 -0
- package/calendar/calendar-header.component.d.ts +3 -2
- package/carousel/carousel.component.d.ts +2 -1
- package/carousel/carousel.token.d.ts +7 -0
- package/carousel/engine/carousel-base.d.ts +3 -3
- package/carousel/engine/carousel-fade.d.ts +2 -2
- package/carousel/engine/carousel-noop.d.ts +2 -2
- package/carousel/engine/carousel-slide.d.ts +2 -2
- package/collapse/collapse-item.component.d.ts +2 -1
- package/collapse/collapse.component.d.ts +5 -5
- package/collapse/collapse.token.d.ts +15 -0
- package/color-picker/color-picker.component.d.ts +15 -3
- package/core/theme/enum.d.ts +5 -0
- package/core/theme/index.d.ts +1 -0
- package/core/theme/store.d.ts +1 -1
- package/core/theme/theme.d.ts +0 -5
- package/date-picker/abstract-picker.component.d.ts +6 -1
- package/date-picker/base-picker.component.d.ts +1 -1
- package/date-picker/lib/calendar/calendar-footer.component.d.ts +2 -1
- package/date-picker/lib/calendar/calendar-table.component.d.ts +4 -3
- package/date-picker/lib/popups/date-popup.component.d.ts +2 -1
- package/date-picker/lib/popups/inner-popup.component.d.ts +2 -1
- package/date-picker/picker.component.d.ts +2 -1
- package/date-picker/picker.util.d.ts +5 -5
- package/date-picker/standard-types.d.ts +7 -2
- package/drag-drop/drag-drop.service.d.ts +2 -2
- package/drag-drop/{drop-container.class.d.ts → drag-drop.token.d.ts} +12 -7
- package/drag-drop/drag-handle.directive.d.ts +2 -1
- package/drag-drop/drag-ref.d.ts +3 -5
- package/drag-drop/drag.directive.d.ts +3 -3
- package/drag-drop/drop-container.directive.d.ts +1 -1
- package/drag-drop/index.d.ts +1 -1
- package/fesm2022/ngx-tethys-action.mjs +11 -12
- package/fesm2022/ngx-tethys-action.mjs.map +1 -1
- package/fesm2022/ngx-tethys-affix.mjs +8 -9
- package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
- package/fesm2022/ngx-tethys-alert.mjs +11 -12
- package/fesm2022/ngx-tethys-alert.mjs.map +1 -1
- package/fesm2022/ngx-tethys-anchor.mjs +26 -13
- package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
- package/fesm2022/ngx-tethys-arrow-switcher.mjs +7 -7
- package/fesm2022/ngx-tethys-autocomplete.mjs +17 -18
- package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
- package/fesm2022/ngx-tethys-avatar.mjs +25 -28
- package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-back-top.mjs +7 -7
- package/fesm2022/ngx-tethys-badge.mjs +7 -7
- package/fesm2022/ngx-tethys-breadcrumb.mjs +10 -10
- package/fesm2022/ngx-tethys-button.mjs +14 -15
- package/fesm2022/ngx-tethys-button.mjs.map +1 -1
- package/fesm2022/ngx-tethys-calendar.mjs +18 -20
- package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-card.mjs +15 -17
- package/fesm2022/ngx-tethys-card.mjs.map +1 -1
- package/fesm2022/ngx-tethys-carousel.mjs +28 -17
- package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
- package/fesm2022/ngx-tethys-cascader.mjs +16 -16
- package/fesm2022/ngx-tethys-checkbox.mjs +7 -7
- package/fesm2022/ngx-tethys-collapse.mjs +97 -85
- package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
- package/fesm2022/ngx-tethys-color-picker.mjs +34 -36
- package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-comment.mjs +15 -17
- package/fesm2022/ngx-tethys-comment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-copy.mjs +8 -9
- package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
- package/fesm2022/ngx-tethys-core.mjs +21 -22
- package/fesm2022/ngx-tethys-core.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-picker.mjs +232 -248
- package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-range.mjs +10 -10
- package/fesm2022/ngx-tethys-dialog.mjs +22 -23
- package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
- package/fesm2022/ngx-tethys-divider.mjs +7 -7
- package/fesm2022/ngx-tethys-dot.mjs +8 -9
- package/fesm2022/ngx-tethys-dot.mjs.map +1 -1
- package/fesm2022/ngx-tethys-drag-drop.mjs +23 -30
- package/fesm2022/ngx-tethys-drag-drop.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dropdown.mjs +58 -70
- package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-tethys-empty.mjs +10 -10
- package/fesm2022/ngx-tethys-flexible-text.mjs +8 -8
- package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
- package/fesm2022/ngx-tethys-form.mjs +47 -54
- package/fesm2022/ngx-tethys-form.mjs.map +1 -1
- package/fesm2022/ngx-tethys-fullscreen.mjs +15 -16
- package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
- package/fesm2022/ngx-tethys-grid.mjs +46 -51
- package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
- package/fesm2022/ngx-tethys-guider.mjs +55 -61
- package/fesm2022/ngx-tethys-guider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-i18n.mjs +51 -54
- package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
- package/fesm2022/ngx-tethys-icon.mjs +11 -12
- package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
- package/fesm2022/ngx-tethys-image.mjs +32 -21
- package/fesm2022/ngx-tethys-image.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input-number.mjs +7 -7
- package/fesm2022/ngx-tethys-input.mjs +21 -23
- package/fesm2022/ngx-tethys-input.mjs.map +1 -1
- package/fesm2022/ngx-tethys-layout.mjs +73 -88
- package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
- package/fesm2022/ngx-tethys-list.mjs +19 -22
- package/fesm2022/ngx-tethys-list.mjs.map +1 -1
- package/fesm2022/ngx-tethys-loading.mjs +7 -7
- package/fesm2022/ngx-tethys-mention.mjs +11 -12
- package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
- package/fesm2022/ngx-tethys-menu.mjs +30 -30
- package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
- package/fesm2022/ngx-tethys-message.mjs +24 -24
- package/fesm2022/ngx-tethys-message.mjs.map +1 -1
- package/fesm2022/ngx-tethys-nav.mjs +26 -29
- package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
- package/fesm2022/ngx-tethys-notify.mjs +17 -17
- package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
- package/fesm2022/ngx-tethys-pagination.mjs +15 -17
- package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
- package/fesm2022/ngx-tethys-popover.mjs +21 -23
- package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
- package/fesm2022/ngx-tethys-progress.mjs +13 -13
- package/fesm2022/ngx-tethys-property-operation.mjs +11 -11
- package/fesm2022/ngx-tethys-property-operation.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property.mjs +11 -11
- package/fesm2022/ngx-tethys-property.mjs.map +1 -1
- package/fesm2022/ngx-tethys-radio.mjs +125 -115
- package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
- package/fesm2022/ngx-tethys-rate.mjs +10 -10
- package/fesm2022/ngx-tethys-resizable.mjs +18 -18
- package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
- package/fesm2022/ngx-tethys-result.mjs +7 -7
- package/fesm2022/ngx-tethys-segment.mjs +10 -10
- package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-select.mjs +10 -10
- package/fesm2022/ngx-tethys-shared.mjs +81 -109
- package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
- package/fesm2022/ngx-tethys-skeleton.mjs +23 -24
- package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slide.mjs +36 -41
- package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slider.mjs +7 -7
- package/fesm2022/ngx-tethys-space.mjs +11 -12
- package/fesm2022/ngx-tethys-space.mjs.map +1 -1
- package/fesm2022/ngx-tethys-statistic.mjs +7 -7
- package/fesm2022/ngx-tethys-stepper.mjs +22 -24
- package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
- package/fesm2022/ngx-tethys-strength.mjs +8 -8
- package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
- package/fesm2022/ngx-tethys-switch.mjs +7 -7
- package/fesm2022/ngx-tethys-table.mjs +22 -25
- package/fesm2022/ngx-tethys-table.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tabs.mjs +14 -15
- package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tag.mjs +12 -13
- package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
- package/fesm2022/ngx-tethys-time-picker.mjs +58 -56
- package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-timeline.mjs +13 -13
- package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tooltip.mjs +14 -15
- package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
- package/fesm2022/ngx-tethys-transfer.mjs +10 -10
- package/fesm2022/ngx-tethys-tree-select.mjs +10 -10
- package/fesm2022/ngx-tethys-tree.mjs +17 -21
- package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
- package/fesm2022/ngx-tethys-typography.mjs +15 -17
- package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
- package/fesm2022/ngx-tethys-upload.mjs +18 -19
- package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
- package/fesm2022/ngx-tethys-util.mjs +418 -396
- package/fesm2022/ngx-tethys-util.mjs.map +1 -1
- package/fesm2022/ngx-tethys-vote.mjs +7 -7
- package/fesm2022/ngx-tethys-watermark.mjs +8 -9
- package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
- package/fesm2022/ngx-tethys.mjs +1 -1
- package/fesm2022/ngx-tethys.mjs.map +1 -1
- package/grid/grid.type.d.ts +5 -0
- package/grid/index.d.ts +1 -0
- package/grid/thy-grid-item.component.d.ts +1 -1
- package/grid/thy-grid.component.d.ts +1 -11
- package/guider/guider-manager.d.ts +2 -1
- package/guider/guider-ref.d.ts +6 -6
- package/guider/guider-step-ref.d.ts +3 -4
- package/guider/guider.interface.d.ts +26 -0
- package/i18n/i18n.service.d.ts +1 -1
- package/i18n/index.d.ts +2 -5
- package/i18n/locale.d.ts +1 -7
- package/i18n/locales/index.d.ts +5 -0
- package/i18n/util.d.ts +3 -0
- package/icon/index.d.ts +1 -1
- package/image/image-group.component.d.ts +4 -4
- package/image/image.directive.d.ts +2 -1
- package/image/image.token.d.ts +17 -0
- package/layout/header.component.d.ts +6 -18
- package/list/selection/selection-list.d.ts +2 -1
- package/list/selection/selection.interface.d.ts +2 -3
- package/message/abstract/abstract-message-queue.service.d.ts +2 -2
- package/message/abstract/abstract-message-ref.d.ts +6 -2
- package/package.json +2 -1
- package/popover/popover.directive.d.ts +6 -2
- package/radio/group/radio-group.component.d.ts +2 -1
- package/radio/radio.component.d.ts +3 -3
- package/radio/radio.token.d.ts +12 -0
- package/resizable/interface.d.ts +5 -0
- package/resizable/resizable.directive.d.ts +9 -3
- package/resizable/resizable.service.d.ts +1 -1
- package/resizable/resize-handle.component.d.ts +1 -6
- package/schematics/version.d.ts +1 -1
- package/schematics/version.js +1 -1
- package/segment/segment-item.component.d.ts +2 -1
- package/segment/segment.token.d.ts +10 -4
- package/shared/index.d.ts +1 -0
- package/shared/option/list-option/list-option.component.d.ts +10 -5
- package/shared/option/option.component.d.ts +1 -3
- package/shared/option/option.token.d.ts +11 -11
- package/shared/shared.type.d.ts +1 -0
- package/table/index.d.ts +1 -0
- package/table/styles/table.scss +9 -1
- package/table/table-column.component.d.ts +5 -30
- package/table/table-skeleton.component.d.ts +11 -3
- package/table/table.component.d.ts +1 -3
- package/table/table.type.d.ts +3 -0
- package/tag/tag.component.d.ts +2 -4
- package/time-picker/inner/inner-time-picker.component.d.ts +3 -1
- package/time-picker/inner/inner-time-picker.store.d.ts +5 -5
- package/time-picker/time-picker.utils.d.ts +5 -5
- package/timeline/index.d.ts +1 -0
- package/timeline/timeline-item.component.d.ts +1 -1
- package/timeline/timeline.component.d.ts +1 -1
- package/timeline/timeline.type.d.ts +1 -0
- package/tooltip/tooltip.directive.d.ts +2 -10
- package/tree/index.d.ts +0 -1
- package/tree/tree-abstract.d.ts +1 -1
- package/tree/tree-node.component.d.ts +17 -8
- package/tree/tree.class.d.ts +40 -1
- package/tree/tree.component.d.ts +1 -1
- package/tree/tree.pipe.d.ts +1 -1
- package/tree/tree.service.d.ts +3 -9
- package/util/helpers/helpers.d.ts +1 -0
- package/tree/tree-node.class.d.ts +0 -29
|
@@ -70,10 +70,10 @@ class ThySegmentItem {
|
|
|
70
70
|
this.destroy$.next();
|
|
71
71
|
this.destroy$.complete();
|
|
72
72
|
}
|
|
73
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
74
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
73
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThySegmentItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
74
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: ThySegmentItem, isStandalone: true, selector: "thy-segment-item,[thy-segment-item]", inputs: { thyValue: "thyValue", thyIcon: "thyIcon", thyDisabled: ["thyDisabled", "thyDisabled", coerceBooleanProperty] }, host: { properties: { "class.disabled": "this.thyDisabled" }, classAttribute: "thy-segment-item" }, ngImport: i0, template: "<div\n class=\"thy-segment-item-label\"\n [ngClass]=\"{\n 'thy-segment-item-label-only-icon': isOnlyIcon\n }\"\n >\n @if (thyIcon) {\n <thy-icon class=\"thy-segment-item-icon\" [ngClass]=\"{ 'icon-with-text': isWithText }\" [thyIconName]=\"thyIcon\"></thy-icon>\n }\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
75
75
|
}
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThySegmentItem, decorators: [{
|
|
77
77
|
type: Component,
|
|
78
78
|
args: [{ selector: 'thy-segment-item,[thy-segment-item]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
79
79
|
class: 'thy-segment-item'
|
|
@@ -177,15 +177,15 @@ class ThySegment {
|
|
|
177
177
|
this.cdr.detectChanges();
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
181
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
180
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThySegment, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
181
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: ThySegment, isStandalone: true, selector: "thy-segment", inputs: { thySize: "thySize", thyMode: "thyMode", thyDisabled: ["thyDisabled", "thyDisabled", coerceBooleanProperty], thyActiveIndex: ["thyActiveIndex", "thyActiveIndex", numberAttribute] }, outputs: { thySelectChange: "thySelectChange" }, host: { properties: { "class.thy-segment-xs": "thySize === 'xs'", "class.thy-segment-sm": "thySize === 'sm'", "class.thy-segment-md": "thySize === 'md'", "class.thy-segment-default": "!thySize || thySize === 'default'", "class.thy-segment-block": "thyMode === 'block'", "class.disabled": "this.thyDisabled" }, classAttribute: "thy-segment" }, providers: [
|
|
182
182
|
{
|
|
183
183
|
provide: THY_SEGMENTED_COMPONENT,
|
|
184
184
|
useExisting: ThySegment
|
|
185
185
|
}
|
|
186
186
|
], queries: [{ propertyName: "options", predicate: ThySegmentItem }], exportAs: ["thySegment"], ngImport: i0, template: "<div class=\"thy-segment-group\">\n @if (animationState) {\n <div\n class=\"thy-segment-thumb thy-segment-thumb-motion\"\n [@thumbMotion]=\"animationState\"\n (@thumbMotion.done)=\"handleThumbAnimationDone($event)\"\n ></div>\n }\n\n <ng-content></ng-content>\n</div>\n", animations: [thumbMotion], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
187
187
|
}
|
|
188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThySegment, decorators: [{
|
|
189
189
|
type: Component,
|
|
190
190
|
args: [{ selector: 'thy-segment', exportAs: 'thySegment', animations: [thumbMotion], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
191
191
|
{
|
|
@@ -227,11 +227,11 @@ function getThumbAnimationProps(element) {
|
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
class ThySegmentModule {
|
|
230
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
231
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
232
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
230
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThySegmentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
231
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: ThySegmentModule, imports: [CommonModule, ThyIconModule, ThyTooltipModule, ThySegment, ThySegmentItem], exports: [ThySegment, ThySegmentItem] }); }
|
|
232
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThySegmentModule, imports: [CommonModule, ThyIconModule, ThyTooltipModule, ThySegmentItem] }); }
|
|
233
233
|
}
|
|
234
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThySegmentModule, decorators: [{
|
|
235
235
|
type: NgModule,
|
|
236
236
|
args: [{
|
|
237
237
|
imports: [CommonModule, ThyIconModule, ThyTooltipModule, ThySegment, ThySegmentItem],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-segment.mjs","sources":["../../../src/segment/segment.token.ts","../../../src/segment/segment-item.component.ts","../../../src/segment/segment-item.component.html","../../../src/segment/segment.component.ts","../../../src/segment/segment.component.html","../../../src/segment/segment.module.ts","../../../src/segment/ngx-tethys-segment.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { ThySegmentItem } from './segment-item.component';\n\nexport interface IThySegmentComponent {\n thyMode: string;\n thyDisabled: boolean;\n selectedItem: ThySegmentItem;\n changeSelectedItem: (item: ThySegmentItem, event?: Event) => void;\n}\n\nexport const THY_SEGMENTED_COMPONENT = new InjectionToken<IThySegmentComponent>('THY_SEGMENTED_COMPONENT');\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Input,\n NgZone,\n OnDestroy,\n Renderer2,\n inject\n} from '@angular/core';\nimport { IThySegmentComponent, THY_SEGMENTED_COMPONENT } from './segment.token';\nimport { assertIconOnly, coerceBooleanProperty } from 'ngx-tethys/util';\nimport { Subject, fromEvent } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { SafeAny } from 'ngx-tethys/types';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { NgClass } from '@angular/common';\n\n/**\n * 分段控制器的选项组件\n * @name thy-segment-item,[thy-segment-item]\n */\n@Component({\n selector: 'thy-segment-item,[thy-segment-item]',\n templateUrl: './segment-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-segment-item'\n },\n imports: [NgClass, ThyIcon]\n})\nexport class ThySegmentItem implements AfterViewInit, OnDestroy {\n elementRef = inject(ElementRef);\n private ngZone = inject(NgZone);\n private cdr = inject(ChangeDetectorRef);\n private renderer = inject(Renderer2);\n private parent = inject(THY_SEGMENTED_COMPONENT, { optional: true })!;\n\n /**\n * 选项的值\n */\n @Input() thyValue: SafeAny;\n\n /**\n * 选项的图标\n */\n @Input() thyIcon: string;\n\n /**\n * 是否禁用该选项\n */\n @Input({ transform: coerceBooleanProperty })\n @HostBinding(`class.disabled`)\n thyDisabled = false;\n\n public isOnlyIcon: boolean;\n\n public isWithText: boolean;\n\n private destroy$ = new Subject<void>();\n\n constructor() {\n const elementRef = this.elementRef;\n const ngZone = this.ngZone;\n\n ngZone.runOutsideAngular(() =>\n fromEvent(elementRef.nativeElement, 'click')\n .pipe(takeUntil(this.destroy$))\n .subscribe((event: Event) => {\n if (!this.thyDisabled && !this.parent.thyDisabled && this.parent.selectedItem && this.parent.selectedItem !== this) {\n ngZone.run(() => {\n this.parent.selectedItem.unselect();\n this.parent.changeSelectedItem(this, event);\n });\n }\n })\n );\n }\n\n ngAfterViewInit(): void {\n const labelDiv = this.elementRef.nativeElement.children[0];\n this.isOnlyIcon = assertIconOnly(labelDiv) && this.parent.thyMode === 'inline';\n this.cdr.detectChanges();\n\n this.wrapSpanForText(labelDiv.childNodes);\n }\n\n public select() {\n this.elementRef.nativeElement.classList.add('active');\n }\n\n public unselect() {\n this.elementRef.nativeElement.classList.remove('active');\n }\n\n private wrapSpanForText(nodes: NodeList): void {\n nodes.forEach(node => {\n if (node.nodeName === '#text') {\n const span = this.renderer.createElement('span');\n const parent = this.renderer.parentNode(node);\n this.renderer.insertBefore(parent, span, node);\n this.renderer.appendChild(span, node);\n }\n\n if (node.nodeName === '#text' || node.nodeName === 'SPAN') {\n this.isWithText = true;\n this.cdr.detectChanges();\n }\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","<div\n class=\"thy-segment-item-label\"\n [ngClass]=\"{\n 'thy-segment-item-label-only-icon': isOnlyIcon\n }\"\n >\n @if (thyIcon) {\n <thy-icon class=\"thy-segment-item-icon\" [ngClass]=\"{ 'icon-with-text': isWithText }\" [thyIconName]=\"thyIcon\"></thy-icon>\n }\n <ng-content></ng-content>\n</div>\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n DestroyRef,\n EventEmitter,\n HostBinding,\n Input,\n Output,\n QueryList,\n ViewEncapsulation,\n numberAttribute,\n inject\n} from '@angular/core';\nimport { ThumbAnimationProps } from 'ngx-tethys/core';\nimport { thumbMotion } from 'ngx-tethys/core';\nimport { ThySegmentItem } from './segment-item.component';\nimport { IThySegmentComponent, THY_SEGMENTED_COMPONENT } from './segment.token';\nimport { ThySegmentEvent } from './types';\nimport { AnimationEvent } from '@angular/animations';\n\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nexport type ThySegmentSize = 'xs' | 'sm' | 'md' | 'default';\n\nexport type ThySegmentMode = 'block' | 'inline';\n\n/**\n * 分段控制器组件\n * @name thy-segment\n */\n@Component({\n selector: 'thy-segment',\n templateUrl: './segment.component.html',\n exportAs: 'thySegment',\n animations: [thumbMotion],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: THY_SEGMENTED_COMPONENT,\n useExisting: ThySegment\n }\n ],\n host: {\n class: 'thy-segment',\n '[class.thy-segment-xs]': `thySize === 'xs'`,\n '[class.thy-segment-sm]': `thySize === 'sm'`,\n '[class.thy-segment-md]': `thySize === 'md'`,\n '[class.thy-segment-default]': `!thySize || thySize === 'default'`,\n '[class.thy-segment-block]': `thyMode === 'block'`\n },\n imports: []\n})\nexport class ThySegment implements IThySegmentComponent, AfterContentInit {\n private cdr = inject(ChangeDetectorRef);\n private destroyRef = inject(DestroyRef);\n\n /**\n * @internal\n */\n @ContentChildren(ThySegmentItem) options!: QueryList<ThySegmentItem>;\n\n /**\n * 大小\n * @type xs | sm | md | default\n */\n @Input() thySize: ThySegmentSize = 'default';\n\n /**\n * 模式\n * @type block | inline\n */\n @Input() thyMode: ThySegmentMode = 'block';\n\n /**\n * 是否禁用分段控制器\n */\n @Input({ transform: coerceBooleanProperty })\n @HostBinding(`class.disabled`)\n thyDisabled = false;\n\n /**\n * 选中选项的索引\n */\n @Input({ transform: numberAttribute })\n set thyActiveIndex(value: number) {\n this.newActiveIndex = value;\n if (value < 0 || value === this.activeIndex) {\n return;\n }\n setTimeout(() => {\n const selectedItem = this.options?.get(this.activeIndex);\n if (selectedItem) {\n selectedItem.unselect();\n this.changeSelectedItem(this.options.get(value));\n } else {\n this.activeIndex = value;\n }\n });\n }\n\n /**\n * 选项被选中的回调事件\n */\n @Output() readonly thySelectChange = new EventEmitter<ThySegmentEvent>();\n\n public selectedItem: ThySegmentItem;\n\n private newActiveIndex: number;\n\n private activeIndex: number;\n\n public animationState: null | { value: string; params: ThumbAnimationProps } = null;\n\n public transitionedTo: any = null;\n\n ngAfterContentInit(): void {\n this.selectedItem = this.options.get(this.newActiveIndex) || this.options.get(0);\n this.selectedItem?.select();\n\n this.options.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.options.forEach(item => {\n item.unselect();\n });\n this.selectedItem = this.options.get(this.newActiveIndex) || this.options.get(0);\n this.selectedItem?.select();\n this.cdr.detectChanges();\n });\n }\n\n public changeSelectedItem(item: ThySegmentItem, event?: Event): void {\n this.animationState = {\n value: 'from',\n params: getThumbAnimationProps(this.options?.get(this.activeIndex || 0)?.elementRef.nativeElement!)\n };\n this.selectedItem = null;\n this.cdr.detectChanges();\n\n this.animationState = {\n value: 'to',\n params: getThumbAnimationProps(item.elementRef.nativeElement!)\n };\n this.transitionedTo = item;\n this.activeIndex = this.options?.toArray().findIndex(option => {\n return option.thyValue === item?.thyValue;\n });\n this.thySelectChange.emit({ event: event, value: item.thyValue, activeIndex: this.activeIndex });\n this.cdr.detectChanges();\n }\n\n public handleThumbAnimationDone(event: AnimationEvent): void {\n if (event.fromState === 'from') {\n this.selectedItem = this.transitionedTo;\n this.selectedItem?.select();\n this.transitionedTo = null;\n this.animationState = null;\n this.cdr.detectChanges();\n }\n }\n}\n\nfunction getThumbAnimationProps(element: HTMLElement): ThumbAnimationProps {\n return {\n transform: element.offsetLeft,\n width: element.clientWidth\n };\n}\n","<div class=\"thy-segment-group\">\n @if (animationState) {\n <div\n class=\"thy-segment-thumb thy-segment-thumb-motion\"\n [@thumbMotion]=\"animationState\"\n (@thumbMotion.done)=\"handleThumbAnimationDone($event)\"\n ></div>\n }\n\n <ng-content></ng-content>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyTooltipModule } from 'ngx-tethys/tooltip';\nimport { ThySegment } from './segment.component';\nimport { ThySegmentItem } from './segment-item.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyTooltipModule, ThySegment, ThySegmentItem],\n exports: [ThySegment, ThySegmentItem]\n})\nexport class ThySegmentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAUO,MAAM,uBAAuB,GAAG,IAAI,cAAc,CAAuB,yBAAyB,CAAC;;ACW1G;;;AAGG;MAUU,cAAc,CAAA;AA8BvB,IAAA,WAAA,GAAA;AA7BA,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AACvB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC/B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;QAC5B,IAAM,CAAA,MAAA,GAAG,MAAM,CAAC,uBAAuB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAE;AAYrE;;AAEG;QAGH,IAAW,CAAA,WAAA,GAAG,KAAK;AAMX,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,OAAO,EAAQ;AAGlC,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU;AAClC,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM;AAE1B,QAAA,MAAM,CAAC,iBAAiB,CAAC,MACrB,SAAS,CAAC,UAAU,CAAC,aAAa,EAAE,OAAO;AACtC,aAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;AAC7B,aAAA,SAAS,CAAC,CAAC,KAAY,KAAI;YACxB,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY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A,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAHf,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAc,cAAc,CAAA,EAAA,CAAA,CAAA;;2FAG1E,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,cAAc,CAAC;AACpF,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,cAAc;AACvC,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-segment.mjs","sources":["../../../src/segment/segment.token.ts","../../../src/segment/segment-item.component.ts","../../../src/segment/segment-item.component.html","../../../src/segment/segment.component.ts","../../../src/segment/segment.component.html","../../../src/segment/segment.module.ts","../../../src/segment/ngx-tethys-segment.ts"],"sourcesContent":["import { ElementRef, InjectionToken } from '@angular/core';\nimport { SafeAny } from 'ngx-tethys/types';\n\nexport interface IThySegmentItemComponent {\n elementRef: ElementRef<HTMLElement>;\n thyValue: SafeAny;\n unselect: () => void;\n select: () => void;\n}\n\nexport interface IThySegmentComponent {\n thyMode: string;\n thyDisabled: boolean;\n selectedItem: IThySegmentItemComponent;\n changeSelectedItem: (item: IThySegmentItemComponent, event?: Event) => void;\n}\n\nexport const THY_SEGMENTED_COMPONENT = new InjectionToken<IThySegmentComponent>('THY_SEGMENTED_COMPONENT');\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Input,\n NgZone,\n OnDestroy,\n Renderer2,\n inject\n} from '@angular/core';\nimport { IThySegmentItemComponent, THY_SEGMENTED_COMPONENT } from './segment.token';\nimport { assertIconOnly, coerceBooleanProperty } from 'ngx-tethys/util';\nimport { Subject, fromEvent } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { SafeAny } from 'ngx-tethys/types';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { NgClass } from '@angular/common';\n\n/**\n * 分段控制器的选项组件\n * @name thy-segment-item,[thy-segment-item]\n */\n@Component({\n selector: 'thy-segment-item,[thy-segment-item]',\n templateUrl: './segment-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-segment-item'\n },\n imports: [NgClass, ThyIcon]\n})\nexport class ThySegmentItem implements IThySegmentItemComponent, AfterViewInit, OnDestroy {\n elementRef = inject(ElementRef);\n private ngZone = inject(NgZone);\n private cdr = inject(ChangeDetectorRef);\n private renderer = inject(Renderer2);\n private parent = inject(THY_SEGMENTED_COMPONENT, { optional: true })!;\n\n /**\n * 选项的值\n */\n @Input() thyValue: SafeAny;\n\n /**\n * 选项的图标\n */\n @Input() thyIcon: string;\n\n /**\n * 是否禁用该选项\n */\n @Input({ transform: coerceBooleanProperty })\n @HostBinding(`class.disabled`)\n thyDisabled = false;\n\n public isOnlyIcon: boolean;\n\n public isWithText: boolean;\n\n private destroy$ = new Subject<void>();\n\n constructor() {\n const elementRef = this.elementRef;\n const ngZone = this.ngZone;\n\n ngZone.runOutsideAngular(() =>\n fromEvent(elementRef.nativeElement, 'click')\n .pipe(takeUntil(this.destroy$))\n .subscribe((event: Event) => {\n if (!this.thyDisabled && !this.parent.thyDisabled && this.parent.selectedItem && this.parent.selectedItem !== this) {\n ngZone.run(() => {\n this.parent.selectedItem.unselect();\n this.parent.changeSelectedItem(this, event);\n });\n }\n })\n );\n }\n\n ngAfterViewInit(): void {\n const labelDiv = this.elementRef.nativeElement.children[0];\n this.isOnlyIcon = assertIconOnly(labelDiv) && this.parent.thyMode === 'inline';\n this.cdr.detectChanges();\n\n this.wrapSpanForText(labelDiv.childNodes);\n }\n\n public select(): void {\n this.elementRef.nativeElement.classList.add('active');\n }\n\n public unselect(): void {\n this.elementRef.nativeElement.classList.remove('active');\n }\n\n private wrapSpanForText(nodes: NodeList): void {\n nodes.forEach(node => {\n if (node.nodeName === '#text') {\n const span = this.renderer.createElement('span');\n const parent = this.renderer.parentNode(node);\n this.renderer.insertBefore(parent, span, node);\n this.renderer.appendChild(span, node);\n }\n\n if (node.nodeName === '#text' || node.nodeName === 'SPAN') {\n this.isWithText = true;\n this.cdr.detectChanges();\n }\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","<div\n class=\"thy-segment-item-label\"\n [ngClass]=\"{\n 'thy-segment-item-label-only-icon': isOnlyIcon\n }\"\n >\n @if (thyIcon) {\n <thy-icon class=\"thy-segment-item-icon\" [ngClass]=\"{ 'icon-with-text': isWithText }\" [thyIconName]=\"thyIcon\"></thy-icon>\n }\n <ng-content></ng-content>\n</div>\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n DestroyRef,\n EventEmitter,\n HostBinding,\n Input,\n Output,\n QueryList,\n ViewEncapsulation,\n numberAttribute,\n inject\n} from '@angular/core';\nimport { ThumbAnimationProps } from 'ngx-tethys/core';\nimport { thumbMotion } from 'ngx-tethys/core';\nimport { ThySegmentItem } from './segment-item.component';\nimport { IThySegmentComponent, THY_SEGMENTED_COMPONENT } from './segment.token';\nimport { ThySegmentEvent } from './types';\nimport { AnimationEvent } from '@angular/animations';\n\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nexport type ThySegmentSize = 'xs' | 'sm' | 'md' | 'default';\n\nexport type ThySegmentMode = 'block' | 'inline';\n\n/**\n * 分段控制器组件\n * @name thy-segment\n */\n@Component({\n selector: 'thy-segment',\n templateUrl: './segment.component.html',\n exportAs: 'thySegment',\n animations: [thumbMotion],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: THY_SEGMENTED_COMPONENT,\n useExisting: ThySegment\n }\n ],\n host: {\n class: 'thy-segment',\n '[class.thy-segment-xs]': `thySize === 'xs'`,\n '[class.thy-segment-sm]': `thySize === 'sm'`,\n '[class.thy-segment-md]': `thySize === 'md'`,\n '[class.thy-segment-default]': `!thySize || thySize === 'default'`,\n '[class.thy-segment-block]': `thyMode === 'block'`\n },\n imports: []\n})\nexport class ThySegment implements IThySegmentComponent, AfterContentInit {\n private cdr = inject(ChangeDetectorRef);\n private destroyRef = inject(DestroyRef);\n\n /**\n * @internal\n */\n @ContentChildren(ThySegmentItem) options!: QueryList<ThySegmentItem>;\n\n /**\n * 大小\n * @type xs | sm | md | default\n */\n @Input() thySize: ThySegmentSize = 'default';\n\n /**\n * 模式\n * @type block | inline\n */\n @Input() thyMode: ThySegmentMode = 'block';\n\n /**\n * 是否禁用分段控制器\n */\n @Input({ transform: coerceBooleanProperty })\n @HostBinding(`class.disabled`)\n thyDisabled = false;\n\n /**\n * 选中选项的索引\n */\n @Input({ transform: numberAttribute })\n set thyActiveIndex(value: number) {\n this.newActiveIndex = value;\n if (value < 0 || value === this.activeIndex) {\n return;\n }\n setTimeout(() => {\n const selectedItem = this.options?.get(this.activeIndex);\n if (selectedItem) {\n selectedItem.unselect();\n this.changeSelectedItem(this.options.get(value));\n } else {\n this.activeIndex = value;\n }\n });\n }\n\n /**\n * 选项被选中的回调事件\n */\n @Output() readonly thySelectChange = new EventEmitter<ThySegmentEvent>();\n\n public selectedItem: ThySegmentItem;\n\n private newActiveIndex: number;\n\n private activeIndex: number;\n\n public animationState: null | { value: string; params: ThumbAnimationProps } = null;\n\n public transitionedTo: any = null;\n\n ngAfterContentInit(): void {\n this.selectedItem = this.options.get(this.newActiveIndex) || this.options.get(0);\n this.selectedItem?.select();\n\n this.options.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.options.forEach(item => {\n item.unselect();\n });\n this.selectedItem = this.options.get(this.newActiveIndex) || this.options.get(0);\n this.selectedItem?.select();\n this.cdr.detectChanges();\n });\n }\n\n public changeSelectedItem(item: ThySegmentItem, event?: Event): void {\n this.animationState = {\n value: 'from',\n params: getThumbAnimationProps(this.options?.get(this.activeIndex || 0)?.elementRef.nativeElement!)\n };\n this.selectedItem = null;\n this.cdr.detectChanges();\n\n this.animationState = {\n value: 'to',\n params: getThumbAnimationProps(item.elementRef.nativeElement!)\n };\n this.transitionedTo = item;\n this.activeIndex = this.options?.toArray().findIndex(option => {\n return option.thyValue === item?.thyValue;\n });\n this.thySelectChange.emit({ event: event, value: item.thyValue, activeIndex: this.activeIndex });\n this.cdr.detectChanges();\n }\n\n public handleThumbAnimationDone(event: AnimationEvent): void {\n if (event.fromState === 'from') {\n this.selectedItem = this.transitionedTo;\n this.selectedItem?.select();\n this.transitionedTo = null;\n this.animationState = null;\n this.cdr.detectChanges();\n }\n }\n}\n\nfunction getThumbAnimationProps(element: HTMLElement): ThumbAnimationProps {\n return {\n transform: element.offsetLeft,\n width: element.clientWidth\n };\n}\n","<div class=\"thy-segment-group\">\n @if (animationState) {\n <div\n class=\"thy-segment-thumb thy-segment-thumb-motion\"\n [@thumbMotion]=\"animationState\"\n (@thumbMotion.done)=\"handleThumbAnimationDone($event)\"\n ></div>\n }\n\n <ng-content></ng-content>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyTooltipModule } from 'ngx-tethys/tooltip';\nimport { ThySegment } from './segment.component';\nimport { ThySegmentItem } from './segment-item.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyTooltipModule, ThySegment, ThySegmentItem],\n exports: [ThySegment, ThySegmentItem]\n})\nexport class ThySegmentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAiBO,MAAM,uBAAuB,GAAG,IAAI,cAAc,CAAuB,yBAAyB,CAAC;;ACI1G;;;AAGG;MAUU,cAAc,CAAA;AA8BvB,IAAA,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F,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,cAAc;AACvC,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -779,8 +779,8 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
779
779
|
this.destroy$.next();
|
|
780
780
|
this.destroy$.complete();
|
|
781
781
|
}
|
|
782
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
783
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
782
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThySelect, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
783
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: ThySelect, isStandalone: true, selector: "thy-select,thy-custom-select", inputs: { thyDropdownWidthMode: "thyDropdownWidthMode", thyShowSearch: ["thyShowSearch", "thyShowSearch", coerceBooleanProperty], thyPlaceHolder: "thyPlaceHolder", thyServerSearch: ["thyServerSearch", "thyServerSearch", coerceBooleanProperty], thyLoadState: ["thyLoadState", "thyLoadState", coerceBooleanProperty], thyAutoActiveFirstItem: ["thyAutoActiveFirstItem", "thyAutoActiveFirstItem", coerceBooleanProperty], thyMode: "thyMode", thySize: "thySize", thyEmptyStateText: "thyEmptyStateText", thyEmptySearchMessageText: "thyEmptySearchMessageText", thyEnableScrollLoad: ["thyEnableScrollLoad", "thyEnableScrollLoad", coerceBooleanProperty], thyAllowClear: ["thyAllowClear", "thyAllowClear", coerceBooleanProperty], thyDisabled: ["thyDisabled", "thyDisabled", coerceBooleanProperty], thySortComparator: "thySortComparator", thyFooterTemplate: "thyFooterTemplate", thyPlacement: "thyPlacement", thyOrigin: "thyOrigin", thyFooterClass: "thyFooterClass", thyAutoExpand: ["thyAutoExpand", "thyAutoExpand", coerceBooleanProperty], thyHasBackdrop: ["thyHasBackdrop", "thyHasBackdrop", coerceBooleanProperty], thyMaxTagCount: ["thyMaxTagCount", "thyMaxTagCount", numberAttribute], thyBorderless: ["thyBorderless", "thyBorderless", coerceBooleanProperty], thyOptions: "thyOptions", thyPreset: "thyPreset" }, outputs: { thyOnSearch: "thyOnSearch", thyOnScrollToBottom: "thyOnScrollToBottom", thyOnExpandStatusChange: "thyOnExpandStatusChange" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur($event)", "keydown": "handleKeydown($event)" }, properties: { "attr.tabindex": "tabIndex", "class.thy-select-custom": "this.isSelectCustom", "class.thy-select": "this.isSelect", "class.menu-is-opened": "this.panelOpen" } }, providers: [
|
|
784
784
|
{
|
|
785
785
|
provide: THY_OPTION_PARENT_COMPONENT,
|
|
786
786
|
useExisting: ThySelect
|
|
@@ -792,7 +792,7 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
792
792
|
}
|
|
793
793
|
], queries: [{ propertyName: "selectedValueDisplayRef", first: true, predicate: ["selectedDisplay"], descendants: true }, { propertyName: "contentOptions", predicate: ThyOption, descendants: true }, { propertyName: "contentGroups", predicate: ThySelectOptionGroup }], viewQueries: [{ propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, static: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, read: ElementRef, static: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true, read: ElementRef }, { propertyName: "viewOptions", predicate: ThyOption, descendants: true }, { propertyName: "viewGroups", predicate: ThySelectOptionGroup, descendants: true }], exportAs: ["thySelect"], usesInheritance: true, ngImport: i0, template: "<div\n cdk-overlay-origin\n thySelectControl\n (click)=\"toggle($event)\"\n #origin=\"cdkOverlayOrigin\"\n #trigger\n [thyPanelOpened]=\"panelOpen\"\n [thySelectedOptions]=\"selected\"\n [thyIsMultiple]=\"isMultiple\"\n [thyShowSearch]=\"thyShowSearch\"\n [thyAllowClear]=\"thyAllowClear\"\n [thySize]=\"thySize\"\n [thyPlaceholder]=\"thyPlaceHolder\"\n [customDisplayTemplate]=\"selectedValueDisplayRef\"\n [thyDisabled]=\"disabled\"\n [thyBorderless]=\"thyBorderless\"\n (thyOnClear)=\"clearSelectValue($event)\"\n (thyOnRemove)=\"remove($event)\"\n (thyOnSearch)=\"onSearchFilter($event)\"\n (thyOnBlur)=\"onBlur($event)\"\n [thyMaxTagCount]=\"thyMaxTagCount\"\n [thyPreset]=\"thyPreset\"></div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"thyHasBackdrop\"\n [cdkConnectedOverlayPositions]=\"dropDownPositions\"\n [cdkConnectedOverlayOrigin]=\"thyOrigin || origin\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"triggerRectWidth\"\n [cdkConnectedOverlayMinWidth]=\"dropDownMinWidth\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n cdkConnectedOverlayTransformOriginOn=\".thy-select-dropdown\"\n (attach)=\"onAttached()\"\n (detach)=\"close()\">\n <div\n thyStopPropagation\n [attr.tabindex]=\"-1\"\n [ngClass]=\"dropDownClass\"\n [@scaleYMotion]=\"placement === 'top' || placement === 'bottom' ? 'enter' : 'void'\"\n [@scaleXMotion]=\"placement === 'left' || placement === 'right' ? 'enter' : 'void'\"\n [@scaleMotion]=\"placement !== 'top' && placement !== 'bottom' && placement !== 'left' && placement !== 'right' ? 'enter' : 'void'\"\n (mousemove)=\"dropDownMouseMove($event)\">\n @if (contentOptions?.length > 0 || contentGroups?.length > 0 || innerOptions?.length > 0) {\n <div\n #panel\n class=\"thy-select-dropdown-options thy-select-dropdown-options-{{ size }}\"\n thyScroll\n (thyOnScrolled)=\"onOptionsScrolled($event)\"\n [thyEnable]=\"thyEnableScrollLoad\">\n @if (isReactiveDriven) {\n <ng-template [ngTemplateOutlet]=\"optionsContainer.optionsTemplate\"></ng-template>\n }\n <ng-content></ng-content>\n @if (isHiddenOptions) {\n <thy-loading [thyDone]=\"thyLoadState\" thySize=\"sm\"></thy-loading>\n <div class=\"thy-select-empty-content\">\n @if (thyLoadState) {\n <thy-empty [thyMessage]=\"emptySearchMessageText\" thySize=\"sm\" [thyIconName]=\"emptyIcon()\"></thy-empty>\n }\n </div>\n }\n </div>\n } @else {\n <thy-loading [thyDone]=\"thyLoadState\" thySize=\"sm\"></thy-loading>\n <div class=\"thy-select-empty-content\">\n @if (thyLoadState) {\n <thy-empty [thyMessage]=\"emptyStateText\" thySize=\"sm\" [thyIconName]=\"emptyIcon()\"></thy-empty>\n }\n </div>\n }\n @if (thyFooterTemplate) {\n <div [class]=\"thyFooterClass ? thyFooterClass : 'thy-custom-select-footer'\">\n @if (thyFooterTemplate) {\n <ng-template [ngTemplateOutlet]=\"thyFooterTemplate\"></ng-template>\n }\n </div>\n }\n </div>\n</ng-template>\n\n<thy-options-container #optionsContainer>\n @for (option of optionGroups; track $index) {\n @if (!option.children) {\n <thy-option\n [thyDisabled]=\"option.disabled\"\n [thyLabelText]=\"option.label\"\n [thyValue]=\"option.value\"\n [thyRawValue]=\"option\"></thy-option>\n } @else {\n <thy-option-group [thyGroupLabel]=\"option.groupLabel\">\n @for (sub of option.children; track sub.value) {\n <thy-option [thyDisabled]=\"sub.disabled\" [thyLabelText]=\"sub.label\" [thyValue]=\"sub.value\" [thyRawValue]=\"sub\"></thy-option>\n }\n </thy-option-group>\n }\n }\n</thy-options-container>\n", dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: ThySelectControl, selector: "thy-select-control,[thySelectControl]", inputs: ["thyPanelOpened", "thyIsMultiple", "thyShowSearch", "thySelectedOptions", "thyDisabled", "customDisplayTemplate", "thyAllowClear", "thyPlaceholder", "thySize", "thyMaxTagCount", "thyBorderless", "thyPreset"], outputs: ["thyOnSearch", "thyOnRemove", "thyOnClear", "thyOnBlur"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: ThyStopPropagationDirective, selector: "[thyStopPropagation]", inputs: ["thyStopPropagation"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: ThyScrollDirective, selector: "[thyScroll]", inputs: ["thyEnable"], outputs: ["thyOnScrolled"] }, { kind: "component", type: ThyLoading, selector: "thy-loading", inputs: ["thyDone", "thyTip", "thyIsMask"] }, { kind: "component", type: ThyEmpty, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }, { kind: "component", type: ThyOptionsContainer, selector: "thy-options-container" }, { kind: "component", type: ThyOption, selector: "thy-option", inputs: ["thyValue", "thyRawValue", "thyLabelText", "thyShowOptionCustom", "thySearchKey", "thyDisabled"], outputs: ["selectionChange", "visibleChange"] }, { kind: "component", type: ThySelectOptionGroup, selector: "thy-option-group", inputs: ["thyDisabled", "thyGroupLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [scaleXMotion, scaleYMotion, scaleMotion], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
794
794
|
}
|
|
795
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
795
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThySelect, decorators: [{
|
|
796
796
|
type: Component,
|
|
797
797
|
args: [{ selector: 'thy-select,thy-custom-select', exportAs: 'thySelect', providers: [
|
|
798
798
|
{
|
|
@@ -976,8 +976,8 @@ class ThyNativeSelect extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
976
976
|
this._innerValue = '';
|
|
977
977
|
this.onChangeFn(this._innerValue);
|
|
978
978
|
}
|
|
979
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
980
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
979
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyNativeSelect, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
980
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: ThyNativeSelect, isStandalone: true, selector: "thy-native-select", inputs: { thySize: "thySize", name: "name", thyAllowClear: ["thyAllowClear", "thyAllowClear", coerceBooleanProperty] }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur($event)" }, properties: { "attr.tabindex": "tabIndex", "class.thy-select": "this._isSelect" } }, providers: [
|
|
981
981
|
{
|
|
982
982
|
provide: NG_VALUE_ACCESSOR,
|
|
983
983
|
useExisting: forwardRef(() => ThyNativeSelect),
|
|
@@ -985,7 +985,7 @@ class ThyNativeSelect extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
985
985
|
}
|
|
986
986
|
], viewQueries: [{ propertyName: "selectElement", first: true, predicate: ["select"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<select\n #select\n thyInput\n [tabindex]=\"-1\"\n [thySize]=\"_size\"\n [disabled]=\"_disabled\"\n [(ngModel)]=\"_innerValue\"\n (ngModelChange)=\"ngModelChange()\"\n (blur)=\"onBlur($event)\"\n [class.thy-select-selection-allow-clear]=\"thyAllowClear\">\n <ng-content></ng-content>\n</select>\n<thy-icon thyIconName=\"angle-down\"></thy-icon>\n@if (thyAllowClear && _innerValue) {\n <a class=\"thy-select-remove remove-link\" href=\"javascript:;\" (click)=\"clearSelectValue($event)\">\n <thy-icon class=\"remove-link-icon\" thyIconName=\"close-circle-bold-fill\"></thy-icon>\n </a>\n}\n", dependencies: [{ kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] }); }
|
|
987
987
|
}
|
|
988
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
988
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyNativeSelect, decorators: [{
|
|
989
989
|
type: Component,
|
|
990
990
|
args: [{ selector: 'thy-native-select', providers: [
|
|
991
991
|
{
|
|
@@ -1014,8 +1014,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
|
|
|
1014
1014
|
}] } });
|
|
1015
1015
|
|
|
1016
1016
|
class ThySelectModule {
|
|
1017
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1018
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
1017
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThySelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1018
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: ThySelectModule, imports: [CommonModule,
|
|
1019
1019
|
FormsModule,
|
|
1020
1020
|
ThyInputModule,
|
|
1021
1021
|
OverlayModule,
|
|
@@ -1027,7 +1027,7 @@ class ThySelectModule {
|
|
|
1027
1027
|
ThyOptionModule,
|
|
1028
1028
|
ThyNativeSelect,
|
|
1029
1029
|
ThySelect], exports: [ThyNativeSelect, ThySelect, ThyOptionModule] }); }
|
|
1030
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
1030
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThySelectModule, providers: [THY_SELECT_SCROLL_STRATEGY_PROVIDER, THY_SELECT_CONFIG_PROVIDER], imports: [CommonModule,
|
|
1031
1031
|
FormsModule,
|
|
1032
1032
|
ThyInputModule,
|
|
1033
1033
|
OverlayModule,
|
|
@@ -1040,7 +1040,7 @@ class ThySelectModule {
|
|
|
1040
1040
|
ThyNativeSelect,
|
|
1041
1041
|
ThySelect, ThyOptionModule] }); }
|
|
1042
1042
|
}
|
|
1043
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1043
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThySelectModule, decorators: [{
|
|
1044
1044
|
type: NgModule,
|
|
1045
1045
|
args: [{
|
|
1046
1046
|
imports: [
|