@ship-ui/core 0.13.18 → 0.13.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ship-ui-core.mjs +31 -3
- package/fesm2022/ship-ui-core.mjs.map +1 -1
- package/index.d.ts +4 -1
- package/package.json +1 -1
- package/styles/components/ship-menu.component.scss +1 -0
- package/styles/components/ship-popover.component.scss +1 -0
- package/styles/components/ship-select.component.scss +12 -0
|
@@ -3015,6 +3015,9 @@ class ShipSelectComponent {
|
|
|
3015
3015
|
this.value = input();
|
|
3016
3016
|
this.label = input();
|
|
3017
3017
|
this.asFreeText = input(false);
|
|
3018
|
+
this.optionTitle = input(null);
|
|
3019
|
+
this.freeTextTitle = input(null);
|
|
3020
|
+
this.freeTextPlaceholder = input('Type to create a new option');
|
|
3018
3021
|
this.validateFreeText = input();
|
|
3019
3022
|
this.placeholder = input();
|
|
3020
3023
|
this.readonly = model(false);
|
|
@@ -3188,7 +3191,7 @@ class ShipSelectComponent {
|
|
|
3188
3191
|
e.preventDefault();
|
|
3189
3192
|
this.close();
|
|
3190
3193
|
}
|
|
3191
|
-
if (e.key === 'Enter'
|
|
3194
|
+
if (e.key === 'Enter') {
|
|
3192
3195
|
e.preventDefault();
|
|
3193
3196
|
this.toggleOptionByIndex(this.focusedOptionIndex());
|
|
3194
3197
|
}
|
|
@@ -3572,7 +3575,7 @@ class ShipSelectComponent {
|
|
|
3572
3575
|
}
|
|
3573
3576
|
}
|
|
3574
3577
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ShipSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3575
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: ShipSelectComponent, isStandalone: true, selector: "sh-select", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, asFreeText: { classPropertyName: "asFreeText", publicName: "asFreeText", isSignal: true, isRequired: false, transformFunction: null }, validateFreeText: { classPropertyName: "validateFreeText", publicName: "validateFreeText", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, lazySearch: { classPropertyName: "lazySearch", publicName: "lazySearch", isSignal: true, isRequired: false, transformFunction: null }, inlineSearch: { classPropertyName: "inlineSearch", publicName: "inlineSearch", isSignal: true, isRequired: false, transformFunction: null }, asText: { classPropertyName: "asText", publicName: "asText", isSignal: true, isRequired: false, transformFunction: null }, isClearable: { classPropertyName: "isClearable", publicName: "isClearable", isSignal: true, isRequired: false, transformFunction: null }, selectMultiple: { classPropertyName: "selectMultiple", publicName: "selectMultiple", isSignal: true, isRequired: false, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null }, selectedOptionTemplate: { classPropertyName: "selectedOptionTemplate", publicName: "selectedOptionTemplate", isSignal: true, isRequired: false, transformFunction: null }, placeholderTemplate: { classPropertyName: "placeholderTemplate", publicName: "placeholderTemplate", isSignal: true, isRequired: false, transformFunction: null }, freeTextOptionTemplate: { classPropertyName: "freeTextOptionTemplate", publicName: "freeTextOptionTemplate", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, selectedOptions: { classPropertyName: "selectedOptions", publicName: "selectedOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { readonly: "readonlyChange", disabled: "disabledChange", isOpen: "isOpenChange", isLoading: "isLoadingChange", options: "optionsChange", selectedOptions: "selectedOptionsChange", cleared: "cleared", onAddNewFreeTextOption: "onAddNewFreeTextOption" }, host: { properties: { "class.multiple": "selectMultiple()" } }, queries: [{ propertyName: "inlineTemplate", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "optionsWrapRef", first: true, predicate: ["optionsWrap"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
3578
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: ShipSelectComponent, isStandalone: true, selector: "sh-select", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, asFreeText: { classPropertyName: "asFreeText", publicName: "asFreeText", isSignal: true, isRequired: false, transformFunction: null }, optionTitle: { classPropertyName: "optionTitle", publicName: "optionTitle", isSignal: true, isRequired: false, transformFunction: null }, freeTextTitle: { classPropertyName: "freeTextTitle", publicName: "freeTextTitle", isSignal: true, isRequired: false, transformFunction: null }, freeTextPlaceholder: { classPropertyName: "freeTextPlaceholder", publicName: "freeTextPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, validateFreeText: { classPropertyName: "validateFreeText", publicName: "validateFreeText", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, lazySearch: { classPropertyName: "lazySearch", publicName: "lazySearch", isSignal: true, isRequired: false, transformFunction: null }, inlineSearch: { classPropertyName: "inlineSearch", publicName: "inlineSearch", isSignal: true, isRequired: false, transformFunction: null }, asText: { classPropertyName: "asText", publicName: "asText", isSignal: true, isRequired: false, transformFunction: null }, isClearable: { classPropertyName: "isClearable", publicName: "isClearable", isSignal: true, isRequired: false, transformFunction: null }, selectMultiple: { classPropertyName: "selectMultiple", publicName: "selectMultiple", isSignal: true, isRequired: false, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null }, selectedOptionTemplate: { classPropertyName: "selectedOptionTemplate", publicName: "selectedOptionTemplate", isSignal: true, isRequired: false, transformFunction: null }, placeholderTemplate: { classPropertyName: "placeholderTemplate", publicName: "placeholderTemplate", isSignal: true, isRequired: false, transformFunction: null }, freeTextOptionTemplate: { classPropertyName: "freeTextOptionTemplate", publicName: "freeTextOptionTemplate", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, selectedOptions: { classPropertyName: "selectedOptions", publicName: "selectedOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { readonly: "readonlyChange", disabled: "disabledChange", isOpen: "isOpenChange", isLoading: "isLoadingChange", options: "optionsChange", selectedOptions: "selectedOptionsChange", cleared: "cleared", onAddNewFreeTextOption: "onAddNewFreeTextOption" }, host: { properties: { "class.multiple": "selectMultiple()" } }, queries: [{ propertyName: "inlineTemplate", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "optionsWrapRef", first: true, predicate: ["optionsWrap"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
3576
3579
|
@let _placeholderTemplate = placeholderTemplate();
|
|
3577
3580
|
@let _optionTemplate = optionTemplate();
|
|
3578
3581
|
@let _freeTextOptionTemplate = freeTextOptionTemplate();
|
|
@@ -3672,6 +3675,10 @@ class ShipSelectComponent {
|
|
|
3672
3675
|
@let freeTextOptionValue = getValue(freeTextOption);
|
|
3673
3676
|
|
|
3674
3677
|
@if ($any(freeTextOptionValue).length > 0) {
|
|
3678
|
+
@if (freeTextTitle()) {
|
|
3679
|
+
<p title>{{ freeTextTitle() }}</p>
|
|
3680
|
+
}
|
|
3681
|
+
|
|
3675
3682
|
<li
|
|
3676
3683
|
(click)="toggleOptionByIndex(-1)"
|
|
3677
3684
|
class="option"
|
|
@@ -3689,9 +3696,17 @@ class ShipSelectComponent {
|
|
|
3689
3696
|
{{ freeTextOptionValue }}
|
|
3690
3697
|
}
|
|
3691
3698
|
</li>
|
|
3699
|
+
|
|
3700
|
+
@if (freeTextTitle() && filteredOptions().length > 0) {
|
|
3701
|
+
<sh-divider />
|
|
3702
|
+
}
|
|
3692
3703
|
}
|
|
3693
3704
|
}
|
|
3694
3705
|
|
|
3706
|
+
@if (optionTitle() && filteredOptions().length > 0) {
|
|
3707
|
+
<p title>{{ optionTitle() }}</p>
|
|
3708
|
+
}
|
|
3709
|
+
|
|
3695
3710
|
@for (option of filteredOptions(); track $index) {
|
|
3696
3711
|
<li
|
|
3697
3712
|
(click)="toggleOptionByIndex($index)"
|
|
@@ -3713,7 +3728,7 @@ class ShipSelectComponent {
|
|
|
3713
3728
|
}
|
|
3714
3729
|
</div>
|
|
3715
3730
|
</sh-popover>
|
|
3716
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ShipPopoverComponent, selector: "sh-popover", inputs: ["asMultiLayer", "disableOpenByClick", "isOpen", "options"], outputs: ["isOpenChange", "closed"] }, { kind: "component", type: ShipFormFieldComponent, selector: "sh-form-field" }, { kind: "component", type: ShipIconComponent, selector: "sh-icon" }, { kind: "component", type: ShipCheckboxComponent, selector: "sh-checkbox" }, { kind: "component", type: ShipSpinnerComponent, selector: "sh-spinner" }, { kind: "component", type: ShipChipComponent, selector: "sh-chip" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3731
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ShipPopoverComponent, selector: "sh-popover", inputs: ["asMultiLayer", "disableOpenByClick", "isOpen", "options"], outputs: ["isOpenChange", "closed"] }, { kind: "component", type: ShipFormFieldComponent, selector: "sh-form-field" }, { kind: "component", type: ShipIconComponent, selector: "sh-icon" }, { kind: "component", type: ShipCheckboxComponent, selector: "sh-checkbox" }, { kind: "component", type: ShipSpinnerComponent, selector: "sh-spinner" }, { kind: "component", type: ShipChipComponent, selector: "sh-chip" }, { kind: "component", type: ShipDividerComponent, selector: "sh-divider" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3717
3732
|
}
|
|
3718
3733
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ShipSelectComponent, decorators: [{
|
|
3719
3734
|
type: Component,
|
|
@@ -3727,6 +3742,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
3727
3742
|
ShipCheckboxComponent,
|
|
3728
3743
|
ShipSpinnerComponent,
|
|
3729
3744
|
ShipChipComponent,
|
|
3745
|
+
ShipDividerComponent,
|
|
3730
3746
|
],
|
|
3731
3747
|
template: `
|
|
3732
3748
|
@let _placeholderTemplate = placeholderTemplate();
|
|
@@ -3828,6 +3844,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
3828
3844
|
@let freeTextOptionValue = getValue(freeTextOption);
|
|
3829
3845
|
|
|
3830
3846
|
@if ($any(freeTextOptionValue).length > 0) {
|
|
3847
|
+
@if (freeTextTitle()) {
|
|
3848
|
+
<p title>{{ freeTextTitle() }}</p>
|
|
3849
|
+
}
|
|
3850
|
+
|
|
3831
3851
|
<li
|
|
3832
3852
|
(click)="toggleOptionByIndex(-1)"
|
|
3833
3853
|
class="option"
|
|
@@ -3845,9 +3865,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
3845
3865
|
{{ freeTextOptionValue }}
|
|
3846
3866
|
}
|
|
3847
3867
|
</li>
|
|
3868
|
+
|
|
3869
|
+
@if (freeTextTitle() && filteredOptions().length > 0) {
|
|
3870
|
+
<sh-divider />
|
|
3871
|
+
}
|
|
3848
3872
|
}
|
|
3849
3873
|
}
|
|
3850
3874
|
|
|
3875
|
+
@if (optionTitle() && filteredOptions().length > 0) {
|
|
3876
|
+
<p title>{{ optionTitle() }}</p>
|
|
3877
|
+
}
|
|
3878
|
+
|
|
3851
3879
|
@for (option of filteredOptions(); track $index) {
|
|
3852
3880
|
<li
|
|
3853
3881
|
(click)="toggleOptionByIndex($index)"
|