ngx-tethys 19.0.13 → 19.1.0-next.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/CHANGELOG.md +29 -2
- package/action/action.component.d.ts +12 -20
- package/action/actions.component.d.ts +5 -7
- package/affix/affix.component.d.ts +7 -10
- package/alert/alert.component.d.ts +1 -1
- package/anchor/anchor-link.component.d.ts +8 -8
- package/anchor/anchor.component.d.ts +15 -21
- package/arrow-switcher/arrow-switcher.component.d.ts +15 -22
- package/autocomplete/autocomplete.component.d.ts +10 -17
- package/autocomplete/autocomplete.trigger.directive.d.ts +10 -18
- package/avatar/avatar-list/avatar-list.component.d.ts +8 -14
- package/avatar/avatar.component.d.ts +25 -39
- package/back-top/back-top.component.d.ts +9 -12
- package/badge/badge.component.d.ts +19 -59
- package/breadcrumb/breadcrumb.component.d.ts +15 -20
- package/button/button-icon.component.d.ts +3 -2
- package/button/button.component.d.ts +3 -2
- package/calendar/calendar-header.component.d.ts +9 -8
- package/calendar/calendar.component.d.ts +16 -16
- package/card/card.component.d.ts +5 -11
- package/card/content.component.d.ts +3 -8
- package/card/header.component.d.ts +7 -8
- package/carousel/carousel.component.d.ts +22 -27
- package/cascader/cascader-li.component.d.ts +13 -21
- package/cascader/cascader-search-option.component.d.ts +8 -16
- package/cascader/cascader.component.d.ts +58 -80
- package/checkbox/checkbox.component.d.ts +2 -5
- package/collapse/collapse-item.component.d.ts +12 -19
- package/collapse/collapse.component.d.ts +6 -12
- package/collapse/collapse.token.d.ts +3 -3
- package/color-picker/color-picker-custom-panel.component.d.ts +5 -5
- package/color-picker/color-picker-panel.component.d.ts +7 -11
- package/color-picker/color-picker.component.d.ts +19 -35
- package/color-picker/parts/alpha/alpha.component.d.ts +8 -8
- package/color-picker/parts/hue/hue.component.d.ts +6 -6
- package/color-picker/parts/indicator/indicator.component.d.ts +4 -3
- package/color-picker/parts/inputs/inputs.component.d.ts +9 -9
- package/color-picker/parts/saturation/saturation.component.d.ts +9 -9
- package/comment/comment.component.d.ts +4 -5
- package/copy/copy.directive.d.ts +8 -9
- package/date-picker/abstract-picker.component.d.ts +8 -7
- package/date-picker/lib/calendar/calendar-footer.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-range/date-range.component.d.ts +2 -2
- package/dialog/body/dialog-body.component.d.ts +2 -6
- package/dialog/confirm/confirm.component.d.ts +2 -2
- package/dialog/footer/dialog-footer.component.d.ts +6 -9
- package/dialog/header/dialog-header.component.d.ts +9 -11
- package/divider/divider.component.d.ts +12 -16
- package/dot/dot.component.d.ts +5 -13
- package/drag-drop/drag-handle.directive.d.ts +2 -1
- package/drag-drop/drag.directive.d.ts +2 -1
- package/drag-drop/drop-container.directive.d.ts +2 -1
- package/dropdown/dropdown-menu-item.directive.d.ts +3 -2
- package/dropdown/dropdown-menu.component.d.ts +2 -1
- package/dropdown/dropdown.directive.d.ts +2 -1
- package/empty/empty.component.d.ts +21 -27
- package/fesm2022/ngx-tethys-action.mjs +54 -91
- package/fesm2022/ngx-tethys-action.mjs.map +1 -1
- package/fesm2022/ngx-tethys-affix.mjs +29 -26
- package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
- package/fesm2022/ngx-tethys-anchor.mjs +91 -118
- package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
- package/fesm2022/ngx-tethys-arrow-switcher.mjs +51 -77
- package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
- package/fesm2022/ngx-tethys-autocomplete.mjs +69 -103
- package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
- package/fesm2022/ngx-tethys-avatar.mjs +117 -162
- package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-back-top.mjs +33 -46
- package/fesm2022/ngx-tethys-back-top.mjs.map +1 -1
- package/fesm2022/ngx-tethys-badge.mjs +104 -208
- package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
- package/fesm2022/ngx-tethys-breadcrumb.mjs +66 -70
- package/fesm2022/ngx-tethys-breadcrumb.mjs.map +1 -1
- package/fesm2022/ngx-tethys-calendar.mjs +85 -87
- package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-card.mjs +72 -77
- package/fesm2022/ngx-tethys-card.mjs.map +1 -1
- package/fesm2022/ngx-tethys-carousel.mjs +82 -99
- package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
- package/fesm2022/ngx-tethys-cascader.mjs +313 -468
- package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
- package/fesm2022/ngx-tethys-checkbox.mjs +10 -17
- package/fesm2022/ngx-tethys-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-tethys-collapse.mjs +66 -71
- package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
- package/fesm2022/ngx-tethys-color-picker.mjs +187 -246
- package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-comment.mjs +16 -10
- package/fesm2022/ngx-tethys-comment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-copy.mjs +25 -28
- package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dialog.mjs +81 -82
- package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
- package/fesm2022/ngx-tethys-divider.mjs +49 -58
- package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dot.mjs +45 -68
- package/fesm2022/ngx-tethys-dot.mjs.map +1 -1
- package/fesm2022/ngx-tethys-empty.mjs +107 -95
- package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
- package/fesm2022/ngx-tethys-form.mjs +161 -200
- package/fesm2022/ngx-tethys-form.mjs.map +1 -1
- package/fesm2022/ngx-tethys-fullscreen.mjs +21 -23
- package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
- package/fesm2022/ngx-tethys-grid.mjs +160 -152
- package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
- package/fesm2022/ngx-tethys-i18n.mjs +25 -25
- package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input-number.mjs +101 -114
- package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input.mjs +268 -271
- package/fesm2022/ngx-tethys-input.mjs.map +1 -1
- package/fesm2022/ngx-tethys-list.mjs +1 -1
- package/fesm2022/ngx-tethys-list.mjs.map +1 -1
- package/fesm2022/ngx-tethys-loading.mjs +17 -35
- package/fesm2022/ngx-tethys-loading.mjs.map +1 -1
- package/fesm2022/ngx-tethys-mention.mjs +52 -74
- package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
- package/fesm2022/ngx-tethys-menu.mjs +106 -179
- package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
- package/fesm2022/ngx-tethys-nav.mjs +169 -201
- package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
- package/fesm2022/ngx-tethys-pagination.mjs +230 -294
- package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
- package/fesm2022/ngx-tethys-popover.mjs +67 -70
- package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
- package/fesm2022/ngx-tethys-progress.mjs +196 -244
- package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property.mjs +102 -105
- package/fesm2022/ngx-tethys-property.mjs.map +1 -1
- package/fesm2022/ngx-tethys-radio.mjs +34 -38
- package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
- package/fesm2022/ngx-tethys-result.mjs +46 -28
- package/fesm2022/ngx-tethys-result.mjs.map +1 -1
- package/fesm2022/ngx-tethys-skeleton.mjs +339 -342
- package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slider.mjs +75 -108
- package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-space.mjs +26 -46
- package/fesm2022/ngx-tethys-space.mjs.map +1 -1
- package/fesm2022/ngx-tethys-statistic.mjs +114 -151
- package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
- package/fesm2022/ngx-tethys-stepper.mjs +74 -107
- package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
- package/fesm2022/ngx-tethys-switch.mjs +80 -140
- package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
- package/fesm2022/ngx-tethys-table.mjs +1 -1
- package/fesm2022/ngx-tethys-table.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tabs.mjs +69 -87
- package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tag.mjs +42 -64
- package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
- package/fesm2022/ngx-tethys-timeline.mjs +104 -129
- package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
- package/fesm2022/ngx-tethys-typography.mjs +36 -33
- package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
- package/fesm2022/ngx-tethys-upload.mjs +91 -130
- package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
- package/fesm2022/ngx-tethys-util.mjs.map +1 -1
- package/fesm2022/ngx-tethys-watermark.mjs +36 -40
- 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/form/form-group-error/form-group-error.component.d.ts +2 -3
- package/form/form-group-label.directive.d.ts +2 -1
- package/form/form-group.component.d.ts +17 -24
- package/form/form-submit.directive.d.ts +2 -2
- package/form/form.directive.d.ts +6 -8
- package/form/from-group-footer/form-group-footer.component.d.ts +2 -2
- package/form/validator/confirm-validator.directive.d.ts +2 -2
- package/form/validator/unique-validator.directive.d.ts +2 -2
- package/fullscreen/fullscreen.component.d.ts +7 -7
- package/grid/flex.d.ts +14 -19
- package/grid/thy-col.directive.d.ts +6 -9
- package/grid/thy-grid-item.component.d.ts +3 -4
- package/grid/thy-grid.component.d.ts +11 -12
- package/grid/thy-row.directive.d.ts +12 -12
- package/icon/icon.component.d.ts +3 -2
- package/image/image.directive.d.ts +3 -2
- package/input/input-count.component.d.ts +4 -5
- package/input/input-group.component.d.ts +20 -20
- package/input/input-search.component.d.ts +15 -20
- package/input/input.component.d.ts +20 -21
- package/input/input.directive.d.ts +4 -6
- package/input-number/input-number.component.d.ts +21 -29
- package/layout/header.component.d.ts +4 -9
- package/layout/sidebar-header.component.d.ts +2 -1
- package/layout/sidebar.component.d.ts +8 -7
- package/list/list.component.d.ts +2 -1
- package/list/selection/selection-list.d.ts +4 -3
- package/loading/loading.component.d.ts +4 -10
- package/mention/mention.directive.d.ts +6 -7
- package/mention/suggestions/suggestions.component.d.ts +8 -9
- package/menu/group/menu-group.component.d.ts +16 -33
- package/menu/item/action/menu-item-action.component.d.ts +7 -8
- package/menu/item/icon/menu-item-icon.component.d.ts +2 -2
- package/menu/item/menu-item.component.d.ts +4 -4
- package/menu/item/name/menu-item-name.component.d.ts +2 -3
- package/menu/menu.component.d.ts +3 -7
- package/nav/icon-nav/icon-nav-link.directive.d.ts +3 -7
- package/nav/icon-nav/icon-nav.component.d.ts +3 -8
- package/nav/nav-ink-bar.directive.d.ts +4 -6
- package/nav/nav-item.directive.d.ts +7 -10
- package/nav/nav.component.d.ts +20 -48
- package/package.json +1 -1
- package/pagination/pagination.component.d.ts +48 -109
- package/popover/header/popover-header.component.d.ts +7 -6
- package/popover/popover.directive.d.ts +11 -18
- package/progress/progress-circle.component.d.ts +32 -21
- package/progress/progress-strip.component.d.ts +10 -14
- package/progress/progress.component.d.ts +15 -23
- package/property/examples/single/single.component.scss +6 -0
- package/property/properties.component.d.ts +6 -13
- package/property/property-item.component.d.ts +21 -26
- package/property/styles/properties.scss +124 -52
- package/property-operation/property-operation.component.d.ts +6 -5
- package/radio/button/radio-button.component.d.ts +2 -2
- package/radio/group/radio-group.component.d.ts +8 -7
- package/radio/radio.component.d.ts +2 -2
- package/radio/radio.token.d.ts +2 -2
- package/rate/rate-item.component.d.ts +2 -1
- package/rate/rate.component.d.ts +4 -3
- package/resizable/resizable.directive.d.ts +4 -9
- package/resizable/resize-handle.component.d.ts +2 -1
- package/resizable/resize-handles.component.d.ts +2 -1
- package/result/result.component.d.ts +9 -10
- 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.component.d.ts +2 -1
- package/select/custom-select/custom-select.component.d.ts +11 -10
- package/select/native-select/native-select.component.d.ts +2 -1
- package/shared/base-form-check.component.d.ts +3 -2
- package/shared/directives/thy-autofocus.directive.d.ts +3 -2
- package/shared/directives/thy-scroll.directive.d.ts +2 -1
- package/shared/directives/thy-show.d.ts +2 -1
- package/shared/option/group/option-group.component.d.ts +2 -1
- package/shared/option/list-option/list-option.component.d.ts +2 -7
- package/shared/option/option.component.d.ts +2 -1
- package/shared/select/select-control/select-control.component.d.ts +7 -6
- package/skeleton/skeleton-circle.component.d.ts +16 -19
- package/skeleton/skeleton-rectangle.component.d.ts +20 -23
- package/skeleton/skeleton.component.d.ts +5 -6
- package/skeleton/stylized/bullet-list.component.d.ts +11 -13
- package/skeleton/stylized/list.component.d.ts +10 -12
- package/skeleton/stylized/paragraph.component.d.ts +12 -14
- package/slide/slide-body/slide-body-section.component.d.ts +2 -1
- package/slider/slider.component.d.ts +17 -24
- package/space/space.component.d.ts +8 -8
- package/statistic/statistic.component.d.ts +35 -40
- package/stepper/step-header.component.d.ts +6 -10
- package/stepper/step.component.d.ts +6 -6
- package/stepper/stepper.component.d.ts +15 -20
- package/switch/switch.component.d.ts +24 -35
- package/table/table-column.component.d.ts +6 -5
- package/table/table-skeleton.component.d.ts +3 -10
- package/table/table.component.d.ts +11 -10
- package/tabs/tab-content.component.d.ts +4 -4
- package/tabs/tab.component.d.ts +4 -5
- package/tabs/tabs.component.d.ts +13 -15
- package/tag/tag.component.d.ts +10 -16
- package/time-picker/time-picker-panel.component.d.ts +3 -2
- package/time-picker/time-picker.component.d.ts +6 -5
- package/timeline/timeline-item.component.d.ts +9 -13
- package/timeline/timeline.component.d.ts +13 -17
- package/tooltip/tooltip.directive.d.ts +3 -2
- package/tree/tree-node.component.d.ts +6 -15
- package/tree/tree.component.d.ts +8 -7
- package/tree-select/tree-select.component.d.ts +8 -7
- package/typography/bg-color.directive.d.ts +3 -3
- package/typography/text/text.component.d.ts +2 -2
- package/typography/text-color.directive.d.ts +3 -3
- package/upload/file-drop.directive.d.ts +9 -11
- package/upload/file-select-base.d.ts +6 -10
- package/upload/file-select.component.d.ts +10 -20
- package/util/helpers/helpers.d.ts +2 -1
- package/vote/vote.component.d.ts +4 -3
- package/watermark/watermark.directive.d.ts +7 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { input, Directive, inject, computed, effect, afterNextRender, InjectionToken, ElementRef, DestroyRef, ChangeDetectionStrategy, Component, NgZone, contentChildren, NgModule } from '@angular/core';
|
|
3
3
|
import { ReplaySubject, Subject, Observable } from 'rxjs';
|
|
4
|
-
import { isString
|
|
4
|
+
import { isString } from 'ngx-tethys/util';
|
|
5
5
|
import { useHostRenderer } from '@tethys/cdk/dom';
|
|
6
6
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
7
|
import { ViewportRuler } from '@angular/cdk/scrolling';
|
|
@@ -15,6 +15,10 @@ import { isUndefinedOrNull } from '@tethys/cdk/is';
|
|
|
15
15
|
*/
|
|
16
16
|
class ThyRowDirective {
|
|
17
17
|
constructor() {
|
|
18
|
+
/**
|
|
19
|
+
* 栅格的间距
|
|
20
|
+
*/
|
|
21
|
+
this.thyGutter = input(undefined);
|
|
18
22
|
this.actualGutter$ = new ReplaySubject(1);
|
|
19
23
|
this.hostRenderer = useHostRenderer();
|
|
20
24
|
}
|
|
@@ -24,7 +28,6 @@ class ThyRowDirective {
|
|
|
24
28
|
ngOnChanges() {
|
|
25
29
|
this.setGutterStyle();
|
|
26
30
|
}
|
|
27
|
-
ngAfterViewInit() { }
|
|
28
31
|
setGutterStyle() {
|
|
29
32
|
const [horizontalGutter, verticalGutter] = this.getGutter();
|
|
30
33
|
this.actualGutter$.next([horizontalGutter, verticalGutter]);
|
|
@@ -41,13 +44,14 @@ class ThyRowDirective {
|
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
getGutter() {
|
|
44
|
-
|
|
47
|
+
const thyGutter = this.thyGutter();
|
|
48
|
+
if (isString(thyGutter)) {
|
|
45
49
|
throw Error(`thyGutter value can not be string type`);
|
|
46
50
|
}
|
|
47
|
-
return [
|
|
51
|
+
return [thyGutter, 0];
|
|
48
52
|
}
|
|
49
53
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyRowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
50
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
54
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: ThyRowDirective, isStandalone: true, selector: "[thyRow]", inputs: { thyGutter: { classPropertyName: "thyGutter", publicName: "thyGutter", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "thy-row" }, usesOnChanges: true, ngImport: i0 }); }
|
|
51
55
|
}
|
|
52
56
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyRowDirective, decorators: [{
|
|
53
57
|
type: Directive,
|
|
@@ -57,9 +61,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
57
61
|
class: 'thy-row'
|
|
58
62
|
}
|
|
59
63
|
}]
|
|
60
|
-
}], ctorParameters: () => []
|
|
61
|
-
type: Input
|
|
62
|
-
}] } });
|
|
64
|
+
}], ctorParameters: () => [] });
|
|
63
65
|
|
|
64
66
|
/**
|
|
65
67
|
* 栅格列指令
|
|
@@ -69,43 +71,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
69
71
|
class ThyColDirective {
|
|
70
72
|
constructor() {
|
|
71
73
|
this.thyRowDirective = inject(ThyRowDirective, { optional: true, host: true });
|
|
74
|
+
/**
|
|
75
|
+
* 栅格项的占位列数,thySpan 如果传递了值,以 thySpan 为准
|
|
76
|
+
*/
|
|
77
|
+
this.thyCol = input();
|
|
78
|
+
/**
|
|
79
|
+
* 栅格项的占位列数
|
|
80
|
+
*/
|
|
81
|
+
this.thySpan = input();
|
|
82
|
+
this.span = computed(() => {
|
|
83
|
+
const span = this.thySpan() ?? this.thyCol();
|
|
84
|
+
return span || 24;
|
|
85
|
+
});
|
|
72
86
|
this.hostRenderer = useHostRenderer();
|
|
73
87
|
this.takeUntilDestroyed = takeUntilDestroyed();
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
if (verticalGutter > 0) {
|
|
96
|
-
renderGutter('padding-top', verticalGutter);
|
|
97
|
-
renderGutter('padding-bottom', verticalGutter);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
}
|
|
88
|
+
effect(() => {
|
|
89
|
+
this.updateHostClass();
|
|
90
|
+
});
|
|
91
|
+
afterNextRender(() => {
|
|
92
|
+
if (this.thyRowDirective) {
|
|
93
|
+
this.thyRowDirective.actualGutter$.pipe(this.takeUntilDestroyed).subscribe(([horizontalGutter, verticalGutter]) => {
|
|
94
|
+
const renderGutter = (name, gutter) => {
|
|
95
|
+
this.hostRenderer.setStyle(name, `${gutter / 2}px`);
|
|
96
|
+
};
|
|
97
|
+
if (horizontalGutter > 0) {
|
|
98
|
+
renderGutter('padding-left', horizontalGutter);
|
|
99
|
+
renderGutter('padding-right', horizontalGutter);
|
|
100
|
+
}
|
|
101
|
+
if (verticalGutter > 0) {
|
|
102
|
+
renderGutter('padding-top', verticalGutter);
|
|
103
|
+
renderGutter('padding-bottom', verticalGutter);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
});
|
|
101
108
|
}
|
|
102
109
|
updateHostClass() {
|
|
110
|
+
const span = this.span();
|
|
103
111
|
this.hostRenderer.updateClassByMap({
|
|
104
|
-
[`thy-col-${
|
|
112
|
+
[`thy-col-${span}`]: true
|
|
105
113
|
});
|
|
106
114
|
}
|
|
107
115
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyColDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
108
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
116
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: ThyColDirective, isStandalone: true, selector: "[thyCol]", inputs: { thyCol: { classPropertyName: "thyCol", publicName: "thyCol", isSignal: true, isRequired: false, transformFunction: null }, thySpan: { classPropertyName: "thySpan", publicName: "thySpan", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "thy-col" }, ngImport: i0 }); }
|
|
109
117
|
}
|
|
110
118
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyColDirective, decorators: [{
|
|
111
119
|
type: Directive,
|
|
@@ -115,11 +123,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
115
123
|
class: 'thy-col'
|
|
116
124
|
}
|
|
117
125
|
}]
|
|
118
|
-
}],
|
|
119
|
-
type: Input
|
|
120
|
-
}], thySpan: [{
|
|
121
|
-
type: Input
|
|
122
|
-
}] } });
|
|
126
|
+
}], ctorParameters: () => [] });
|
|
123
127
|
|
|
124
128
|
class ThyGridToken {
|
|
125
129
|
}
|
|
@@ -148,11 +152,11 @@ class ThyGridItem {
|
|
|
148
152
|
* 栅格项的占位列数,为 0 时会隐藏该栅格项
|
|
149
153
|
* @default 1
|
|
150
154
|
*/
|
|
151
|
-
this.thySpan = THY_GRID_ITEM_DEFAULT_SPAN;
|
|
155
|
+
this.thySpan = input(THY_GRID_ITEM_DEFAULT_SPAN);
|
|
152
156
|
/**
|
|
153
157
|
* 栅格项左侧的偏移列数
|
|
154
158
|
*/
|
|
155
|
-
this.thyOffset = 0;
|
|
159
|
+
this.thyOffset = input(0);
|
|
156
160
|
this.destroyRef = inject(DestroyRef);
|
|
157
161
|
this.hostRenderer = useHostRenderer();
|
|
158
162
|
this.span = THY_GRID_ITEM_DEFAULT_SPAN;
|
|
@@ -170,7 +174,7 @@ class ThyGridItem {
|
|
|
170
174
|
this.hostRenderer.setStyle('margin-left', this.offset ? `calc(((100% - ${(this.span - 1) * xGap}px) / ${this.span} + ${xGap}px) * ${this.offset})` : '');
|
|
171
175
|
}
|
|
172
176
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyGridItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
173
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
177
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: ThyGridItem, isStandalone: true, selector: "thy-grid-item,[thyGridItem]", inputs: { thySpan: { classPropertyName: "thySpan", publicName: "thySpan", isSignal: true, isRequired: false, transformFunction: null }, thyOffset: { classPropertyName: "thyOffset", publicName: "thyOffset", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "thy-grid-item" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
174
178
|
}
|
|
175
179
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyGridItem, decorators: [{
|
|
176
180
|
type: Component,
|
|
@@ -182,11 +186,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
182
186
|
class: 'thy-grid-item'
|
|
183
187
|
}
|
|
184
188
|
}]
|
|
185
|
-
}]
|
|
186
|
-
type: Input
|
|
187
|
-
}], thyOffset: [{
|
|
188
|
-
type: Input
|
|
189
|
-
}] } });
|
|
189
|
+
}] });
|
|
190
190
|
|
|
191
191
|
/**
|
|
192
192
|
* 栅格组件
|
|
@@ -199,66 +199,67 @@ class ThyGrid {
|
|
|
199
199
|
this.elementRef = inject(ElementRef);
|
|
200
200
|
this.viewportRuler = inject(ViewportRuler);
|
|
201
201
|
this.ngZone = inject(NgZone);
|
|
202
|
+
/**
|
|
203
|
+
* @internal
|
|
204
|
+
*/
|
|
205
|
+
this.gridItems = contentChildren(ThyGridItem);
|
|
202
206
|
/**
|
|
203
207
|
* 栅格的列数
|
|
204
208
|
* @default 24
|
|
205
209
|
*/
|
|
206
|
-
this.thyCols = THY_GRID_DEFAULT_COLUMNS;
|
|
210
|
+
this.thyCols = input(THY_GRID_DEFAULT_COLUMNS);
|
|
207
211
|
/**
|
|
208
212
|
* 栅格的水平间隔
|
|
209
213
|
*/
|
|
210
|
-
this.thyXGap = 0;
|
|
214
|
+
this.thyXGap = input(0);
|
|
211
215
|
/**
|
|
212
216
|
* 栅格的垂直间隔
|
|
213
217
|
*/
|
|
214
|
-
this.thyYGap = 0;
|
|
218
|
+
this.thyYGap = input(0);
|
|
215
219
|
/**
|
|
216
220
|
* 栅格的水平和垂直间隔
|
|
217
221
|
*/
|
|
218
|
-
this.thyGap = 0;
|
|
222
|
+
this.thyGap = input(0);
|
|
219
223
|
/**
|
|
220
224
|
* 响应式栅格列数<br/>
|
|
221
225
|
* none: 不进行响应式布局。<br/>
|
|
222
226
|
* self:根据grid的自身宽度进行响应式布局。<br/>
|
|
223
227
|
* screen:根据屏幕断点进行响应式布局,目前预设了5种响应式尺寸:`xs: 0, sm: 576, md: 768, lg: 992, xl: 1200`。
|
|
224
228
|
*/
|
|
225
|
-
this.thyResponsive = 'none';
|
|
229
|
+
this.thyResponsive = input('none');
|
|
226
230
|
this.hostRenderer = useHostRenderer();
|
|
227
231
|
this.numRegex = /^\d+$/;
|
|
228
232
|
this.gridItemPropValueChange$ = new Subject();
|
|
229
233
|
this.takeUntilDestroyed = takeUntilDestroyed();
|
|
234
|
+
effect(() => {
|
|
235
|
+
this.handleGridItems();
|
|
236
|
+
});
|
|
230
237
|
}
|
|
231
238
|
ngOnInit() {
|
|
232
239
|
this.setGridStyle();
|
|
233
|
-
if (this.thyResponsive !== 'none') {
|
|
240
|
+
if (this.thyResponsive() !== 'none') {
|
|
234
241
|
this.listenResizeEvent();
|
|
235
242
|
}
|
|
236
243
|
}
|
|
237
|
-
ngOnChanges(changes) { }
|
|
238
|
-
ngAfterContentInit() {
|
|
239
|
-
this.handleGridItems();
|
|
240
|
-
this.gridItems.changes.pipe(this.takeUntilDestroyed).subscribe(() => {
|
|
241
|
-
Promise.resolve().then(() => {
|
|
242
|
-
this.handleGridItems();
|
|
243
|
-
});
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
244
|
setGridStyle() {
|
|
247
|
-
this.cols = this.calculateActualValue(this.thyCols || THY_GRID_DEFAULT_COLUMNS, THY_GRID_DEFAULT_COLUMNS);
|
|
248
|
-
|
|
249
|
-
|
|
245
|
+
this.cols = this.calculateActualValue(this.thyCols() || THY_GRID_DEFAULT_COLUMNS, THY_GRID_DEFAULT_COLUMNS);
|
|
246
|
+
const xGap = this.thyXGap();
|
|
247
|
+
const yGap = this.thyYGap();
|
|
248
|
+
const gap = this.thyGap();
|
|
249
|
+
if (!xGap && !yGap) {
|
|
250
|
+
this.xGap = this.calculateActualValue(gap || 0);
|
|
250
251
|
this.yGap = this.xGap;
|
|
251
252
|
}
|
|
252
253
|
else {
|
|
253
|
-
this.xGap = this.calculateActualValue(
|
|
254
|
-
this.yGap = this.calculateActualValue(
|
|
254
|
+
this.xGap = this.calculateActualValue(xGap || gap);
|
|
255
|
+
this.yGap = this.calculateActualValue(yGap || gap);
|
|
255
256
|
}
|
|
256
257
|
this.hostRenderer.setStyle('display', 'grid');
|
|
257
258
|
this.hostRenderer.setStyle('grid-template-columns', `repeat(${this.cols}, minmax(0, 1fr))`);
|
|
258
259
|
this.hostRenderer.setStyle('gap', `${this.yGap}px ${this.xGap}px`);
|
|
259
260
|
}
|
|
260
261
|
listenResizeEvent() {
|
|
261
|
-
if (this.thyResponsive === 'screen') {
|
|
262
|
+
if (this.thyResponsive() === 'screen') {
|
|
262
263
|
this.viewportRuler
|
|
263
264
|
.change(100)
|
|
264
265
|
.pipe(this.takeUntilDestroyed)
|
|
@@ -281,10 +282,10 @@ class ThyGrid {
|
|
|
281
282
|
}
|
|
282
283
|
}
|
|
283
284
|
handleGridItems() {
|
|
284
|
-
this.gridItems.forEach((gridItem) => {
|
|
285
|
-
const rawSpan = getRawSpan(gridItem.thySpan);
|
|
285
|
+
this.gridItems().forEach((gridItem) => {
|
|
286
|
+
const rawSpan = getRawSpan(gridItem.thySpan());
|
|
286
287
|
const span = this.calculateActualValue(rawSpan, THY_GRID_ITEM_DEFAULT_SPAN);
|
|
287
|
-
const offset = this.calculateActualValue(gridItem.thyOffset || 0);
|
|
288
|
+
const offset = this.calculateActualValue(gridItem.thyOffset() || 0);
|
|
288
289
|
gridItem.span = Math.min(span + offset, this.cols);
|
|
289
290
|
gridItem.offset = offset;
|
|
290
291
|
});
|
|
@@ -298,7 +299,7 @@ class ThyGrid {
|
|
|
298
299
|
const responsiveValueMap = this.getResponsiveValueMap(rawValue);
|
|
299
300
|
const breakpointKeys = Object.keys(responsiveValueMap);
|
|
300
301
|
const breakpoint = this.calculateBreakPoint(breakpointKeys);
|
|
301
|
-
if (this.thyResponsive !== 'none' && breakpoint) {
|
|
302
|
+
if (this.thyResponsive() !== 'none' && breakpoint) {
|
|
302
303
|
return responsiveValueMap[breakpoint];
|
|
303
304
|
}
|
|
304
305
|
else if (breakpointKeys.includes('0')) {
|
|
@@ -320,7 +321,7 @@ class ThyGrid {
|
|
|
320
321
|
}, {});
|
|
321
322
|
}
|
|
322
323
|
calculateBreakPoint(breakpointKeys) {
|
|
323
|
-
if (this.thyResponsive === 'screen') {
|
|
324
|
+
if (this.thyResponsive() === 'screen') {
|
|
324
325
|
const width = this.responsiveContainerWidth || this.viewportRuler.getViewportSize().width;
|
|
325
326
|
return breakpointKeys.find((key, index) => {
|
|
326
327
|
return index < breakpointKeys.length - 1
|
|
@@ -349,12 +350,12 @@ class ThyGrid {
|
|
|
349
350
|
});
|
|
350
351
|
}
|
|
351
352
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyGrid, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
352
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
353
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.8", type: ThyGrid, isStandalone: true, selector: "[thyGrid]", inputs: { thyCols: { classPropertyName: "thyCols", publicName: "thyCols", isSignal: true, isRequired: false, transformFunction: null }, thyXGap: { classPropertyName: "thyXGap", publicName: "thyXGap", isSignal: true, isRequired: false, transformFunction: null }, thyYGap: { classPropertyName: "thyYGap", publicName: "thyYGap", isSignal: true, isRequired: false, transformFunction: null }, thyGap: { classPropertyName: "thyGap", publicName: "thyGap", isSignal: true, isRequired: false, transformFunction: null }, thyResponsive: { classPropertyName: "thyResponsive", publicName: "thyResponsive", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "thy-grid" }, providers: [
|
|
353
354
|
{
|
|
354
355
|
provide: THY_GRID_COMPONENT,
|
|
355
356
|
useExisting: ThyGrid
|
|
356
357
|
}
|
|
357
|
-
], queries: [{ propertyName: "gridItems", predicate: ThyGridItem
|
|
358
|
+
], queries: [{ propertyName: "gridItems", predicate: ThyGridItem, isSignal: true }], ngImport: i0 }); }
|
|
358
359
|
}
|
|
359
360
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyGrid, decorators: [{
|
|
360
361
|
type: Directive,
|
|
@@ -370,20 +371,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
370
371
|
class: 'thy-grid'
|
|
371
372
|
}
|
|
372
373
|
}]
|
|
373
|
-
}],
|
|
374
|
-
type: ContentChildren,
|
|
375
|
-
args: [ThyGridItem]
|
|
376
|
-
}], thyCols: [{
|
|
377
|
-
type: Input
|
|
378
|
-
}], thyXGap: [{
|
|
379
|
-
type: Input
|
|
380
|
-
}], thyYGap: [{
|
|
381
|
-
type: Input
|
|
382
|
-
}], thyGap: [{
|
|
383
|
-
type: Input
|
|
384
|
-
}], thyResponsive: [{
|
|
385
|
-
type: Input
|
|
386
|
-
}] } });
|
|
374
|
+
}], ctorParameters: () => [] });
|
|
387
375
|
/**
|
|
388
376
|
* @internal
|
|
389
377
|
*/
|
|
@@ -431,40 +419,61 @@ function getRawSpan(span) {
|
|
|
431
419
|
*/
|
|
432
420
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
433
421
|
class ThyFlex {
|
|
434
|
-
get direction() {
|
|
435
|
-
const direction = this.thyDirection ?? this.thyDirection;
|
|
436
|
-
return direction || 'row';
|
|
437
|
-
}
|
|
438
422
|
constructor() {
|
|
439
423
|
this.hostRenderer = useHostRenderer();
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
424
|
+
/**
|
|
425
|
+
* Flex 方向,为 row 或者 column
|
|
426
|
+
* @default row
|
|
427
|
+
*/
|
|
428
|
+
this.thyDirection = input();
|
|
429
|
+
/**
|
|
430
|
+
* Flex Wrap
|
|
431
|
+
* @default nowrap
|
|
432
|
+
*/
|
|
433
|
+
this.thyWrap = input();
|
|
434
|
+
/**
|
|
435
|
+
* Justify Content
|
|
436
|
+
*/
|
|
437
|
+
this.thyJustifyContent = input();
|
|
438
|
+
/**
|
|
439
|
+
* Align Items
|
|
440
|
+
*/
|
|
441
|
+
this.thyAlignItems = input();
|
|
442
|
+
/**
|
|
443
|
+
* Flex Item 之间的间隙 Gap
|
|
444
|
+
* @default 0
|
|
445
|
+
*/
|
|
446
|
+
this.thyGap = input();
|
|
447
|
+
this.direction = computed(() => {
|
|
448
|
+
return this.thyDirection() || 'row';
|
|
449
|
+
});
|
|
450
|
+
effect(() => {
|
|
446
451
|
this.updateClasses();
|
|
447
|
-
}
|
|
452
|
+
});
|
|
448
453
|
}
|
|
449
454
|
updateClasses() {
|
|
450
455
|
const classes = [];
|
|
451
|
-
|
|
452
|
-
|
|
456
|
+
const justifyContent = this.thyJustifyContent();
|
|
457
|
+
if (!isUndefinedOrNull(justifyContent)) {
|
|
458
|
+
classes.push(`justify-content-${normalizeStartEnd(justifyContent)}`);
|
|
453
459
|
}
|
|
454
|
-
|
|
455
|
-
|
|
460
|
+
const alignItems = this.thyAlignItems();
|
|
461
|
+
if (!isUndefinedOrNull(alignItems)) {
|
|
462
|
+
classes.push(`align-items-${normalizeStartEnd(alignItems)}`);
|
|
456
463
|
}
|
|
457
|
-
|
|
458
|
-
|
|
464
|
+
const wrap = this.thyWrap();
|
|
465
|
+
if (!isUndefinedOrNull(wrap)) {
|
|
466
|
+
classes.push(`flex-${wrap}`);
|
|
459
467
|
}
|
|
460
|
-
|
|
461
|
-
|
|
468
|
+
const direction = this.direction();
|
|
469
|
+
if (!isUndefinedOrNull(direction)) {
|
|
470
|
+
classes.push(`flex-${direction}`);
|
|
462
471
|
}
|
|
463
472
|
this.hostRenderer.updateClass(classes);
|
|
464
|
-
this.hostRenderer.setStyle('gap', `${this.thyGap ?? '0'}px`);
|
|
473
|
+
this.hostRenderer.setStyle('gap', `${this.thyGap() ?? '0'}px`);
|
|
465
474
|
}
|
|
466
475
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyFlex, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
467
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
476
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: ThyFlex, isStandalone: true, selector: "[thyFlex]", inputs: { thyDirection: { classPropertyName: "thyDirection", publicName: "thyDirection", isSignal: true, isRequired: false, transformFunction: null }, thyWrap: { classPropertyName: "thyWrap", publicName: "thyWrap", isSignal: true, isRequired: false, transformFunction: null }, thyJustifyContent: { classPropertyName: "thyJustifyContent", publicName: "thyJustifyContent", isSignal: true, isRequired: false, transformFunction: null }, thyAlignItems: { classPropertyName: "thyAlignItems", publicName: "thyAlignItems", isSignal: true, isRequired: false, transformFunction: null }, thyGap: { classPropertyName: "thyGap", publicName: "thyGap", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "thy-flex d-flex" }, ngImport: i0 }); }
|
|
468
477
|
}
|
|
469
478
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyFlex, decorators: [{
|
|
470
479
|
type: Directive,
|
|
@@ -474,17 +483,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
474
483
|
class: 'thy-flex d-flex'
|
|
475
484
|
}
|
|
476
485
|
}]
|
|
477
|
-
}], ctorParameters: () => []
|
|
478
|
-
type: Input
|
|
479
|
-
}], thyWrap: [{
|
|
480
|
-
type: Input
|
|
481
|
-
}], thyJustifyContent: [{
|
|
482
|
-
type: Input
|
|
483
|
-
}], thyAlignItems: [{
|
|
484
|
-
type: Input
|
|
485
|
-
}], thyGap: [{
|
|
486
|
-
type: Input
|
|
487
|
-
}] } });
|
|
486
|
+
}], ctorParameters: () => [] });
|
|
488
487
|
/**
|
|
489
488
|
* @internal
|
|
490
489
|
*/
|
|
@@ -516,40 +515,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
516
515
|
class ThyFlexItem {
|
|
517
516
|
constructor() {
|
|
518
517
|
this.hostRenderer = useHostRenderer();
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
518
|
+
/**
|
|
519
|
+
* Flex Item 属性,表示 grow 、shrink 、basis
|
|
520
|
+
*/
|
|
521
|
+
this.thyFlexItem = input();
|
|
522
|
+
/**
|
|
523
|
+
* Flew Grow,设置或检索弹性盒子的扩展比率,设置 1 为填充剩余区域
|
|
524
|
+
*/
|
|
525
|
+
this.thyGrow = input();
|
|
526
|
+
/**
|
|
527
|
+
* Flex Shrink,设置或检索弹性盒收缩比例
|
|
528
|
+
* @default 1
|
|
529
|
+
*/
|
|
530
|
+
this.thyShrink = input();
|
|
531
|
+
/**
|
|
532
|
+
* Flex Basis,设置或检索弹性盒伸缩基准值
|
|
533
|
+
* @default 1
|
|
534
|
+
*/
|
|
535
|
+
this.thyBasis = input();
|
|
536
|
+
effect(() => {
|
|
525
537
|
this.updateClasses();
|
|
526
|
-
}
|
|
538
|
+
});
|
|
527
539
|
}
|
|
528
540
|
updateClasses() {
|
|
541
|
+
const flexItem = this.thyFlexItem();
|
|
529
542
|
const classes = [];
|
|
530
543
|
this.hostRenderer.setStyle('flex', '');
|
|
531
544
|
this.hostRenderer.setStyle('basis', '');
|
|
532
|
-
if (
|
|
533
|
-
if (
|
|
534
|
-
classes.push(`flex-${
|
|
545
|
+
if (flexItem) {
|
|
546
|
+
if (flexItem === 'fill') {
|
|
547
|
+
classes.push(`flex-${flexItem}`);
|
|
535
548
|
}
|
|
536
549
|
else {
|
|
537
|
-
this.hostRenderer.setStyle('flex',
|
|
550
|
+
this.hostRenderer.setStyle('flex', flexItem);
|
|
538
551
|
}
|
|
539
552
|
}
|
|
540
|
-
|
|
541
|
-
|
|
553
|
+
const grow = this.thyGrow();
|
|
554
|
+
if (!isUndefinedOrNull(grow)) {
|
|
555
|
+
classes.push(`flex-grow-${grow}`);
|
|
542
556
|
}
|
|
543
|
-
|
|
544
|
-
|
|
557
|
+
const shrink = this.thyShrink();
|
|
558
|
+
if (!isUndefinedOrNull(shrink)) {
|
|
559
|
+
classes.push(`flex-shrink-${shrink}`);
|
|
545
560
|
}
|
|
546
|
-
|
|
547
|
-
|
|
561
|
+
const basis = this.thyBasis();
|
|
562
|
+
if (!isUndefinedOrNull(basis)) {
|
|
563
|
+
this.hostRenderer.setStyle('flex-basis', basis);
|
|
548
564
|
}
|
|
549
565
|
this.hostRenderer.updateClass(classes);
|
|
550
566
|
}
|
|
551
567
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyFlexItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
552
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
568
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: ThyFlexItem, isStandalone: true, selector: "[thyFlexItem]", inputs: { thyFlexItem: { classPropertyName: "thyFlexItem", publicName: "thyFlexItem", isSignal: true, isRequired: false, transformFunction: null }, thyGrow: { classPropertyName: "thyGrow", publicName: "thyGrow", isSignal: true, isRequired: false, transformFunction: null }, thyShrink: { classPropertyName: "thyShrink", publicName: "thyShrink", isSignal: true, isRequired: false, transformFunction: null }, thyBasis: { classPropertyName: "thyBasis", publicName: "thyBasis", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "thy-flex-item" }, ngImport: i0 }); }
|
|
553
569
|
}
|
|
554
570
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyFlexItem, decorators: [{
|
|
555
571
|
type: Directive,
|
|
@@ -559,15 +575,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
559
575
|
class: 'thy-flex-item'
|
|
560
576
|
}
|
|
561
577
|
}]
|
|
562
|
-
}], ctorParameters: () => []
|
|
563
|
-
type: Input
|
|
564
|
-
}], thyGrow: [{
|
|
565
|
-
type: Input
|
|
566
|
-
}], thyShrink: [{
|
|
567
|
-
type: Input
|
|
568
|
-
}], thyBasis: [{
|
|
569
|
-
type: Input
|
|
570
|
-
}] } });
|
|
578
|
+
}], ctorParameters: () => [] });
|
|
571
579
|
/**
|
|
572
580
|
* @internal
|
|
573
581
|
*/
|