ng-tailwind 2.25.347 → 2.26.347
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/bundles/ng-tailwind.umd.js +7 -7
- package/bundles/ng-tailwind.umd.js.map +1 -1
- package/components/ngt-select/ngt-select.component.d.ts +3 -2
- package/esm2015/components/ngt-input/ngt-input.component.js +1 -1
- package/esm2015/components/ngt-select/ngt-select.component.js +8 -8
- package/fesm2015/ng-tailwind.js +7 -7
- package/fesm2015/ng-tailwind.js.map +1 -1
- package/ng-tailwind.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -3143,8 +3143,8 @@
|
|
|
3143
3143
|
};
|
|
3144
3144
|
NgtSelectComponent.prototype.ngDoCheck = function () {
|
|
3145
3145
|
var _this = this;
|
|
3146
|
-
if (!this.
|
|
3147
|
-
this.
|
|
3146
|
+
if (!this.hadFirstItemsLoad && this.canLoadItems()) {
|
|
3147
|
+
this.hadFirstItemsLoad = true;
|
|
3148
3148
|
this.initNgSelectItems();
|
|
3149
3149
|
setTimeout(function () {
|
|
3150
3150
|
var _a;
|
|
@@ -3179,7 +3179,7 @@
|
|
|
3179
3179
|
if (changes.isRequired) {
|
|
3180
3180
|
this.updateValidations();
|
|
3181
3181
|
}
|
|
3182
|
-
if (
|
|
3182
|
+
if (changes.remoteResource || changes.items) {
|
|
3183
3183
|
this.initNgSelectItems();
|
|
3184
3184
|
}
|
|
3185
3185
|
if (changes.dropdownPanelMinHeight) {
|
|
@@ -3292,7 +3292,7 @@
|
|
|
3292
3292
|
};
|
|
3293
3293
|
NgtSelectComponent.prototype.initNgSelectItems = function () {
|
|
3294
3294
|
var _this = this;
|
|
3295
|
-
if (this.remoteResource && this.
|
|
3295
|
+
if (this.remoteResource && this.canLoadItems()) {
|
|
3296
3296
|
this.ngSelectItems = new rxjs.Observable(function (observer) {
|
|
3297
3297
|
_this.ngSearchObserver = observer;
|
|
3298
3298
|
_this.search({});
|
|
@@ -3425,8 +3425,8 @@
|
|
|
3425
3425
|
var items = this.ngSelectComponent.itemsList.items;
|
|
3426
3426
|
return (items === null || items === void 0 ? void 0 : items.length) && typeof items[0].value['getAttribute'] === 'function';
|
|
3427
3427
|
};
|
|
3428
|
-
NgtSelectComponent.prototype.
|
|
3429
|
-
return this.
|
|
3428
|
+
NgtSelectComponent.prototype.canLoadItems = function () {
|
|
3429
|
+
return !this.isDisabled && this.wasClicked;
|
|
3430
3430
|
};
|
|
3431
3431
|
NgtSelectComponent.prototype.destroySubscriptions = function () {
|
|
3432
3432
|
this.subscriptions.forEach(function (subscription) { return subscription.unsubscribe(); });
|
|
@@ -3437,7 +3437,7 @@
|
|
|
3437
3437
|
NgtSelectComponent.decorators = [
|
|
3438
3438
|
{ type: core.Component, args: [{
|
|
3439
3439
|
selector: 'ngt-select',
|
|
3440
|
-
template: "<label *ngIf=\"label\" [hidden]='shining'\n
|
|
3440
|
+
template: "<label *ngIf=\"label\" [hidden]='shining'\n class=\"{{ shining ? '' : 'block' }} {{ ngtStyle.compile(['color.text', 'text', 'font', 'fontCase']) }} mb-2 flex\">\n <ngt-svg *ngIf=\"labelIcon\" class=\"mr-1 {{labelIconColor}}\" src=\"{{labelIcon}}\"></ngt-svg>\n {{ label }}:\n\n <span class=\"text-red-500 font-bold text-md ml-1\" *ngIf=\"isRequired\">*</span>\n\n <ngt-helper *ngIf=\"helpText\" [helpTitle]=\"helpTitle\" [iconColor]=\"helpTextColor\" class=\"ml-1\">\n {{ helpText }}\n </ngt-helper>\n</label>\n\n<div [hidden]='shining' class=\"{{ getSelectClass() }} normal-case\" style=\"min-height: 3rem;\">\n <ng-select class=\"custom\" [(ngModel)]='nativeValue' [name]='nativeName' [addTag]='allowCreate'\n [addTagText]=\"createText || ngtTranslateService.ngtSelectCreateText\" [bindLabel]=\"bindLabel\"\n [multiple]=\"multiple\" [hideSelected]=\"hideSelected\" [typeahead]=\"typeahead\"\n [notFoundText]=\"notFoundText || ngtTranslateService.ngtSelectNotFoundText\" [searchable]=\"searchable\"\n [disabled]='isDisabled || isReadonly' [clearable]=\"clearable && hasSelectedValue()\"\n [closeOnSelect]=\"closeOnSelect\" [trackByFn]=\"trackBy\" [labelForId]=\"labelForId\"\n [typeToSearchText]=\"typeToSearchText || ngtTranslateService.ngtSelectTypeToSearchText\"\n [placeholder]=\"placeholder || ngtTranslateService.ngtSelectPlaceholder\" [dropdownPosition]=\"dropdownPosition\"\n [groupBy]=\"groupBy\" [clearAllText]=\"clearAllTooltip || ngtTranslateService.ngtSelectClearAllTooltip\"\n [clearSearchOnAdd]=\"clearSearchOnAdd\" [bindValue]=\"bindValue\" [virtualScroll]=\"virtualScroll\"\n [loadingText]=\"loadingText || ngtTranslateService.ngtSelectLoadingText\" [maxSelectedItems]=\"maxSelectedItems\"\n [tabIndex]=\"tabIndex\" [items]=\"ngSelectItems | async\" [groupValue]=\"groupValue\" [loading]=\"loading\"\n [compareWith]='compareWith' (scroll)=\"onScroll($event)\" (change)=\"onNativeChange($event)\"\n (clear)='onClearSelect()' (remove)='onRemoveSelectedItem($event)' (click)=\"wasClicked = true\">\n\n <ng-template *ngIf='ngtSelectHeaderTemplate' ng-header-tmp>\n <ng-template [ngTemplateOutlet]=\"ngtSelectHeaderTemplate\">\n </ng-template>\n </ng-template>\n\n <ng-template ng-label-tmp let-item=\"item\">\n <div class=\"flex w-full items-center pr-1\">\n <ng-container *ngIf=\"multiple\">\n <div class=\"ng-value-icon px-1 h-full border-r mr-2 {{ ngtStyle.compile(['color.text', 'text']) }} cursor-pointer\"\n (click)='removeItem($event, item)'>\n <svg class=\"ng-value-icon fill-current self-center\" xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\">\n <path\n d=\"M19.1 17.2l-5.3-5.3 5.3-5.3-1.8-1.8-5.3 5.4-5.3-5.3-1.8 1.7 5.3 5.3-5.3 5.3L6.7 19l5.3-5.3 5.3 5.3 1.8-1.8z\" />\n </svg>\n </div>\n </ng-container>\n\n <ng-template *ngIf='ngtOptionSelectedTemplate' [ngTemplateOutlet]=\"ngtOptionSelectedTemplate\"\n [ngTemplateOutletContext]=\"{ item: item }\">\n </ng-template>\n\n <ng-template *ngIf='!ngtOptionSelectedTemplate' [ngTemplateOutlet]=\"ngtOptionTemplate\"\n [ngTemplateOutletContext]=\"{ item: item }\">\n </ng-template>\n </div>\n </ng-template>\n\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n <ng-template [ngTemplateOutlet]=\"ngtOptionTemplate\"\n [ngTemplateOutletContext]=\"{ item: item, index: index, searchTerm: search }\">\n </ng-template>\n </ng-template>\n </ng-select>\n</div>\n\n<ng-container *ngIf='shining'>\n <div class=\"flex\">\n <ngt-shining class=\"{{ ngtStyle.compile(['h']) }} w-full\"></ngt-shining>\n </div>\n</ng-container>\n\n<ngt-validation [control]=\"formControl\" [container]=\"formContainer\"></ngt-validation>\n\n<input *ngIf='componentReady' type='hidden' [ngModel]=\"value\" [name]=\"name\" [value]=\"value\">",
|
|
3441
3441
|
providers: [
|
|
3442
3442
|
NgtMakeProvider(NgtSelectComponent)
|
|
3443
3443
|
],
|