@unipin/angular-applet 18.8.7 → 18.9.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/esm2022/lib/components/containers/index.mjs +2 -2
- package/esm2022/lib/components/filter/filter.component.mjs +3 -3
- package/esm2022/lib/components/forms/date/form-date.component.mjs +8 -9
- package/esm2022/lib/components/index.mjs +2 -2
- package/esm2022/lib/modules/permission/pages/loading/loading.page.mjs +10 -5
- package/esm2022/lib/modules/permission/services/permission.service.mjs +7 -4
- package/esm2022/lib/utils/index.mjs +2 -1
- package/esm2022/lib/utils/redirect-to-first-menu/redirect-to-first-menu.util.mjs +9 -0
- package/esm2022/public-api.mjs +3 -3
- package/fesm2022/unipin-angular-applet.mjs +31 -18
- package/fesm2022/unipin-angular-applet.mjs.map +1 -1
- package/lib/components/containers/index.d.ts +1 -1
- package/lib/components/forms/date/form-date.component.d.ts +4 -4
- package/lib/components/index.d.ts +1 -1
- package/lib/modules/permission/services/permission.service.d.ts +2 -2
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/redirect-to-first-menu/redirect-to-first-menu.util.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -2
package/esm2022/public-api.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { ButtonGroupComponent, ButtonLoadingComponent, FormDateComponent, FormInputComponent, FormNumberComponent, FormPasswordComponent, FormSearchableSelectComponent, FormSelectComponent, FormTextareaComponent, FormImagePickerComponent, FormCurrencyInputComponent, FormCountryInputComponent, FormRateGroupCodeInputComponent, FilterComponent, GridService, GridPaginationComponent, GridSnapshotComponent, provideAppletConfig, AppletContainerComponent, ColumnContainerComponent, ColumnHeaderContainerComponent, ListPaginationContainerComponent, ListSnapshotContainerComponent, ModalContainerComponent, TabContentComponent, TabGroupComponent, AuditListComponent, AuditDetailComponent, APPROVAL_ENTITIES, provideApprovalEntities, ApprovalService, ApprovalListComponent, ApprovalDetailComponent } from './lib/components';
|
|
1
|
+
export { ButtonGroupComponent, ButtonLoadingComponent, FormDateComponent, FormInputComponent, FormNumberComponent, FormPasswordComponent, FormSearchableSelectComponent, FormSelectComponent, FormTextareaComponent, FormImagePickerComponent, FormCurrencyInputComponent, FormCountryInputComponent, FormRateGroupCodeInputComponent, FilterComponent, GridService, GridPaginationComponent, GridSnapshotComponent, APPLET_CONFIG, provideAppletConfig, AppletContainerComponent, ColumnContainerComponent, ColumnHeaderContainerComponent, ListPaginationContainerComponent, ListSnapshotContainerComponent, ModalContainerComponent, TabContentComponent, TabGroupComponent, AuditListComponent, AuditDetailComponent, APPROVAL_ENTITIES, provideApprovalEntities, ApprovalService, ApprovalListComponent, ApprovalDetailComponent } from './lib/components';
|
|
2
2
|
export { InfiniteScrollDirective, InfiniteScrollComponent } from './lib/components/infinite-scroll';
|
|
3
3
|
export { AuthGuard } from './lib/guards';
|
|
4
4
|
export { headerInterceptor, HeaderInterceptor, refreshTokenInterceptor, RefreshTokenInterceptor } from './lib/interceptors';
|
|
5
5
|
export { bootstrap, provideLoadingConfig, LoadingPage, UnauthorizedPage, PermissionDirective, PermissionGuard, PermissionService, } from './lib/modules';
|
|
6
6
|
export { AuthResolver } from './lib/resolvers';
|
|
7
7
|
export { AuthService, CurrencyService, CountryService, RateGroupCodeService, ProfileService, } from './lib/services';
|
|
8
|
-
export { formatCapitalize, generateContrastColor, getFormErrorMessage } from './lib/utils';
|
|
8
|
+
export { formatCapitalize, generateContrastColor, getFormErrorMessage, redirectToFirstMenu } from './lib/utils';
|
|
9
9
|
export { GridApi } from '@ag-grid-community/core';
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL3VuaXBpbi1hbmd1bGFyL3NyYy9wdWJsaWMtYXB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cuL2xpYi9zZXJ2aWNlcyc7XG5cbmV4cG9ydCB7XG4gIGZvcm1hdENhcGl0YWxpemUsXG4gIGdlbmVyYXRlQ29udHJhc3RDb2xvcixcbiAgZ2V0Rm9ybUVycm9yTWVzc2FnZSxcbiAgcmVkaXJlY3RUb0ZpcnN0TWVudVxufSBmcm9tICcuL2xpYi91dGlscyc7XG5cbmV4cG9ydCB7XG4gIEdyaWRBcGksXG4gIEdyaWRSZWFkeUV2ZW50LFxuICBJQ2VsbFJlbmRlcmVyUGFyYW1zLFxuICBWYWx1ZUZvcm1hdHRlclBhcmFtcyxcbiAgU2VsZWN0aW9uQ2hhbmdlZEV2ZW50XG59IGZyb20gJ0BhZy1ncmlkLWNvbW11bml0eS9jb3JlJztcblxuZXhwb3J0IHtcbiAgSUNlbGxSZW5kZXJlckFuZ3VsYXJDb21wXG59IGZyb20gJ0BhZy1ncmlkLWNvbW11bml0eS9hbmd1bGFyJztcbiJdfQ==
|
|
@@ -4,7 +4,7 @@ import * as i1 from '@ionic/angular';
|
|
|
4
4
|
import { IonButton, IonicModule } from '@ionic/angular';
|
|
5
5
|
import * as i1$2 from '@angular/router';
|
|
6
6
|
import { Router, RouterLink, RouterLinkActive, NavigationEnd } from '@angular/router';
|
|
7
|
-
import {
|
|
7
|
+
import { BehaviorSubject, fromEvent, filter, distinctUntilChanged, Subject, debounceTime, tap, switchMap, map, catchError, of, concat, throwError } from 'rxjs';
|
|
8
8
|
import { Location, DatePipe, AsyncPipe, NgStyle, NgTemplateOutlet, formatDate, JsonPipe } from '@angular/common';
|
|
9
9
|
import { bootstrapApplication, createApplication } from '@angular/platform-browser';
|
|
10
10
|
import { createCustomElement } from '@angular/elements';
|
|
@@ -187,7 +187,7 @@ function provideLoadingConfig(config) {
|
|
|
187
187
|
class PermissionService {
|
|
188
188
|
constructor(apollo) {
|
|
189
189
|
this.apollo = apollo;
|
|
190
|
-
this.permModules = new
|
|
190
|
+
this.permModules = new BehaviorSubject([]);
|
|
191
191
|
this.isInitiated = false;
|
|
192
192
|
this.permissions = new Map();
|
|
193
193
|
}
|
|
@@ -210,7 +210,10 @@ class PermissionService {
|
|
|
210
210
|
query: gql `
|
|
211
211
|
query QueryPermission($filter: PermissionFilter!) {
|
|
212
212
|
authMsPermission(filter: $filter) {
|
|
213
|
-
data {
|
|
213
|
+
data {
|
|
214
|
+
permCode
|
|
215
|
+
permModule
|
|
216
|
+
}
|
|
214
217
|
}
|
|
215
218
|
}
|
|
216
219
|
`
|
|
@@ -240,23 +243,28 @@ class LoadingPage {
|
|
|
240
243
|
return;
|
|
241
244
|
}
|
|
242
245
|
const permCodeList = [];
|
|
246
|
+
const permModuleList = new Map();
|
|
247
|
+
;
|
|
243
248
|
this.sub = this.permissionService.getPermissions({
|
|
244
249
|
subjectGuid,
|
|
245
250
|
pageSize: 1000,
|
|
251
|
+
permType: this.config.permTypes,
|
|
246
252
|
permModule: this.config.permModules,
|
|
247
|
-
permType: this.config.permTypes
|
|
248
253
|
}, this.config.fetchPolicy).subscribe({
|
|
249
254
|
error: () => {
|
|
250
255
|
this.router.navigate(['401']);
|
|
251
256
|
},
|
|
252
257
|
next: ({ data: { authMsPermission: { data } } }) => {
|
|
253
|
-
data.forEach(({ permCode }) => {
|
|
254
|
-
if (!permCode)
|
|
258
|
+
data.forEach(({ permCode, permModule }) => {
|
|
259
|
+
if (!permCode || !permModule)
|
|
255
260
|
return;
|
|
256
261
|
permCodeList.push(permCode);
|
|
262
|
+
if (!permModuleList.has(permModule)) {
|
|
263
|
+
permModuleList.set(permModule, true);
|
|
264
|
+
}
|
|
257
265
|
});
|
|
258
266
|
this.permissionService.isInitiated = true;
|
|
259
|
-
this.permissionService.setPermission(permCodeList,
|
|
267
|
+
this.permissionService.setPermission(permCodeList, Array.from(permModuleList.keys()));
|
|
260
268
|
this.router.navigateByUrl(this.route.snapshot.queryParamMap.get('url') ?? '');
|
|
261
269
|
}
|
|
262
270
|
});
|
|
@@ -630,9 +638,14 @@ function generateContrastColor(str) {
|
|
|
630
638
|
};
|
|
631
639
|
}
|
|
632
640
|
|
|
641
|
+
function redirectToFirstMenu() {
|
|
642
|
+
const { permModules } = inject(PermissionService);
|
|
643
|
+
const { containers } = inject(APPLET_CONFIG);
|
|
644
|
+
return containers.find(({ permModule }) => permModules.value.includes(permModule))?.path ?? containers[0].path;
|
|
645
|
+
}
|
|
646
|
+
|
|
633
647
|
class FormDateComponent {
|
|
634
|
-
constructor(
|
|
635
|
-
this.name = name;
|
|
648
|
+
constructor(placeholder, ch) {
|
|
636
649
|
this.placeholder = placeholder;
|
|
637
650
|
this.ch = ch;
|
|
638
651
|
this.required = false;
|
|
@@ -683,8 +696,8 @@ class FormDateComponent {
|
|
|
683
696
|
this.errorMsg = getFormErrorMessage(this.formControl.errors, this.label);
|
|
684
697
|
}
|
|
685
698
|
}
|
|
686
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormDateComponent, deps: [{ token: '
|
|
687
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FormDateComponent, isStandalone: true, selector: "up-date", inputs: { label: "label", required: "required", disabled: "disabled", presentation: "presentation", minDate: "minDate", maxDate: "maxDate", dateFormat: "dateFormat" }, host: { classAttribute: "d-block position-relative" }, providers: [
|
|
699
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormDateComponent, deps: [{ token: 'placeholder', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
700
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FormDateComponent, isStandalone: true, selector: "up-date", inputs: { name: "name", label: "label", required: "required", disabled: "disabled", presentation: "presentation", minDate: "minDate", maxDate: "maxDate", dateFormat: "dateFormat" }, host: { classAttribute: "d-block position-relative" }, providers: [
|
|
688
701
|
{
|
|
689
702
|
multi: true,
|
|
690
703
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -717,12 +730,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
717
730
|
}
|
|
718
731
|
], template: "<label class=\"form-label d-flex align-items-center\">\n <ng-content select=\"[icon]\" />\n <span>{{ label }}</span>\n</label>\n\n<input readonly type=\"text\" id=\"{{ name }}-date\" placeholder=\"{{ placeholder }}\" class=\"form-control cursor-pointer\" [disabled]=\"disabled\" [required]=\"required\" [value]=\"value | date:dateFormat \">\n<ion-icon name=\"calendar\" class=\"position-absolute fs-4 cursor-pointer\" />\n\n<ion-modal trigger=\"{{ name }}-date\">\n <ng-template>\n <ion-datetime \n mode=\"md\" \n hourCycle=\"h23\" \n value=\"{{ localValue }}\"\n [min]=\"minDate\"\n [max]=\"maxDate\"\n [showDefaultButtons]=\"true\" \n [presentation]=\"presentation\"\n (ionChange)=\"changeDate($event)\" \n />\n </ng-template>\n</ion-modal>\n\n@if (errorMsg) {\n <label class=\"is-invalid\">{{ errorMsg }}</label>\n}\n", styles: ["ion-datetime{--background: white}ion-modal{--width: 290px;--height: auto}ion-icon{top:32px;right:16px;color:#616161}\n"] }]
|
|
719
732
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
720
|
-
type: Attribute,
|
|
721
|
-
args: ['name']
|
|
722
|
-
}] }, { type: undefined, decorators: [{
|
|
723
733
|
type: Attribute,
|
|
724
734
|
args: ['placeholder']
|
|
725
|
-
}] }, { type: i0.ChangeDetectorRef }], propDecorators: {
|
|
735
|
+
}] }, { type: i0.ChangeDetectorRef }], propDecorators: { name: [{
|
|
736
|
+
type: Input,
|
|
737
|
+
args: [{ required: true }]
|
|
738
|
+
}], label: [{
|
|
726
739
|
type: Input
|
|
727
740
|
}], required: [{
|
|
728
741
|
type: Input
|
|
@@ -3280,7 +3293,7 @@ class FilterComponent {
|
|
|
3280
3293
|
}));
|
|
3281
3294
|
}
|
|
3282
3295
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FilterComponent, deps: [{ token: 'placeholder', attribute: true }, { token: i0.ChangeDetectorRef }, { token: i1.PopoverController }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3283
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FilterComponent, isStandalone: true, selector: "up-filter", inputs: { id: "id", config: "config" }, outputs: { onSearch: "onSearch" }, host: { classAttribute: "d-block position-relative" }, viewQueries: [{ propertyName: "searchBox", first: true, predicate: ["searchBox"], descendants: true }], ngImport: i0, template: "<ion-icon name=\"search\" class=\"fs-4 position-absolute\" />\n\n<div class=\"d-flex align-items-center form-control ps-5 py-0 pe-0 gap-3\">\n @if (activeFilter.length > 0) {\n <div class=\"d-flex flex-grow-1 flex-shrink-0 tag-container gap-2 text-nowrap overflow-auto\">\n @for (item of activeFilter; track item.key; let i = $index) {\n <div class=\"tag-item p-1 rounded d-flex align-items-center user-select-none\">\n <ion-icon name=\"close\" class=\"pe-1 me-1 cursor-pointer text-primary\" (click)=\"removeFilter(i);\" />\n {{ item.label }}\n </div>\n }\n </div>\n }\n\n <input #searchBox type=\"search\" placeholder=\"{{ placeholder }}\" class=\"flex-shrink-1 border-0 form-control ps-0 py-2\" [class.adv]=\"config.mode === 'advanced'\" (keyup.enter)=\"add();\" />\n</div>\n\n@if (config.mode === 'advanced') {\n <ion-icon name=\"filter\" class=\"position-absolute fs-4 cursor-pointer\" id=\"filter-{{ id }}\" />\n <ion-icon name=\"close\" class=\"position-absolute fs-4 cursor-pointer\" (click)=\"clear();\" />\n \n <ion-popover trigger=\"filter-{{ id }}\" triggerAction=\"click\">\n <ng-template>\n <div class=\"d-flex flex-column filter overflow-auto\">\n <div class=\"flex-shrink-0 border-bottom p-1 pe-4 d-flex align-items-center\">\n <ion-buttons>\n <ion-button size=\"small\" (click)=\"close()\">\n <ion-icon slot=\"icon-only\" name=\"close\" />\n </ion-button>\n </ion-buttons>\n \n <div class=\"fs-5 fw-medium\">Advanced Filter</div>\n </div>\n \n <form class=\"flex-grow-1 overflow-auto px-4\" [formGroup]=\"form\">\n @for (c of config.fields; track c.key) {\n @switch (c.type) {\n @case ('number') {\n <up-input type=\"number\" autocomplete=\"off\" class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" /> \n }\n\n @case ('checkbox') {\n <div class=\"my-4\">\n <ion-checkbox labelPlacement=\"end\" formControlName=\"{{ c.key }}\">{{ c.label }}</ion-checkbox>\n </div>\n }\n\n @case ('date-range') {\n <div class=\"d-flex gap-3 my-4\">\n <up-date class=\"flex-grow-1\"
|
|
3296
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FilterComponent, isStandalone: true, selector: "up-filter", inputs: { id: "id", config: "config" }, outputs: { onSearch: "onSearch" }, host: { classAttribute: "d-block position-relative" }, viewQueries: [{ propertyName: "searchBox", first: true, predicate: ["searchBox"], descendants: true }], ngImport: i0, template: "<ion-icon name=\"search\" class=\"fs-4 position-absolute\" />\n\n<div class=\"d-flex align-items-center form-control ps-5 py-0 pe-0 gap-3\">\n @if (activeFilter.length > 0) {\n <div class=\"d-flex flex-grow-1 flex-shrink-0 tag-container gap-2 text-nowrap overflow-auto\">\n @for (item of activeFilter; track item.key; let i = $index) {\n <div class=\"tag-item p-1 rounded d-flex align-items-center user-select-none\">\n <ion-icon name=\"close\" class=\"pe-1 me-1 cursor-pointer text-primary\" (click)=\"removeFilter(i);\" />\n {{ item.label }}\n </div>\n }\n </div>\n }\n\n <input #searchBox type=\"search\" placeholder=\"{{ placeholder }}\" class=\"flex-shrink-1 border-0 form-control ps-0 py-2\" [class.adv]=\"config.mode === 'advanced'\" (keyup.enter)=\"add();\" />\n</div>\n\n@if (config.mode === 'advanced') {\n <ion-icon name=\"filter\" class=\"position-absolute fs-4 cursor-pointer\" id=\"filter-{{ id }}\" />\n <ion-icon name=\"close\" class=\"position-absolute fs-4 cursor-pointer\" (click)=\"clear();\" />\n \n <ion-popover trigger=\"filter-{{ id }}\" triggerAction=\"click\">\n <ng-template>\n <div class=\"d-flex flex-column filter overflow-auto\">\n <div class=\"flex-shrink-0 border-bottom p-1 pe-4 d-flex align-items-center\">\n <ion-buttons>\n <ion-button size=\"small\" (click)=\"close()\">\n <ion-icon slot=\"icon-only\" name=\"close\" />\n </ion-button>\n </ion-buttons>\n \n <div class=\"fs-5 fw-medium\">Advanced Filter</div>\n </div>\n \n <form class=\"flex-grow-1 overflow-auto px-4\" [formGroup]=\"form\">\n @for (c of config.fields; track c.key) {\n @switch (c.type) {\n @case ('number') {\n <up-input type=\"number\" autocomplete=\"off\" class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" /> \n }\n\n @case ('checkbox') {\n <div class=\"my-4\">\n <ion-checkbox labelPlacement=\"end\" formControlName=\"{{ c.key }}\">{{ c.label }}</ion-checkbox>\n </div>\n }\n\n @case ('date-range') {\n <div class=\"d-flex gap-3 my-4\">\n <up-date \n class=\"flex-grow-1\"\n label=\"{{ c.label[0] }}\" \n name=\"{{ c.key[0] }}-filter-from\" \n formControlName=\"{{ c.key[0] }}\" \n />\n\n <up-date \n class=\"flex-grow-1\"\n label=\"{{ c.label[1] }}\" \n name=\"{{ c.key[1] }}-filter-to\" \n formControlName=\"{{ c.key[1] }}\" \n />\n </div>\n }\n\n @case ('select') { \n <up-select \n class=\"my-4\"\n appendTo=\"body\" \n label=\"{{ c.label }}\" \n formControlName=\"{{ c.key }}\" \n [searchable]=\"true\"\n [items]=\"c.options!\"\n [multiple]=\"c.multiple || false\"\n /> \n }\n\n @case ('searchable-select') { \n <up-searchable-select \n class=\"my-4\" \n appendTo=\"body\" \n label=\"{{ c.label }}\" \n formControlName=\"{{ c.key }}\" \n [queryFunc]=\"c.getOptions!\" \n [initialItems]=\"c.options! || initialItems.get(c.key.toString())!\"\n [multiple]=\"c.multiple || false\"\n (onChange)=\"applyInitialItems($event, c.key.toString())\"\n /> \n }\n\n @case ('number-range') {\n <div class=\"d-flex gap-3 my-4\">\n <up-input type=\"number\" autocomplete=\"off\" class=\"flex-grow-1\" label=\"{{ c.label[0] }}\" formControlName=\"{{ c.key[0] }}\" [min]=\"c.min\" [max]=\"c.max\"/>\n <up-input type=\"number\" autocomplete=\"off\" class=\"flex-grow-1\" label=\"{{ c.label[1] }}\" formControlName=\"{{ c.key[1] }}\" [min]=\"c.min\" [max]=\"c.max\"/>\n </div>\n }\n \n @default { \n <up-input type=\"text\" autocomplete=\"off\" class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" /> \n }\n }\n }\n </form>\n \n <div class=\"flex-shrink-0 py-3 px-4 border-top d-flex gap-3\">\n <ion-button class=\"flex-grow-1\" color=\"secondary\" (click)=\"form.reset();\">Reset</ion-button>\n <ion-button class=\"flex-grow-1\" color=\"primary\" (click)=\"search();\">Search</ion-button>\n </div>\n </div>\n </ng-template>\n </ion-popover> \n}\n", styles: ["ion-icon{top:7px}ion-icon[name=close]{right:16px}ion-icon[name=search]{left:14px}ion-icon[name=filter]{right:48px}ion-popover{--width: 80%;--max-width: 450px}.adv{padding-right:60px}.fs-5,ion-icon{color:#616161}.tag-container{max-width:45%}@media (max-width: 576px){.tag-container{max-width:35%}}.tag-container::-webkit-scrollbar{height:0px}.tag-item{color:#ed6b26;background-color:#fef3ee}.tag-item ion-icon{border-right:1px solid #fbd1be}input::-webkit-search-decoration,input::-webkit-search-cancel-button,input::-webkit-search-results-button,input::-webkit-search-results-decoration{-webkit-appearance:none}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: i1.IonCheckbox, selector: "ion-checkbox", inputs: ["alignment", "checked", "color", "disabled", "indeterminate", "justify", "labelPlacement", "legacy", "mode", "name", "value"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonPopover, selector: "ion-popover" }, { kind: "directive", type: i1.BooleanValueAccessor, selector: "ion-checkbox,ion-toggle" }, { kind: "component", type: FormDateComponent, selector: "up-date", inputs: ["name", "label", "required", "disabled", "presentation", "minDate", "maxDate", "dateFormat"] }, { kind: "component", type: FormInputComponent, selector: "up-input", inputs: ["label", "value", "required", "disabled", "min", "max"], outputs: ["onInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: FormSelectComponent, selector: "up-select", inputs: ["items", "clearable", "label", "multiple", "required", "addTag", "disabled", "searchable", "bindLabel", "bindValue", "appendTo"] }, { kind: "component", type: FormSearchableSelectComponent, selector: "up-searchable-select", inputs: ["queryFunc", "clearable", "label", "initialItems", "required", "addTag", "disabled", "multiple", "bindLabel", "bindValue", "appendTo"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3284
3297
|
}
|
|
3285
3298
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FilterComponent, decorators: [{
|
|
3286
3299
|
type: Component,
|
|
@@ -3293,7 +3306,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3293
3306
|
ReactiveFormsModule,
|
|
3294
3307
|
FormSelectComponent,
|
|
3295
3308
|
FormSearchableSelectComponent
|
|
3296
|
-
], template: "<ion-icon name=\"search\" class=\"fs-4 position-absolute\" />\n\n<div class=\"d-flex align-items-center form-control ps-5 py-0 pe-0 gap-3\">\n @if (activeFilter.length > 0) {\n <div class=\"d-flex flex-grow-1 flex-shrink-0 tag-container gap-2 text-nowrap overflow-auto\">\n @for (item of activeFilter; track item.key; let i = $index) {\n <div class=\"tag-item p-1 rounded d-flex align-items-center user-select-none\">\n <ion-icon name=\"close\" class=\"pe-1 me-1 cursor-pointer text-primary\" (click)=\"removeFilter(i);\" />\n {{ item.label }}\n </div>\n }\n </div>\n }\n\n <input #searchBox type=\"search\" placeholder=\"{{ placeholder }}\" class=\"flex-shrink-1 border-0 form-control ps-0 py-2\" [class.adv]=\"config.mode === 'advanced'\" (keyup.enter)=\"add();\" />\n</div>\n\n@if (config.mode === 'advanced') {\n <ion-icon name=\"filter\" class=\"position-absolute fs-4 cursor-pointer\" id=\"filter-{{ id }}\" />\n <ion-icon name=\"close\" class=\"position-absolute fs-4 cursor-pointer\" (click)=\"clear();\" />\n \n <ion-popover trigger=\"filter-{{ id }}\" triggerAction=\"click\">\n <ng-template>\n <div class=\"d-flex flex-column filter overflow-auto\">\n <div class=\"flex-shrink-0 border-bottom p-1 pe-4 d-flex align-items-center\">\n <ion-buttons>\n <ion-button size=\"small\" (click)=\"close()\">\n <ion-icon slot=\"icon-only\" name=\"close\" />\n </ion-button>\n </ion-buttons>\n \n <div class=\"fs-5 fw-medium\">Advanced Filter</div>\n </div>\n \n <form class=\"flex-grow-1 overflow-auto px-4\" [formGroup]=\"form\">\n @for (c of config.fields; track c.key) {\n @switch (c.type) {\n @case ('number') {\n <up-input type=\"number\" autocomplete=\"off\" class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" /> \n }\n\n @case ('checkbox') {\n <div class=\"my-4\">\n <ion-checkbox labelPlacement=\"end\" formControlName=\"{{ c.key }}\">{{ c.label }}</ion-checkbox>\n </div>\n }\n\n @case ('date-range') {\n <div class=\"d-flex gap-3 my-4\">\n <up-date class=\"flex-grow-1\"
|
|
3309
|
+
], template: "<ion-icon name=\"search\" class=\"fs-4 position-absolute\" />\n\n<div class=\"d-flex align-items-center form-control ps-5 py-0 pe-0 gap-3\">\n @if (activeFilter.length > 0) {\n <div class=\"d-flex flex-grow-1 flex-shrink-0 tag-container gap-2 text-nowrap overflow-auto\">\n @for (item of activeFilter; track item.key; let i = $index) {\n <div class=\"tag-item p-1 rounded d-flex align-items-center user-select-none\">\n <ion-icon name=\"close\" class=\"pe-1 me-1 cursor-pointer text-primary\" (click)=\"removeFilter(i);\" />\n {{ item.label }}\n </div>\n }\n </div>\n }\n\n <input #searchBox type=\"search\" placeholder=\"{{ placeholder }}\" class=\"flex-shrink-1 border-0 form-control ps-0 py-2\" [class.adv]=\"config.mode === 'advanced'\" (keyup.enter)=\"add();\" />\n</div>\n\n@if (config.mode === 'advanced') {\n <ion-icon name=\"filter\" class=\"position-absolute fs-4 cursor-pointer\" id=\"filter-{{ id }}\" />\n <ion-icon name=\"close\" class=\"position-absolute fs-4 cursor-pointer\" (click)=\"clear();\" />\n \n <ion-popover trigger=\"filter-{{ id }}\" triggerAction=\"click\">\n <ng-template>\n <div class=\"d-flex flex-column filter overflow-auto\">\n <div class=\"flex-shrink-0 border-bottom p-1 pe-4 d-flex align-items-center\">\n <ion-buttons>\n <ion-button size=\"small\" (click)=\"close()\">\n <ion-icon slot=\"icon-only\" name=\"close\" />\n </ion-button>\n </ion-buttons>\n \n <div class=\"fs-5 fw-medium\">Advanced Filter</div>\n </div>\n \n <form class=\"flex-grow-1 overflow-auto px-4\" [formGroup]=\"form\">\n @for (c of config.fields; track c.key) {\n @switch (c.type) {\n @case ('number') {\n <up-input type=\"number\" autocomplete=\"off\" class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" /> \n }\n\n @case ('checkbox') {\n <div class=\"my-4\">\n <ion-checkbox labelPlacement=\"end\" formControlName=\"{{ c.key }}\">{{ c.label }}</ion-checkbox>\n </div>\n }\n\n @case ('date-range') {\n <div class=\"d-flex gap-3 my-4\">\n <up-date \n class=\"flex-grow-1\"\n label=\"{{ c.label[0] }}\" \n name=\"{{ c.key[0] }}-filter-from\" \n formControlName=\"{{ c.key[0] }}\" \n />\n\n <up-date \n class=\"flex-grow-1\"\n label=\"{{ c.label[1] }}\" \n name=\"{{ c.key[1] }}-filter-to\" \n formControlName=\"{{ c.key[1] }}\" \n />\n </div>\n }\n\n @case ('select') { \n <up-select \n class=\"my-4\"\n appendTo=\"body\" \n label=\"{{ c.label }}\" \n formControlName=\"{{ c.key }}\" \n [searchable]=\"true\"\n [items]=\"c.options!\"\n [multiple]=\"c.multiple || false\"\n /> \n }\n\n @case ('searchable-select') { \n <up-searchable-select \n class=\"my-4\" \n appendTo=\"body\" \n label=\"{{ c.label }}\" \n formControlName=\"{{ c.key }}\" \n [queryFunc]=\"c.getOptions!\" \n [initialItems]=\"c.options! || initialItems.get(c.key.toString())!\"\n [multiple]=\"c.multiple || false\"\n (onChange)=\"applyInitialItems($event, c.key.toString())\"\n /> \n }\n\n @case ('number-range') {\n <div class=\"d-flex gap-3 my-4\">\n <up-input type=\"number\" autocomplete=\"off\" class=\"flex-grow-1\" label=\"{{ c.label[0] }}\" formControlName=\"{{ c.key[0] }}\" [min]=\"c.min\" [max]=\"c.max\"/>\n <up-input type=\"number\" autocomplete=\"off\" class=\"flex-grow-1\" label=\"{{ c.label[1] }}\" formControlName=\"{{ c.key[1] }}\" [min]=\"c.min\" [max]=\"c.max\"/>\n </div>\n }\n \n @default { \n <up-input type=\"text\" autocomplete=\"off\" class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" /> \n }\n }\n }\n </form>\n \n <div class=\"flex-shrink-0 py-3 px-4 border-top d-flex gap-3\">\n <ion-button class=\"flex-grow-1\" color=\"secondary\" (click)=\"form.reset();\">Reset</ion-button>\n <ion-button class=\"flex-grow-1\" color=\"primary\" (click)=\"search();\">Search</ion-button>\n </div>\n </div>\n </ng-template>\n </ion-popover> \n}\n", styles: ["ion-icon{top:7px}ion-icon[name=close]{right:16px}ion-icon[name=search]{left:14px}ion-icon[name=filter]{right:48px}ion-popover{--width: 80%;--max-width: 450px}.adv{padding-right:60px}.fs-5,ion-icon{color:#616161}.tag-container{max-width:45%}@media (max-width: 576px){.tag-container{max-width:35%}}.tag-container::-webkit-scrollbar{height:0px}.tag-item{color:#ed6b26;background-color:#fef3ee}.tag-item ion-icon{border-right:1px solid #fbd1be}input::-webkit-search-decoration,input::-webkit-search-cancel-button,input::-webkit-search-results-button,input::-webkit-search-results-decoration{-webkit-appearance:none}\n"] }]
|
|
3297
3310
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
3298
3311
|
type: Attribute,
|
|
3299
3312
|
args: ['placeholder']
|
|
@@ -4546,5 +4559,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
4546
4559
|
type: Injectable
|
|
4547
4560
|
}], ctorParameters: () => [{ type: i1$2.Router }, { type: AuthService }] });
|
|
4548
4561
|
|
|
4549
|
-
export { APPROVAL_ENTITIES, AppletContainerComponent, ApprovalDetailComponent, ApprovalListComponent, ApprovalService, AuditDetailComponent, AuditListComponent, AuthGuard, AuthResolver, AuthService, ButtonGroupComponent, ButtonLoadingComponent, ColumnContainerComponent, ColumnHeaderContainerComponent, CountryService, CurrencyService, FilterComponent, FormCountryInputComponent, FormCurrencyInputComponent, FormDateComponent, FormImagePickerComponent, FormInputComponent, FormNumberComponent, FormPasswordComponent, FormRateGroupCodeInputComponent, FormSearchableSelectComponent, FormSelectComponent, FormTextareaComponent, GridPaginationComponent, GridService, GridSnapshotComponent, HeaderInterceptor, InfiniteScrollComponent, InfiniteScrollDirective, ListPaginationContainerComponent, ListSnapshotContainerComponent, LoadingPage, ModalContainerComponent, PermissionDirective, PermissionGuard, PermissionService, ProfileService, RateGroupCodeService, RefreshTokenInterceptor, TabContentComponent, TabGroupComponent, UnauthorizedPage, bootstrap, formatCapitalize, generateContrastColor, getFormErrorMessage, headerInterceptor, provideAppletConfig, provideApprovalEntities, provideLoadingConfig, refreshTokenInterceptor };
|
|
4562
|
+
export { APPLET_CONFIG, APPROVAL_ENTITIES, AppletContainerComponent, ApprovalDetailComponent, ApprovalListComponent, ApprovalService, AuditDetailComponent, AuditListComponent, AuthGuard, AuthResolver, AuthService, ButtonGroupComponent, ButtonLoadingComponent, ColumnContainerComponent, ColumnHeaderContainerComponent, CountryService, CurrencyService, FilterComponent, FormCountryInputComponent, FormCurrencyInputComponent, FormDateComponent, FormImagePickerComponent, FormInputComponent, FormNumberComponent, FormPasswordComponent, FormRateGroupCodeInputComponent, FormSearchableSelectComponent, FormSelectComponent, FormTextareaComponent, GridPaginationComponent, GridService, GridSnapshotComponent, HeaderInterceptor, InfiniteScrollComponent, InfiniteScrollDirective, ListPaginationContainerComponent, ListSnapshotContainerComponent, LoadingPage, ModalContainerComponent, PermissionDirective, PermissionGuard, PermissionService, ProfileService, RateGroupCodeService, RefreshTokenInterceptor, TabContentComponent, TabGroupComponent, UnauthorizedPage, bootstrap, formatCapitalize, generateContrastColor, getFormErrorMessage, headerInterceptor, provideAppletConfig, provideApprovalEntities, provideLoadingConfig, redirectToFirstMenu, refreshTokenInterceptor };
|
|
4550
4563
|
//# sourceMappingURL=unipin-angular-applet.mjs.map
|