@stemy/ngx-utils 13.6.6 → 13.6.8
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/esm2020/ngx-utils/common-types.mjs +2 -5
- package/esm2020/ngx-utils/components/dynamic-table/dynamic-table.component.mjs +5 -5
- package/esm2020/ngx-utils/components/unordered-list/unordered-list.component.mjs +1 -1
- package/esm2020/ngx-utils/directives/pagination.directive.mjs +4 -3
- package/esm2020/ngx-utils/directives/unordered-list-item.directive.mjs +4 -2
- package/esm2020/ngx-utils/directives/unordered-list-template.directive.mjs +7 -13
- package/esm2020/public_api.mjs +2 -2
- package/fesm2015/stemy-ngx-utils.mjs +18 -22
- package/fesm2015/stemy-ngx-utils.mjs.map +1 -1
- package/fesm2020/stemy-ngx-utils.mjs +17 -22
- package/fesm2020/stemy-ngx-utils.mjs.map +1 -1
- package/ngx-utils/common-types.d.ts +4 -3
- package/ngx-utils/components/dynamic-table/dynamic-table.component.d.ts +1 -1
- package/ngx-utils/components/unordered-list/unordered-list.component.d.ts +2 -2
- package/ngx-utils/directives/pagination.directive.d.ts +1 -1
- package/ngx-utils/directives/unordered-list-item.directive.d.ts +2 -2
- package/ngx-utils/directives/unordered-list-template.directive.d.ts +5 -7
- package/package.json +1 -1
- package/public_api.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken,
|
|
2
|
+
import { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, Injector, EventEmitter, isDevMode, ErrorHandler, NgZone, Pipe, Directive, Input, Output, HostBinding, HostListener, Component, ContentChildren, ViewChild, ContentChild, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
3
3
|
import 'reflect-metadata';
|
|
4
4
|
import moment from 'moment';
|
|
5
5
|
import { first, skipWhile, mergeMap, timeout, map } from 'rxjs/operators';
|
|
@@ -391,9 +391,6 @@ var StorageMode;
|
|
|
391
391
|
const TOASTER_SERVICE = new InjectionToken("toaster-service");
|
|
392
392
|
const PROMISE_SERVICE = new InjectionToken("promise-service");
|
|
393
393
|
const WASI_IMPLEMENTATION = new InjectionToken("wasi-implementation");
|
|
394
|
-
// --- Unordered list ---
|
|
395
|
-
class UnorederedListTemplate extends TemplateRef {
|
|
396
|
-
}
|
|
397
394
|
// --- Reflect utils ---
|
|
398
395
|
function FactoryDependencies(...dependencies) {
|
|
399
396
|
return function (target, method) {
|
|
@@ -4706,11 +4703,12 @@ class PaginationDirective {
|
|
|
4706
4703
|
return;
|
|
4707
4704
|
this.page = isNaN(this.page) || this.page < 1 ? 1 : this.page;
|
|
4708
4705
|
this.itemsPerPage = isNaN(this.itemsPerPage) || this.itemsPerPage < 1 ? 20 : this.itemsPerPage;
|
|
4709
|
-
this.updateTimer.time = isNaN(this.updateTime) || this.updateTime < 0 ? 100 : this.updateTime;
|
|
4710
4706
|
this.waitFor = this.waitFor || Promise.resolve(true);
|
|
4711
4707
|
this.refresh();
|
|
4712
4708
|
}
|
|
4713
|
-
refresh() {
|
|
4709
|
+
refresh(time) {
|
|
4710
|
+
time = isNaN(time) || time < 0 ? this.updateTime : time;
|
|
4711
|
+
this.updateTimer.time = isNaN(time) || time < 0 ? 100 : this.updateTime;
|
|
4714
4712
|
this.waitFor.then(() => {
|
|
4715
4713
|
this.updateTimer.run();
|
|
4716
4714
|
});
|
|
@@ -4941,7 +4939,9 @@ class UnorderedListItemDirective {
|
|
|
4941
4939
|
this.valueIsObject = ObjectUtils.isObject(this.item.value);
|
|
4942
4940
|
this.valueType = ObjectUtils.getType(this.item.value);
|
|
4943
4941
|
const context = this;
|
|
4944
|
-
const template = this
|
|
4942
|
+
const template = this
|
|
4943
|
+
.templates
|
|
4944
|
+
.find(t => t.type == this.type && ObjectUtils.evaluate(t.selector, context))?.templateRef || this.defaultTemplates[this.type];
|
|
4945
4945
|
// Set view
|
|
4946
4946
|
this.viewContainer.clear();
|
|
4947
4947
|
this.viewContainer.createEmbeddedView(template, context);
|
|
@@ -4993,24 +4993,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
4993
4993
|
type: Input
|
|
4994
4994
|
}] } });
|
|
4995
4995
|
|
|
4996
|
-
class UnorderedListTemplateDirective
|
|
4997
|
-
constructor(
|
|
4998
|
-
super();
|
|
4999
|
-
this.elementRef = elementRef;
|
|
4996
|
+
class UnorderedListTemplateDirective {
|
|
4997
|
+
constructor(templateRef) {
|
|
5000
4998
|
this.templateRef = templateRef;
|
|
5001
4999
|
}
|
|
5002
|
-
createEmbeddedView(context) {
|
|
5003
|
-
return this.templateRef.createEmbeddedView(context);
|
|
5004
|
-
}
|
|
5005
5000
|
}
|
|
5006
|
-
UnorderedListTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: UnorderedListTemplateDirective, deps: [{ token: i0.
|
|
5007
|
-
UnorderedListTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: UnorderedListTemplateDirective, selector: "ng-template[type][selector]", inputs: { type: "type", selector: "selector" },
|
|
5001
|
+
UnorderedListTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: UnorderedListTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5002
|
+
UnorderedListTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: UnorderedListTemplateDirective, selector: "ng-template[type][selector]", inputs: { type: "type", selector: "selector" }, ngImport: i0 });
|
|
5008
5003
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: UnorderedListTemplateDirective, decorators: [{
|
|
5009
5004
|
type: Directive,
|
|
5010
5005
|
args: [{
|
|
5011
5006
|
selector: "ng-template[type][selector]"
|
|
5012
5007
|
}]
|
|
5013
|
-
}], ctorParameters: function () { return [{ type: i0.
|
|
5008
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { type: [{
|
|
5014
5009
|
type: Input
|
|
5015
5010
|
}], selector: [{
|
|
5016
5011
|
type: Input
|
|
@@ -5232,14 +5227,14 @@ class DynamicTableComponent {
|
|
|
5232
5227
|
return;
|
|
5233
5228
|
this.refresh();
|
|
5234
5229
|
}
|
|
5235
|
-
refresh() {
|
|
5230
|
+
refresh(time) {
|
|
5236
5231
|
if (!this.pagination)
|
|
5237
5232
|
return;
|
|
5238
|
-
this.pagination.refresh();
|
|
5233
|
+
this.pagination.refresh(time);
|
|
5239
5234
|
}
|
|
5240
5235
|
setFilter(filter) {
|
|
5241
5236
|
this.filter = filter;
|
|
5242
|
-
this.refresh();
|
|
5237
|
+
this.refresh(450);
|
|
5243
5238
|
}
|
|
5244
5239
|
setOrder(column) {
|
|
5245
5240
|
this.orderDescending = column == this.orderBy && !this.orderDescending;
|
|
@@ -5253,7 +5248,7 @@ class DynamicTableComponent {
|
|
|
5253
5248
|
else {
|
|
5254
5249
|
this.query[col] = value;
|
|
5255
5250
|
}
|
|
5256
|
-
this.refresh();
|
|
5251
|
+
this.refresh(450);
|
|
5257
5252
|
}
|
|
5258
5253
|
loadLocalData(page, rowsPerPage, orderBy, orderDescending, filter) {
|
|
5259
5254
|
if (!this.data) {
|
|
@@ -5756,5 +5751,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
5756
5751
|
* Generated bundle index. Do not edit.
|
|
5757
5752
|
*/
|
|
5758
5753
|
|
|
5759
|
-
export { API_SERVICE, APP_BASE_URL, AUTH_SERVICE, AclService, AjaxRequestHandler, ApiService, ArrayUtils, AsyncMethodBase, AsyncMethodDirective, AuthGuard, BASE_CONFIG, BackgroundDirective, BaseHttpClient, BaseHttpService, CONFIG_SERVICE, CanvasColor, CanvasUtils, ChunkPipe, Circle, ConfigService, ConsoleToasterService, DateUtils, DynamicTableComponent, DynamicTableTemplateDirective, ERROR_HANDLER, EXPRESS_REQUEST, EntriesPipe, ErrorHandlerService, EventsService, ExtraItemPropertiesPipe, FactoryDependencies, FileSystemEntry, FileUtils, FilterPipe, FindPipe, FormatNumberPipe, FormatterService, GLOBAL_TEMPLATES, GenericValue, GetOffsetPipe, GetTypePipe, GlobalTemplateDirective, GlobalTemplatePipe, GlobalTemplateService, GroupByPipe, HttpPromise, ICON_SERVICE, IConfiguration, IconDirective, IconService, Initializer, IsTypePipe, JSONfn, JoinPipe, KeysPipe, LANGUAGE_SERVICE, LanguageService, LoaderUtils, LocalHttpService, MapPipe, MathUtils, MaxPipe, MinPipe, NgxTemplateOutletDirective, NgxUtilsModule, ObjectType, ObjectUtils, ObservableUtils, OpenApiService, PROMISE_SERVICE, PaginationDirective, PaginationItemContext, PaginationItemDirective, PaginationMenuComponent, Point, PopPipe, PromiseService, RESIZE_DELAY, RESIZE_STRATEGY, ROOT_ELEMENT, Rect, ReducePipe, ReflectUtils, RemapPipe, ReplacePipe, ResizeEventPlugin, ResourceIfContext, ResourceIfDirective, ReversePipe, RoundPipe, SCRIPT_PARAMS, SafeHtmlPipe, ScrollEventPlugin, SetUtils, ShiftPipe, SplitPipe, StateService, StaticAuthService, StaticLanguageService, StickyClassDirective, StickyDirective, StorageMode, StorageService, StringUtils, TOASTER_SERVICE, TimerUtils, TranslatePipe, TranslatedUrlSerializer, UniqueUtils, UniversalService, UnorderedListComponent, UnorderedListItemDirective, UnorderedListTemplateDirective,
|
|
5754
|
+
export { API_SERVICE, APP_BASE_URL, AUTH_SERVICE, AclService, AjaxRequestHandler, ApiService, ArrayUtils, AsyncMethodBase, AsyncMethodDirective, AuthGuard, BASE_CONFIG, BackgroundDirective, BaseHttpClient, BaseHttpService, CONFIG_SERVICE, CanvasColor, CanvasUtils, ChunkPipe, Circle, ConfigService, ConsoleToasterService, DateUtils, DynamicTableComponent, DynamicTableTemplateDirective, ERROR_HANDLER, EXPRESS_REQUEST, EntriesPipe, ErrorHandlerService, EventsService, ExtraItemPropertiesPipe, FactoryDependencies, FileSystemEntry, FileUtils, FilterPipe, FindPipe, FormatNumberPipe, FormatterService, GLOBAL_TEMPLATES, GenericValue, GetOffsetPipe, GetTypePipe, GlobalTemplateDirective, GlobalTemplatePipe, GlobalTemplateService, GroupByPipe, HttpPromise, ICON_SERVICE, IConfiguration, IconDirective, IconService, Initializer, IsTypePipe, JSONfn, JoinPipe, KeysPipe, LANGUAGE_SERVICE, LanguageService, LoaderUtils, LocalHttpService, MapPipe, MathUtils, MaxPipe, MinPipe, NgxTemplateOutletDirective, NgxUtilsModule, ObjectType, ObjectUtils, ObservableUtils, OpenApiService, PROMISE_SERVICE, PaginationDirective, PaginationItemContext, PaginationItemDirective, PaginationMenuComponent, Point, PopPipe, PromiseService, RESIZE_DELAY, RESIZE_STRATEGY, ROOT_ELEMENT, Rect, ReducePipe, ReflectUtils, RemapPipe, ReplacePipe, ResizeEventPlugin, ResourceIfContext, ResourceIfDirective, ReversePipe, RoundPipe, SCRIPT_PARAMS, SafeHtmlPipe, ScrollEventPlugin, SetUtils, ShiftPipe, SplitPipe, StateService, StaticAuthService, StaticLanguageService, StickyClassDirective, StickyDirective, StorageMode, StorageService, StringUtils, TOASTER_SERVICE, TimerUtils, TranslatePipe, TranslatedUrlSerializer, UniqueUtils, UniversalService, UnorderedListComponent, UnorderedListItemDirective, UnorderedListTemplateDirective, ValuedPromise, ValuesPipe, Vector, WASI_IMPLEMENTATION, WasmService };
|
|
5760
5755
|
//# sourceMappingURL=stemy-ngx-utils.mjs.map
|