@dflat-core/web 1.0.58 → 1.0.60

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.
@@ -1 +1 @@
1
- {"version":3,"file":"dflat-core-web-core-model.mjs","names":[],"sources":["../../core-model/src/lib/core-model.module.ts","../../core-model/src/lib/model/interface.generated.ts","../../core-model/src/lib/interface.ts","../../core-model/src/lib/model/model.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\n\r\n\r\n@NgModule({\r\n imports: [CommonModule],\r\n declarations: [],\r\n exports: []\r\n})\r\nexport class CoreModelModule {}\r\n","export interface ViewModel {\r\n}\r\n\r\nexport interface ExtendedProperty {\r\n EntityId? : number;\r\n FieldType? : number;\r\n PropertyId? : number;\r\n PropertyName? : string;\r\n Value? : string;\r\n}\r\n\r\nexport enum ValidatorTypes {\r\n None = 0,\r\n MaxLength = 1,\r\n MinLength = 2,\r\n Max = 4,\r\n Min = 8,\r\n Email = 16,\r\n Required = 32,\r\n Unicity = 64,\r\n Nullable = 128,\r\n}\r\n\r\nexport interface PagingViewModel {\r\n EnablePaging? : boolean;\r\n Offset? : number;\r\n SortColumn? : string;\r\n SortDirection? : string;\r\n SpecificSortClause? : string;\r\n Take? : number;\r\n}\r\n\r\nexport interface EntityViewModel extends ViewModel {\r\n ExtendedProperties? : ExtendedProperty[];\r\n Id? : number;\r\n IsEditable? : boolean;\r\n IsSelected? : boolean;\r\n IsStorable? : boolean;\r\n Name? : string;\r\n RowVersion? : Date;\r\n}\r\n\r\nexport interface TextWithStyle {\r\n GreenText? : string;\r\n RedText? : string;\r\n YellowText? : string;\r\n}\r\n\r\nexport interface INode {\r\n Childrens? : INode[];\r\n Code? : string;\r\n Description? : string;\r\n Id? : number;\r\n ParentId? : number;\r\n UniqueName? : string;\r\n}\r\n\r\nexport interface FilterViewModel extends PagingViewModel {\r\n AdditionalFilter? : string;\r\n AggregateClause? : string;\r\n BrandId? : number;\r\n CustomFieldIds? : string;\r\n Id? : number;\r\n IsCsvExport? : boolean;\r\n Keywords? : string;\r\n}\r\n\r\nexport enum FilterType {\r\n String = 0,\r\n Integer = 1,\r\n Date = 2,\r\n ComboBox = 3,\r\n CheckBox = 4,\r\n Email = 5,\r\n WeekNumber = 6,\r\n Text = 7,\r\n Custom = 8,\r\n RadioButton = 9,\r\n TextZoneWithButton = 10,\r\n HorizComboBox = 11,\r\n TextWithButton = 12,\r\n DropFileZone = 13,\r\n DateTime = 14,\r\n Password = 15,\r\n TreeSelector = 16,\r\n Decimal = 17,\r\n}\r\n\r\nexport interface FieldValidators {\r\n MaxLength? : number;\r\n MaxValue? : number;\r\n MinValue? : number;\r\n ValidatorType? : ValidatorTypes;\r\n}\r\n\r\nexport enum ConditionalResults {\r\n Hide = 0,\r\n ReadOnly = 1,\r\n}\r\n\r\nexport enum ColumnSpans {\r\n Single = 0,\r\n Full = 1,\r\n}\r\n\r\nexport interface FieldDescriptor {\r\n BoolConditioningFieldValue? : boolean;\r\n ButtonLabel? : string;\r\n CascadeDependency? : boolean;\r\n CascadeDependencyProperty? : string;\r\n ColumnIndex? : number;\r\n ColumnSpan? : ColumnSpans;\r\n ConditionalResult? : ConditionalResults;\r\n ConditioningField? : string;\r\n ConditioningFieldValue? : number[];\r\n CurrentFilters? : any;\r\n Data? : any;\r\n DataFilter? : FilterViewModel;\r\n Description? : string;\r\n DisplayMember? : string;\r\n ExportPropertyName? : string;\r\n FieldValidators? : FieldValidators;\r\n FilterDistinct? : boolean;\r\n FilterType? : FilterType;\r\n HideSelected? : boolean;\r\n Highlight? : boolean;\r\n InputType? : string;\r\n IsClearable? : boolean;\r\n IsConditional? : boolean;\r\n IsConditioning? : boolean;\r\n IsExtendedProperty? : boolean;\r\n IsHidden? : boolean;\r\n IsStatic? : boolean;\r\n KeepPlace? : boolean;\r\n Label? : string;\r\n ModalEntityKey? : string;\r\n ModalOnly? : boolean;\r\n ModalPropertyName? : string;\r\n ModalPropertyValue? : string;\r\n ModalTitle? : string;\r\n ModalTriggerIdProperty? : string;\r\n ModalTriggerIdPropertyValue? : string;\r\n MultipleSelection? : boolean;\r\n NotDefaultRequired? : boolean;\r\n OriginalData? : any;\r\n PropertyLength? : number;\r\n PropertyName? : string;\r\n ReadOnly? : boolean;\r\n Required? : boolean;\r\n TextWithStyle? : TextWithStyle;\r\n ToolTip? : string;\r\n ValueMember? : string;\r\n}\r\n\r\nexport interface EntityFilterViewModel<T> extends FilterViewModel {\r\n}\r\n\r\nexport enum ApiErrorTypes {\r\n Unknown = 0,\r\n DatabaseError = 1,\r\n SystemError = 2,\r\n UserError = 3,\r\n}\r\n\r\nexport interface TreeItem<T> {\r\n checked? : boolean;\r\n children? : TreeItem<T>[];\r\n childrenCount? : number;\r\n text? : string;\r\n value? : number;\r\n}\r\n\r\nexport interface Section {\r\n FieldViewModels? : FieldDescriptor[];\r\n IsCustomFieldSection? : boolean;\r\n IsFileSection? : boolean;\r\n IsTrackRecordSection? : boolean;\r\n Name? : string;\r\n}\r\n\r\nexport interface Display {\r\n baseUrl? : string;\r\n completingCaracter? : string;\r\n currency? : string;\r\n enumMap? : string[];\r\n format? : string;\r\n handleError? : boolean;\r\n imagePath? : string;\r\n imgBase? : string;\r\n multiplier? : number;\r\n nullCaseText? : string;\r\n sourceProperty? : string;\r\n type? : string;\r\n width? : number;\r\n}\r\n\r\nexport interface BasicNode {\r\n Childrens? : INode[];\r\n Code? : string;\r\n Description? : string;\r\n Id? : number;\r\n ParentId? : number;\r\n UniqueName? : string;\r\n}\r\n\r\nexport interface ApiError {\r\n ApiErrorType? : ApiErrorTypes;\r\n ErrorCode? : number;\r\n Message? : string;\r\n StackTrace? : string;\r\n}\r\n\r\nexport enum ActionDisplay {\r\n Button = 0,\r\n TextAndButton = 1,\r\n}\r\n\r\n\r\nexport interface TabToSave<TResult> {\r\n Data? : TResult[];\r\n TitleOfTab? : string;\r\n}\r\n\r\nexport interface SaveResult {\r\n DisplayMessage? : boolean;\r\n Error? : ApiError;\r\n ErrorMessage? : string;\r\n Id? : number;\r\n RowVersion? : Date;\r\n Success? : boolean;\r\n Warnings? : string[];\r\n}\r\n\r\nexport interface ColumnDescriptor {\r\n Display? : Display;\r\n Expression? : string;\r\n FieldName? : string;\r\n IsComputed? : boolean;\r\n IsFilterEnabled? : boolean;\r\n IsNumericExpression? : boolean;\r\n Name? : string;\r\n Property? : string;\r\n TableAlias? : string;\r\n ToolTipProperty? : string;\r\n}\r\n\r\nexport interface AggregationValue {\r\n Key? : string;\r\n Value? : any;\r\n}\r\n\r\nexport interface ActionDescriptor {\r\n ActionDisplay? : ActionDisplay;\r\n Description? : string;\r\n FormDescriptor? : Section[];\r\n Icon? : string;\r\n IconUrl? : string;\r\n Label? : string;\r\n Name? : string;\r\n RequestType? : string;\r\n}\r\n\r\nexport interface TrackRecordProperty {\r\n CreatedBy? : string;\r\n CreationDate? : Date;\r\n CreationDateString? : string;\r\n Id? : number;\r\n ModificationDate? : Date;\r\n ModificationDateString? : string;\r\n ModifiedBy? : string;\r\n}\r\n\r\nexport interface SaveResults<TResult> extends SaveResult {\r\n SaveErrorEntities? : TResult[];\r\n}\r\n\r\nexport interface RunActionContext {\r\n Action? : ActionDescriptor;\r\n CorrelationId? : string;\r\n EntityIds? : number[];\r\n EntityKey? : string;\r\n File? : any;\r\n FileId? : number;\r\n FormValue? : any;\r\n RequestId? : number;\r\n}\r\n\r\nexport interface PagedList<T> {\r\n Aggregates? : AggregationValue[];\r\n Skip? : number;\r\n Take? : number;\r\n TotalRowCount? : number;\r\n Values? : T[];\r\n}\r\n\r\nexport enum ImageFormats {\r\n Undefined = 0,\r\n JPG = 1,\r\n PNG = 2,\r\n GIF = 3,\r\n TIFF = 4,\r\n BMP = 5,\r\n SVG = 6,\r\n}\r\n\r\nexport interface FilterDescriptor extends FieldDescriptor {\r\n DisplayImage? : boolean;\r\n}\r\n\r\nexport interface ExportModel<T> {\r\n Columns? : ColumnDescriptor[];\r\n Filter? : T;\r\n}\r\n\r\nexport interface EntityWithSpecifics<TResult> {\r\n Entity? : TResult;\r\n Tabs? : TabToSave<TResult>[];\r\n}\r\n\r\nexport interface EntityViewModelWithFields<T> {\r\n FieldSections? : Section[];\r\n SpecificSection? : any;\r\n ViewModel? : T;\r\n}\r\n\r\nexport enum TextSearch {\r\n Contains = 0,\r\n StartsWith = 1,\r\n EndsWith = 2,\r\n}\r\n\r\nexport enum ExportType {\r\n CSV = 0,\r\n EXCEL = 1,\r\n}\r\n\r\nexport enum AggregateFunction {\r\n Count = 0,\r\n Sum = 1,\r\n Min = 2,\r\n Max = 3,\r\n Avg = 4,\r\n}\r\n\r\nexport enum ActionResultStatus {\r\n OK = 0,\r\n KO = 1,\r\n}\r\n\r\n","import { Utilities } from '@dflat-core/web/core';\r\nimport { ComponentRef, TemplateRef, Type } from '@angular/core';\r\n\r\nimport { ActionDescriptor, ColumnDescriptor, EntityViewModel, EntityViewModelWithFields, FieldDescriptor, FieldValidators, FilterDescriptor, FilterViewModel } from './model/interface.generated';\r\n\r\nexport interface IIdentifiable {\r\n Id?: number;\r\n}\r\n\r\nexport class UserUpdatedMessage {\r\n constructor(public userKey: string) { }\r\n}\r\n\r\nexport interface IUserCredential extends IIdentifiable {\r\n AccessToken: string; \r\n RefreshToken: string; \r\n Username?: string; \r\n FirstName?: string; \r\n LastName?: string;\r\n Email?: string;\r\n IsAdmin?: boolean;\r\n IsDelivery?: boolean;\r\n IsPartner?: boolean;\r\n PhoneNumber?: string;\r\n IsActive?: boolean;\r\n IsPartnerActive?: boolean;\r\n IsDeliveryActive?: boolean;\r\n\r\n Id?: number;\r\n CompanyId?: number;\r\n Permissions: string[];\r\n ProfileImageUrl: string;\r\n AvatarUrl: string;\r\n\r\n}\r\n/** Fournisseur d'identité externe proposé à l'écran de connexion (Account/GetLoginProviders). */\r\nexport interface IExternalLoginProvider {\r\n /** Google, Microsoft ou Apple. */\r\n Provider: string;\r\n /** Identifiant de l'application chez le fournisseur. */\r\n ClientId: string;\r\n /** Microsoft seulement : locataire du point d'accès (common par défaut). */\r\n TenantId?: string;\r\n}\r\n\r\nexport class User implements IUserCredential {\r\n \r\n public AccessToken: string;\r\n public RefreshToken: string;\r\n public Username?: string;\r\n public FirstName?: string;\r\n public LastName?: string;\r\n public Email?: string;\r\n public PhoneNumber?: string;\r\n public IsAdmin?: boolean;\r\n public IsDelivery?: boolean;\r\n public IsPartner?: boolean;\r\n public Id?: number;\r\n public CompanyId?: number;\r\n public Permissions: string[];\r\n public ProfileImageUrl: string;\r\n public IsActive?: boolean;\r\n public IsPartnerActive?: boolean;\r\n public IsDeliveryActive?: boolean;\r\n public IsConnected: boolean = false;\r\n public AvatarUrl: string;\r\n \r\n public constructor(data: IUserCredential) {\r\n this.Username = data.Username;\r\n this.FirstName = data.FirstName;\r\n this.LastName = data.LastName;\r\n this.Email = data.Email;\r\n this.PhoneNumber = data.PhoneNumber;\r\n this.ProfileImageUrl = data.ProfileImageUrl;\r\n this.IsAdmin = data.IsAdmin;\r\n this.IsPartner = data.IsPartner;\r\n this.IsDelivery = data.IsDelivery;\r\n this.IsAdmin = data.IsAdmin;\r\n this.IsPartner = data.IsPartner;\r\n this.IsDelivery = data.IsDelivery;\r\n this.IsActive = data.IsActive;\r\n this.IsPartnerActive = data.IsPartnerActive;\r\n this.IsDeliveryActive = data.IsDeliveryActive;\r\n this.Id = data.Id;\r\n this.CompanyId = data.CompanyId;\r\n this.AccessToken = data.AccessToken;\r\n this.AvatarUrl = data.AvatarUrl;\r\n }\r\n \r\n\r\n public getName() {\r\n return this.FirstName + ' ' + this.LastName;\r\n }\r\n\r\n \r\n}\r\n\r\n\r\nexport interface INotification {\r\n id:string;\r\n content: string;\r\n class: string;\r\n link: string;\r\n entityType:string;\r\n entityId?:number;\r\n}\r\n \r\nexport class Notification implements INotification {\r\n public id:string;\r\n public content: string;\r\n public class: string;\r\n public link: string;\r\n public entityType:string;\r\n public entityId?:number\r\n public constructor(data: Partial<INotification> = {}) {\r\n this.id = data.id || '';\r\n this.content = data.content || '';\r\n this.class = data.class || '';\r\n this.link = data.link || '';\r\n this.entityType = data.entityType || '';\r\n this.entityId = data.entityId;\r\n }\r\n}\r\n\r\nexport class ChannelData<T> {\r\n Channel: string;\r\n Data: T;\r\n\r\n public constructor(channel: string, data: T) {\r\n this.Channel= channel;\r\n this.Data= data;\r\n }\r\n}\r\n\r\nexport class IMessage {\r\n Channel: string;\r\n Data: any;\r\n}\r\n\r\nexport class Message implements IMessage \r\n{\r\n Channel: string;\r\n Data: any;\r\n\r\n public constructor(channel: string, data: any) {\r\n this.Channel= channel;\r\n this.Data= data;\r\n }\r\n}\r\nexport interface NumberDictionary<T> {\r\n [Key: number]: T;\r\n}\r\nexport interface Dictionary<T> {\r\n [Key: string]: T;\r\n}\r\n\r\n\r\n\r\nexport class NumberDictionnaryWrapper<T> {\r\n\r\n dictionary: NumberDictionary<T> = {};\r\n get(key: number) {\r\n return this.dictionary[key];\r\n }\r\n\r\n containsKey(key: number) {\r\n if (typeof this.dictionary[key] === \"undefined\") {\r\n return false;\r\n }\r\n return true;\r\n }\r\n}\r\n\r\nexport class DictionnaryWrapper<T> {\r\n\r\n dictionary: Dictionary<T> = {};\r\n get(key: string) {\r\n return this.dictionary[key];\r\n }\r\n\r\n containsKey(key: string) {\r\n if (typeof this.dictionary[key] === \"undefined\") {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n getPartKey(key: string) {\r\n\r\n if (typeof this.dictionary[key] === \"undefined\" ) {\r\n let keyFound = Object.keys(this.dictionary).find(obj => key.includes(obj));\r\n if(keyFound) {\r\n key = keyFound\r\n }\r\n }\r\n\r\n return this.dictionary[key];\r\n }\r\n\r\n containsKeyOrPartKey(key: string) {\r\n let routeFound = Object.keys(this.dictionary).find(obj => key.includes(obj));\r\n \r\n if(!Utilities.IsNil(routeFound)){\r\n return true;\r\n }\r\n\r\n if (typeof this.dictionary[key] === \"undefined\" ) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n getValues() {\r\n return Object.keys(this.dictionary).map(key => this.dictionary[key]);\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n// export interface FilterDescriptor {\r\n// FieldValidators?: FieldValidators;\r\n// Label?: string;\r\n// FilterType?: FilterType;\r\n// PropertyName?: string;\r\n// DisplayMember?: string;\r\n// ValueMember?: string;\r\n// Data?: any;\r\n// Highlight?: boolean;\r\n// ToolTip?: string;\r\n// IsStatic?: boolean;\r\n// Required?: boolean;\r\n// NotDefaultRequired?: boolean;\r\n// ReadOnly?: boolean;\r\n// IsHidden?: boolean;\r\n// KeepPlace?: boolean;\r\n// IsConditioning?: boolean;\r\n// IsConditional?: boolean;\r\n// ConditioningField?: string;\r\n// ConditioningFieldValue?: number;\r\n// BoolConditioningFieldValue?: boolean;\r\n// OriginalData?: any;\r\n// CascadeDependency?: boolean;\r\n// CascadeDependencyProperty?: string;\r\n// FilterDistinct?: boolean;\r\n// MultipleSelection?: boolean;\r\n// HideSelected?: boolean;\r\n// ColumnSpan?: ColumnSpans;\r\n// ColumnIndex?: number;\r\n// InputType?: string;\r\n// CurrentFilters?: {};\r\n\r\n// ModalEntityKey?: string;\r\n// ModalPropertyName?: string;\r\n// ModalPropertyValue?: string;\r\n// ModalTitle?: string;\r\n// }\r\n\r\n\r\n\r\nexport interface SpecificSection {\r\n Name?: string,\r\n IconUrl?:string,\r\n Template?: Type<any> | TemplateRef<any> | ComponentRef<any> | any,\r\n Context?: {},\r\n Data?: any[],\r\n Component?: any,\r\n refreshFunction?: () => void\r\n}\r\nexport interface SectionError {\r\n Name?: string,\r\n FieldValidators?: FieldValidators;\r\n Errors?: string[]\r\n}\r\n\r\nexport interface IFilterDescriptorExtra {\r\n Field?: FilterDescriptor;\r\n DisplayedValue?: string;\r\n}\r\n\r\nexport interface TextZoneButtonEvent {\r\n Field: FieldDescriptor;\r\n Value: string;\r\n }\r\n \r\n export interface FieldEvent {\r\n Field: FieldDescriptor;\r\n Event: Event;\r\n }\r\n \r\n export interface EntityConfig {\r\n actions: ActionDescriptor[];\r\n columns: ColumnDescriptor[];\r\n emptyFilter: FilterViewModel;\r\n filterDescriptors: FilterDescriptor[];\r\n viewModel: EntityViewModelWithFields<EntityViewModel>;\r\n }\r\n\r\n // export interface CachedConfig {\r\n // timestamp: number;\r\n // config : EntityConfig;\r\n // }\r\n\r\n export interface PropertyEditorEvent {\r\n field: FieldDescriptor;\r\n value: any;\r\n type: 'value' | 'pending' | 'file' | 'selector' | 'button'| 'reset';\r\n }","export class HistoryItem {\r\n date: string;\r\n hour: string;\r\n url: string;\r\n icon1: string;\r\n menu1: string;\r\n icon2: string;\r\n menu2: string;\r\n}\r\n\r\nexport enum FilterOperator {\r\n Contains = 0,\r\n StartsWith = 1,\r\n EndsWith = 2,\r\n Equals = 3\r\n}\r\nexport interface FilterClause {\r\n PropertyName : string;\r\n FilterValue : string;\r\n Operator : FilterOperator\r\n}\r\n\r\nexport interface FilterRow {\r\n ClausesByPropertyName : Map<string, FilterClause>;\r\n}\r\n\r\nexport interface FilterQuery {\r\n Rows : FilterRow[];\r\n}\r\n\r\nexport enum CustomFieldTypes {\r\n String = 0,\r\n Integer = 1,\r\n Date = 2,\r\n ComboBox = 3,\r\n Checkbox = 4,\r\n Email = 5,\r\n WeekNumber = 6,\r\n Text = 7,\r\n Custom = 8,\r\n Number = 9,\r\n}"],"mappings":";;;;AASA,IAAa,kBAAb,MAAa,gBAAe;CAAf;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAe,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAf;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAe,SAAA,CAJhB,YAAY;EAAA,CAAA;CAAA;CAIX;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAe,SAAA,CA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cAAA,KAAA;CACA,eAAA,eAAA,gBAAA,KAAA;CACA,eAAA,eAAA,cAAA,KAAA;CACA,eAAA,eAAA,YAAA,KAAA;AACJ,EAAA,CALY,mBAAA,iBAAc,CAAA,EAAA;AAoB1B,IAAY;CAAZ,SAAY,kBAAgB;CACxB,iBAAA,iBAAA,YAAA,KAAA;CACA,iBAAA,iBAAA,aAAA,KAAA;CACA,iBAAA,iBAAA,UAAA,KAAA;CACA,iBAAA,iBAAA,cAAA,KAAA;CACA,iBAAA,iBAAA,cAAA,KAAA;CACA,iBAAA,iBAAA,WAAA,KAAA;CACA,iBAAA,iBAAA,gBAAA,KAAA;CACA,iBAAA,iBAAA,UAAA,KAAA;CACA,iBAAA,iBAAA,YAAA,KAAA;CACA,iBAAA,iBAAA,YAAA,KAAA;AACJ,EAAA,CAXY,qBAAA,mBAAgB,CAAA,EAAA"}
1
+ {"version":3,"file":"dflat-core-web-core-model.mjs","names":[],"sources":["../../core-model/src/lib/core-model.module.ts","../../core-model/src/lib/model/interface.generated.ts","../../core-model/src/lib/interface.ts","../../core-model/src/lib/model/model.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\n\r\n\r\n@NgModule({\r\n imports: [CommonModule],\r\n declarations: [],\r\n exports: []\r\n})\r\nexport class CoreModelModule {}\r\n","export interface ViewModel {\r\n}\r\n\r\nexport interface ExtendedProperty {\r\n EntityId? : number;\r\n FieldType? : number;\r\n PropertyId? : number;\r\n PropertyName? : string;\r\n Value? : string;\r\n}\r\n\r\nexport enum ValidatorTypes {\r\n None = 0,\r\n MaxLength = 1,\r\n MinLength = 2,\r\n Max = 4,\r\n Min = 8,\r\n Email = 16,\r\n Required = 32,\r\n Unicity = 64,\r\n Nullable = 128,\r\n}\r\n\r\nexport interface PagingViewModel {\r\n EnablePaging? : boolean;\r\n Offset? : number;\r\n SortColumn? : string;\r\n SortDirection? : string;\r\n SpecificSortClause? : string;\r\n Take? : number;\r\n}\r\n\r\nexport interface EntityViewModel extends ViewModel {\r\n ExtendedProperties? : ExtendedProperty[];\r\n Id? : number;\r\n IsEditable? : boolean;\r\n IsSelected? : boolean;\r\n IsStorable? : boolean;\r\n Name? : string;\r\n RowVersion? : Date;\r\n}\r\n\r\nexport interface TextWithStyle {\r\n GreenText? : string;\r\n RedText? : string;\r\n YellowText? : string;\r\n}\r\n\r\nexport interface INode {\r\n Childrens? : INode[];\r\n Code? : string;\r\n Description? : string;\r\n Id? : number;\r\n ParentId? : number;\r\n UniqueName? : string;\r\n}\r\n\r\nexport interface FilterViewModel extends PagingViewModel {\r\n AdditionalFilter? : string;\r\n AggregateClause? : string;\r\n BrandId? : number;\r\n CustomFieldIds? : string;\r\n Id? : number;\r\n IsCsvExport? : boolean;\r\n Keywords? : string;\r\n}\r\n\r\nexport enum FilterType {\r\n String = 0,\r\n Integer = 1,\r\n Date = 2,\r\n ComboBox = 3,\r\n CheckBox = 4,\r\n Email = 5,\r\n WeekNumber = 6,\r\n Text = 7,\r\n Custom = 8,\r\n RadioButton = 9,\r\n TextZoneWithButton = 10,\r\n HorizComboBox = 11,\r\n TextWithButton = 12,\r\n DropFileZone = 13,\r\n DateTime = 14,\r\n Password = 15,\r\n TreeSelector = 16,\r\n Decimal = 17,\r\n}\r\n\r\nexport interface FieldValidators {\r\n MaxLength? : number;\r\n MaxValue? : number;\r\n MinValue? : number;\r\n ValidatorType? : ValidatorTypes;\r\n}\r\n\r\nexport enum ConditionalResults {\r\n Hide = 0,\r\n ReadOnly = 1,\r\n}\r\n\r\nexport enum ColumnSpans {\r\n Single = 0,\r\n Full = 1,\r\n}\r\n\r\nexport interface FieldDescriptor {\r\n BoolConditioningFieldValue? : boolean;\r\n ButtonLabel? : string;\r\n CascadeDependency? : boolean;\r\n CascadeDependencyProperty? : string;\r\n ColumnIndex? : number;\r\n ColumnSpan? : ColumnSpans;\r\n ConditionalResult? : ConditionalResults;\r\n ConditioningField? : string;\r\n ConditioningFieldValue? : number[];\r\n CurrentFilters? : any;\r\n Data? : any;\r\n DataFilter? : FilterViewModel;\r\n Description? : string;\r\n DisplayMember? : string;\r\n ExportPropertyName? : string;\r\n FieldValidators? : FieldValidators;\r\n FilterDistinct? : boolean;\r\n FilterType? : FilterType;\r\n HideSelected? : boolean;\r\n Highlight? : boolean;\r\n InputType? : string;\r\n IsClearable? : boolean;\r\n IsConditional? : boolean;\r\n IsConditioning? : boolean;\r\n IsExtendedProperty? : boolean;\r\n IsHidden? : boolean;\r\n IsStatic? : boolean;\r\n KeepPlace? : boolean;\r\n Label? : string;\r\n ModalEntityKey? : string;\r\n ModalOnly? : boolean;\r\n ModalPropertyName? : string;\r\n ModalPropertyValue? : string;\r\n ModalTitle? : string;\r\n ModalTriggerIdProperty? : string;\r\n ModalTriggerIdPropertyValue? : string;\r\n MultipleSelection? : boolean;\r\n NotDefaultRequired? : boolean;\r\n OriginalData? : any;\r\n PropertyLength? : number;\r\n PropertyName? : string;\r\n ReadOnly? : boolean;\r\n Required? : boolean;\r\n TextWithStyle? : TextWithStyle;\r\n ToolTip? : string;\r\n ValueMember? : string;\r\n}\r\n\r\nexport interface EntityFilterViewModel<T> extends FilterViewModel {\r\n}\r\n\r\nexport enum ApiErrorTypes {\r\n Unknown = 0,\r\n DatabaseError = 1,\r\n SystemError = 2,\r\n UserError = 3,\r\n}\r\n\r\nexport interface TreeItem<T> {\r\n checked? : boolean;\r\n children? : TreeItem<T>[];\r\n childrenCount? : number;\r\n text? : string;\r\n value? : number;\r\n}\r\n\r\nexport interface Section {\r\n FieldViewModels? : FieldDescriptor[];\r\n IsCustomFieldSection? : boolean;\r\n IsFileSection? : boolean;\r\n IsTrackRecordSection? : boolean;\r\n Name? : string;\r\n}\r\n\r\nexport interface Display {\r\n baseUrl? : string;\r\n completingCaracter? : string;\r\n currency? : string;\r\n enumMap? : string[];\r\n format? : string;\r\n handleError? : boolean;\r\n imagePath? : string;\r\n imgBase? : string;\r\n multiplier? : number;\r\n nullCaseText? : string;\r\n sourceProperty? : string;\r\n type? : string;\r\n width? : number;\r\n}\r\n\r\nexport interface BasicNode {\r\n Childrens? : INode[];\r\n Code? : string;\r\n Description? : string;\r\n Id? : number;\r\n ParentId? : number;\r\n UniqueName? : string;\r\n}\r\n\r\nexport interface ApiError {\r\n ApiErrorType? : ApiErrorTypes;\r\n ErrorCode? : number;\r\n Message? : string;\r\n StackTrace? : string;\r\n}\r\n\r\nexport enum ActionDisplay {\r\n Button = 0,\r\n TextAndButton = 1,\r\n}\r\n\r\n\r\nexport interface TabToSave<TResult> {\r\n Data? : TResult[];\r\n TitleOfTab? : string;\r\n}\r\n\r\nexport interface SaveResult {\r\n DisplayMessage? : boolean;\r\n Error? : ApiError;\r\n ErrorMessage? : string;\r\n Id? : number;\r\n RowVersion? : Date;\r\n Success? : boolean;\r\n Warnings? : string[];\r\n}\r\n\r\nexport interface ColumnDescriptor {\r\n Display? : Display;\r\n Expression? : string;\r\n FieldName? : string;\r\n IsComputed? : boolean;\r\n IsFilterEnabled? : boolean;\r\n IsNumericExpression? : boolean;\r\n Name? : string;\r\n Property? : string;\r\n TableAlias? : string;\r\n ToolTipProperty? : string;\r\n}\r\n\r\nexport interface AggregationValue {\r\n Key? : string;\r\n Value? : any;\r\n}\r\n\r\nexport interface ActionDescriptor {\r\n ActionDisplay? : ActionDisplay;\r\n Description? : string;\r\n FormDescriptor? : Section[];\r\n Icon? : string;\r\n IconUrl? : string;\r\n Label? : string;\r\n Name? : string;\r\n RequestType? : string;\r\n}\r\n\r\nexport interface TrackRecordProperty {\r\n CreatedBy? : string;\r\n CreationDate? : Date;\r\n CreationDateString? : string;\r\n Id? : number;\r\n ModificationDate? : Date;\r\n ModificationDateString? : string;\r\n ModifiedBy? : string;\r\n}\r\n\r\nexport interface SaveResults<TResult> extends SaveResult {\r\n SaveErrorEntities? : TResult[];\r\n}\r\n\r\nexport interface RunActionContext {\r\n Action? : ActionDescriptor;\r\n CorrelationId? : string;\r\n EntityIds? : number[];\r\n EntityKey? : string;\r\n File? : any;\r\n FileId? : number;\r\n FormValue? : any;\r\n RequestId? : number;\r\n}\r\n\r\nexport interface PagedList<T> {\r\n Aggregates? : AggregationValue[];\r\n Skip? : number;\r\n Take? : number;\r\n TotalRowCount? : number;\r\n Values? : T[];\r\n}\r\n\r\nexport enum ImageFormats {\r\n Undefined = 0,\r\n JPG = 1,\r\n PNG = 2,\r\n GIF = 3,\r\n TIFF = 4,\r\n BMP = 5,\r\n SVG = 6,\r\n}\r\n\r\nexport interface FilterDescriptor extends FieldDescriptor {\r\n DisplayImage? : boolean;\r\n}\r\n\r\nexport interface ExportModel<T> {\r\n Columns? : ColumnDescriptor[];\r\n Filter? : T;\r\n}\r\n\r\nexport interface EntityWithSpecifics<TResult> {\r\n Entity? : TResult;\r\n Tabs? : TabToSave<TResult>[];\r\n}\r\n\r\nexport interface EntityViewModelWithFields<T> {\r\n FieldSections? : Section[];\r\n HiddenSections? : string[];\r\n SpecificSection? : any;\r\n ViewModel? : T;\r\n}\r\n\r\nexport enum TextSearch {\r\n Contains = 0,\r\n StartsWith = 1,\r\n EndsWith = 2,\r\n}\r\n\r\nexport enum ExportType {\r\n CSV = 0,\r\n EXCEL = 1,\r\n}\r\n\r\nexport enum AggregateFunction {\r\n Count = 0,\r\n Sum = 1,\r\n Min = 2,\r\n Max = 3,\r\n Avg = 4,\r\n}\r\n\r\nexport enum ActionResultStatus {\r\n OK = 0,\r\n KO = 1,\r\n}\r\n\r\n","import { Utilities } from '@dflat-core/web/core';\r\nimport { ComponentRef, TemplateRef, Type } from '@angular/core';\r\n\r\nimport { ActionDescriptor, ColumnDescriptor, EntityViewModel, EntityViewModelWithFields, FieldDescriptor, FieldValidators, FilterDescriptor, FilterViewModel } from './model/interface.generated';\r\n\r\nexport interface IIdentifiable {\r\n Id?: number;\r\n}\r\n\r\nexport class UserUpdatedMessage {\r\n constructor(public userKey: string) { }\r\n}\r\n\r\nexport interface IUserCredential extends IIdentifiable {\r\n AccessToken: string; \r\n RefreshToken: string; \r\n Username?: string; \r\n FirstName?: string; \r\n LastName?: string;\r\n Email?: string;\r\n IsAdmin?: boolean;\r\n IsDelivery?: boolean;\r\n IsPartner?: boolean;\r\n PhoneNumber?: string;\r\n IsActive?: boolean;\r\n IsPartnerActive?: boolean;\r\n IsDeliveryActive?: boolean;\r\n\r\n Id?: number;\r\n CompanyId?: number;\r\n Permissions: string[];\r\n ProfileImageUrl: string;\r\n AvatarUrl: string;\r\n\r\n}\r\n/** Fournisseur d'identité externe proposé à l'écran de connexion (Account/GetLoginProviders). */\r\nexport interface IExternalLoginProvider {\r\n /** Google, Microsoft ou Apple. */\r\n Provider: string;\r\n /** Identifiant de l'application chez le fournisseur. */\r\n ClientId: string;\r\n /** Microsoft seulement : locataire du point d'accès (common par défaut). */\r\n TenantId?: string;\r\n}\r\n\r\nexport class User implements IUserCredential {\r\n \r\n public AccessToken: string;\r\n public RefreshToken: string;\r\n public Username?: string;\r\n public FirstName?: string;\r\n public LastName?: string;\r\n public Email?: string;\r\n public PhoneNumber?: string;\r\n public IsAdmin?: boolean;\r\n public IsDelivery?: boolean;\r\n public IsPartner?: boolean;\r\n public Id?: number;\r\n public CompanyId?: number;\r\n public Permissions: string[];\r\n public ProfileImageUrl: string;\r\n public IsActive?: boolean;\r\n public IsPartnerActive?: boolean;\r\n public IsDeliveryActive?: boolean;\r\n public IsConnected: boolean = false;\r\n public AvatarUrl: string;\r\n \r\n public constructor(data: IUserCredential) {\r\n this.Username = data.Username;\r\n this.FirstName = data.FirstName;\r\n this.LastName = data.LastName;\r\n this.Email = data.Email;\r\n this.PhoneNumber = data.PhoneNumber;\r\n this.ProfileImageUrl = data.ProfileImageUrl;\r\n this.IsAdmin = data.IsAdmin;\r\n this.IsPartner = data.IsPartner;\r\n this.IsDelivery = data.IsDelivery;\r\n this.IsAdmin = data.IsAdmin;\r\n this.IsPartner = data.IsPartner;\r\n this.IsDelivery = data.IsDelivery;\r\n this.IsActive = data.IsActive;\r\n this.IsPartnerActive = data.IsPartnerActive;\r\n this.IsDeliveryActive = data.IsDeliveryActive;\r\n this.Id = data.Id;\r\n this.CompanyId = data.CompanyId;\r\n this.AccessToken = data.AccessToken;\r\n this.AvatarUrl = data.AvatarUrl;\r\n }\r\n \r\n\r\n public getName() {\r\n return this.FirstName + ' ' + this.LastName;\r\n }\r\n\r\n \r\n}\r\n\r\n\r\nexport interface INotification {\r\n id:string;\r\n content: string;\r\n class: string;\r\n link: string;\r\n entityType:string;\r\n entityId?:number;\r\n}\r\n \r\nexport class Notification implements INotification {\r\n public id:string;\r\n public content: string;\r\n public class: string;\r\n public link: string;\r\n public entityType:string;\r\n public entityId?:number\r\n public constructor(data: Partial<INotification> = {}) {\r\n this.id = data.id || '';\r\n this.content = data.content || '';\r\n this.class = data.class || '';\r\n this.link = data.link || '';\r\n this.entityType = data.entityType || '';\r\n this.entityId = data.entityId;\r\n }\r\n}\r\n\r\nexport class ChannelData<T> {\r\n Channel: string;\r\n Data: T;\r\n\r\n public constructor(channel: string, data: T) {\r\n this.Channel= channel;\r\n this.Data= data;\r\n }\r\n}\r\n\r\nexport class IMessage {\r\n Channel: string;\r\n Data: any;\r\n}\r\n\r\nexport class Message implements IMessage \r\n{\r\n Channel: string;\r\n Data: any;\r\n\r\n public constructor(channel: string, data: any) {\r\n this.Channel= channel;\r\n this.Data= data;\r\n }\r\n}\r\nexport interface NumberDictionary<T> {\r\n [Key: number]: T;\r\n}\r\nexport interface Dictionary<T> {\r\n [Key: string]: T;\r\n}\r\n\r\n\r\n\r\nexport class NumberDictionnaryWrapper<T> {\r\n\r\n dictionary: NumberDictionary<T> = {};\r\n get(key: number) {\r\n return this.dictionary[key];\r\n }\r\n\r\n containsKey(key: number) {\r\n if (typeof this.dictionary[key] === \"undefined\") {\r\n return false;\r\n }\r\n return true;\r\n }\r\n}\r\n\r\nexport class DictionnaryWrapper<T> {\r\n\r\n dictionary: Dictionary<T> = {};\r\n get(key: string) {\r\n return this.dictionary[key];\r\n }\r\n\r\n containsKey(key: string) {\r\n if (typeof this.dictionary[key] === \"undefined\") {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n getPartKey(key: string) {\r\n\r\n if (typeof this.dictionary[key] === \"undefined\" ) {\r\n let keyFound = Object.keys(this.dictionary).find(obj => key.includes(obj));\r\n if(keyFound) {\r\n key = keyFound\r\n }\r\n }\r\n\r\n return this.dictionary[key];\r\n }\r\n\r\n containsKeyOrPartKey(key: string) {\r\n let routeFound = Object.keys(this.dictionary).find(obj => key.includes(obj));\r\n \r\n if(!Utilities.IsNil(routeFound)){\r\n return true;\r\n }\r\n\r\n if (typeof this.dictionary[key] === \"undefined\" ) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n getValues() {\r\n return Object.keys(this.dictionary).map(key => this.dictionary[key]);\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n// export interface FilterDescriptor {\r\n// FieldValidators?: FieldValidators;\r\n// Label?: string;\r\n// FilterType?: FilterType;\r\n// PropertyName?: string;\r\n// DisplayMember?: string;\r\n// ValueMember?: string;\r\n// Data?: any;\r\n// Highlight?: boolean;\r\n// ToolTip?: string;\r\n// IsStatic?: boolean;\r\n// Required?: boolean;\r\n// NotDefaultRequired?: boolean;\r\n// ReadOnly?: boolean;\r\n// IsHidden?: boolean;\r\n// KeepPlace?: boolean;\r\n// IsConditioning?: boolean;\r\n// IsConditional?: boolean;\r\n// ConditioningField?: string;\r\n// ConditioningFieldValue?: number;\r\n// BoolConditioningFieldValue?: boolean;\r\n// OriginalData?: any;\r\n// CascadeDependency?: boolean;\r\n// CascadeDependencyProperty?: string;\r\n// FilterDistinct?: boolean;\r\n// MultipleSelection?: boolean;\r\n// HideSelected?: boolean;\r\n// ColumnSpan?: ColumnSpans;\r\n// ColumnIndex?: number;\r\n// InputType?: string;\r\n// CurrentFilters?: {};\r\n\r\n// ModalEntityKey?: string;\r\n// ModalPropertyName?: string;\r\n// ModalPropertyValue?: string;\r\n// ModalTitle?: string;\r\n// }\r\n\r\n\r\n\r\nexport interface SpecificSection {\r\n Name?: string,\r\n IconUrl?:string,\r\n Template?: Type<any> | TemplateRef<any> | ComponentRef<any> | any,\r\n Context?: {},\r\n Data?: any[],\r\n Component?: any,\r\n refreshFunction?: () => void\r\n}\r\nexport interface SectionError {\r\n Name?: string,\r\n FieldValidators?: FieldValidators;\r\n Errors?: string[]\r\n}\r\n\r\nexport interface IFilterDescriptorExtra {\r\n Field?: FilterDescriptor;\r\n DisplayedValue?: string;\r\n}\r\n\r\nexport interface TextZoneButtonEvent {\r\n Field: FieldDescriptor;\r\n Value: string;\r\n }\r\n \r\n export interface FieldEvent {\r\n Field: FieldDescriptor;\r\n Event: Event;\r\n }\r\n \r\n export interface EntityConfig {\r\n actions: ActionDescriptor[];\r\n columns: ColumnDescriptor[];\r\n emptyFilter: FilterViewModel;\r\n filterDescriptors: FilterDescriptor[];\r\n viewModel: EntityViewModelWithFields<EntityViewModel>;\r\n }\r\n\r\n // export interface CachedConfig {\r\n // timestamp: number;\r\n // config : EntityConfig;\r\n // }\r\n\r\n export interface PropertyEditorEvent {\r\n field: FieldDescriptor;\r\n value: any;\r\n type: 'value' | 'pending' | 'file' | 'selector' | 'button'| 'reset';\r\n }","export class HistoryItem {\r\n date: string;\r\n hour: string;\r\n url: string;\r\n icon1: string;\r\n menu1: string;\r\n icon2: string;\r\n menu2: string;\r\n}\r\n\r\nexport enum FilterOperator {\r\n Contains = 0,\r\n StartsWith = 1,\r\n EndsWith = 2,\r\n Equals = 3\r\n}\r\nexport interface FilterClause {\r\n PropertyName : string;\r\n FilterValue : string;\r\n Operator : FilterOperator\r\n}\r\n\r\nexport interface FilterRow {\r\n ClausesByPropertyName : Map<string, FilterClause>;\r\n}\r\n\r\nexport interface FilterQuery {\r\n Rows : FilterRow[];\r\n}\r\n\r\nexport enum CustomFieldTypes {\r\n String = 0,\r\n Integer = 1,\r\n Date = 2,\r\n ComboBox = 3,\r\n Checkbox = 4,\r\n Email = 5,\r\n WeekNumber = 6,\r\n Text = 7,\r\n Custom = 8,\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,OAAO,KAAK,WAAW;CAC3B;CAEA,qBAAqB,KAAW;EAC5B,IAAI,aAAa,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,MAAK,QAAO,IAAI,SAAS,GAAG,CAAC;EAE3E,IAAG,CAAC,UAAU,MAAM,UAAU,GAC1B,OAAO;EAGX,IAAI,OAAO,KAAK,WAAW,SAAS,aAChC,OAAO;EAEX,OAAO;CACX;CAEA,YAAS;EACL,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,KAAI,QAAO,KAAK,WAAW,IAAI;CACvE;AACH;ACvND,IAAa,cAAb,MAAwB,CAQvB;AAED,IAAY;CAAZ,SAAY,gBAAc;CACtB,eAAA,eAAA,cAAA,KAAA;CACA,eAAA,eAAA,gBAAA,KAAA;CACA,eAAA,eAAA,cAAA,KAAA;CACA,eAAA,eAAA,YAAA,KAAA;AACJ,EAAA,CALY,mBAAA,iBAAc,CAAA,EAAA;AAoB1B,IAAY;CAAZ,SAAY,kBAAgB;CACxB,iBAAA,iBAAA,YAAA,KAAA;CACA,iBAAA,iBAAA,aAAA,KAAA;CACA,iBAAA,iBAAA,UAAA,KAAA;CACA,iBAAA,iBAAA,cAAA,KAAA;CACA,iBAAA,iBAAA,cAAA,KAAA;CACA,iBAAA,iBAAA,WAAA,KAAA;CACA,iBAAA,iBAAA,gBAAA,KAAA;CACA,iBAAA,iBAAA,UAAA,KAAA;CACA,iBAAA,iBAAA,YAAA,KAAA;CACA,iBAAA,iBAAA,YAAA,KAAA;AACJ,EAAA,CAXY,qBAAA,mBAAgB,CAAA,EAAA"}
@@ -2163,6 +2163,7 @@ var SectionContext = class SectionContext {
2163
2163
  facade.layout.setShowFilterButton(false);
2164
2164
  };
2165
2165
  this.relatedSections = /* @__PURE__ */ new Set();
2166
+ this.hiddenSections = /* @__PURE__ */ new Set();
2166
2167
  this.renderedSections = /* @__PURE__ */ new Set();
2167
2168
  this.lastSelected = [];
2168
2169
  this.extendedPropertiesSubject = new Subject();
@@ -2196,7 +2197,11 @@ var SectionContext = class SectionContext {
2196
2197
  const key = SectionContext.getEntityKey(template);
2197
2198
  if (this.sections.some((s) => s.Name === name || !this.relatedSections.has(s.Name) && !Utilities.IsNil(key) && SectionContext.getEntityKey(s.Template) === key)) return;
2198
2199
  this.relatedSections.add(name);
2199
- this.registerSection(name, template, { filterOverride: filterFromId(filterProperty) });
2200
+ const section = this.registerSection(name, template, { filterOverride: filterFromId(filterProperty) });
2201
+ section.IsVisible = !this.isHidden(name);
2202
+ }
2203
+ isHidden(name) {
2204
+ return this.relatedSections.has(name) && this.hiddenSections.has(name);
2200
2205
  }
2201
2206
  static getEntityKey(template) {
2202
2207
  try {
@@ -2244,6 +2249,8 @@ var SectionContext = class SectionContext {
2244
2249
  }
2245
2250
  setViewModel(vm) {
2246
2251
  this.viewModel = vm;
2252
+ this.hiddenSections = new Set(vm?.HiddenSections ?? []);
2253
+ this.sections.filter((s) => this.isHidden(s.Name)).forEach((s) => s.IsVisible = false);
2247
2254
  }
2248
2255
  handleSelectionChanged(selected) {
2249
2256
  if (this.lastSelected.length > 0 && this.lastSelected[0].Id != selected[0].Id) this.sections.forEach((s) => {
@@ -2271,7 +2278,7 @@ var SectionContext = class SectionContext {
2271
2278
  const activeSection = this.sections[activeTab - 1];
2272
2279
  this.sections = this.sections.map((section) => {
2273
2280
  let isVisible = section.Config.show ? section.Config.show(selected) : true;
2274
- isVisible = isVisible && !this.selection.isNewEntity();
2281
+ isVisible = isVisible && !this.selection.isNewEntity() && !this.isHidden(section.Name);
2275
2282
  section.IsVisible = isVisible;
2276
2283
  if (!isVisible && activeSection == section) hasHiddenSection = true;
2277
2284
  return section;