@dflat-core/web 1.0.60 → 1.0.62
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/dflat-core-web-core-model.mjs +23 -1
- package/fesm2022/dflat-core-web-core-model.mjs.map +1 -1
- package/fesm2022/dflat-core-web-core-services.mjs +15 -1
- package/fesm2022/dflat-core-web-core-services.mjs.map +1 -1
- package/fesm2022/dflat-core-web-core-ux-testing.mjs +8 -0
- package/fesm2022/dflat-core-web-core-ux-testing.mjs.map +1 -1
- package/fesm2022/dflat-core-web-core-ux.mjs +154 -5
- package/fesm2022/dflat-core-web-core-ux.mjs.map +1 -1
- package/fesm2022/dflat-core-web-system-data.mjs +10 -0
- package/fesm2022/dflat-core-web-system-data.mjs.map +1 -1
- package/fesm2022/dflat-core-web-system-model.mjs.map +1 -1
- package/fesm2022/dflat-core-web-system-root.mjs +1 -21
- package/fesm2022/dflat-core-web-system-root.mjs.map +1 -1
- package/fesm2022/dflat-core-web-system-ux.mjs +2821 -1022
- package/fesm2022/dflat-core-web-system-ux.mjs.map +1 -1
- package/package.json +1 -1
- package/types/dflat-core-web-core-model.d.ts +38 -0
- package/types/dflat-core-web-core-services.d.ts +7 -1
- package/types/dflat-core-web-core-ux-testing.d.ts +8 -0
- package/types/dflat-core-web-core-ux.d.ts +108 -1
- package/types/dflat-core-web-system-data.d.ts +4 -2
- package/types/dflat-core-web-system-model.d.ts +103 -73
- package/types/dflat-core-web-system-root.d.ts +0 -2
- package/types/dflat-core-web-system-ux.d.ts +543 -226
|
@@ -140,6 +140,28 @@ var UserUpdatedMessage = class {
|
|
|
140
140
|
this.userKey = userKey;
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
|
+
var PresentationChangedMessage = class {
|
|
144
|
+
constructor(entityName, stamp) {
|
|
145
|
+
this.entityName = entityName;
|
|
146
|
+
this.stamp = stamp;
|
|
147
|
+
}
|
|
148
|
+
concerns(entityKey) {
|
|
149
|
+
if (this.entityName === null || this.entityName === void 0 || this.entityName === "") return true;
|
|
150
|
+
const normalize = (name) => (name ?? "").toLowerCase().replace(/view$/, "");
|
|
151
|
+
return normalize(this.entityName) === normalize(entityKey);
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
var FormChangedMessage = class {
|
|
155
|
+
constructor(entityName, stamp) {
|
|
156
|
+
this.entityName = entityName;
|
|
157
|
+
this.stamp = stamp;
|
|
158
|
+
}
|
|
159
|
+
concerns(entityKey) {
|
|
160
|
+
if (this.entityName === null || this.entityName === void 0 || this.entityName === "") return true;
|
|
161
|
+
const normalize = (name) => (name ?? "").toLowerCase().replace(/view$/, "");
|
|
162
|
+
return normalize(this.entityName) === normalize(entityKey);
|
|
163
|
+
}
|
|
164
|
+
};
|
|
143
165
|
var User = class {
|
|
144
166
|
constructor(data) {
|
|
145
167
|
this.IsConnected = false;
|
|
@@ -251,6 +273,6 @@ var CustomFieldTypes;
|
|
|
251
273
|
CustomFieldTypes[CustomFieldTypes["Custom"] = 8] = "Custom";
|
|
252
274
|
CustomFieldTypes[CustomFieldTypes["Number"] = 9] = "Number";
|
|
253
275
|
})(CustomFieldTypes || (CustomFieldTypes = {}));
|
|
254
|
-
export { ActionDisplay, ActionResultStatus, AggregateFunction, ApiErrorTypes, ChannelData, ColumnSpans, ConditionalResults, CoreModelModule, CustomFieldTypes, DictionnaryWrapper, ExportType, FilterOperator, FilterType, HistoryItem, IMessage, ImageFormats, Message, Notification, NumberDictionnaryWrapper, TextSearch, User, UserUpdatedMessage, ValidatorTypes };
|
|
276
|
+
export { ActionDisplay, ActionResultStatus, AggregateFunction, ApiErrorTypes, ChannelData, ColumnSpans, ConditionalResults, CoreModelModule, CustomFieldTypes, DictionnaryWrapper, ExportType, FilterOperator, FilterType, FormChangedMessage, HistoryItem, IMessage, ImageFormats, Message, Notification, NumberDictionnaryWrapper, PresentationChangedMessage, TextSearch, User, UserUpdatedMessage, ValidatorTypes };
|
|
255
277
|
|
|
256
278
|
//# sourceMappingURL=dflat-core-web-core-model.mjs.map
|
|
@@ -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 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,\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,CAJhB,YAAY;EAAA,CAAA;CAAA;;AAIX,GAAA,yBAAA;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A,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\n/**\r\n * Message du bus : un profil de présentation partagé (par défaut, par rôle ou par fournisseur) a\r\n * été modifié (signal PresentationChanged du hub, envoyé par le serveur après son enregistrement).\r\n * Le cache d'initialisation de l'entité est vidé et les grilles ouvertes rechargent leurs colonnes.\r\n */\r\nexport class PresentationChangedMessage {\r\n /**\r\n * @param entityName Nom de l'entité du profil (ex. Company), ou null : toutes les entités.\r\n * @param stamp Nouvel horodatage du cache client annoncé par le serveur.\r\n */\r\n constructor(public entityName: string | null, public stamp?: number) { }\r\n\r\n /**\r\n * Vrai si le message concerne l'écran de clé entityKey : même nom sans tenir compte de la\r\n * casse ni du suffixe View (un écran porte sur la table ou sur sa vue principale).\r\n */\r\n concerns(entityKey: string): boolean {\r\n if (this.entityName === null || this.entityName === undefined || this.entityName === '') {\r\n return true;\r\n }\r\n const normalize = (name: string) => (name ?? '').toLowerCase().replace(/view$/, '');\r\n return normalize(this.entityName) === normalize(entityKey);\r\n }\r\n}\r\n\r\n/**\r\n * Message du bus : un formulaire enregistré en base a été modifié (signal FormChanged du hub,\r\n * envoyé par le serveur après l'enregistrement d'un formulaire, d'une section ou d'un champ).\r\n * Le cache d'initialisation de l'entité est vidé et les écrans ouverts rechargent leur formulaire.\r\n */\r\nexport class FormChangedMessage {\r\n /**\r\n * @param entityName Nom de l'entité du formulaire (ex. Country), ou null : tous les formulaires.\r\n * @param stamp Nouvel horodatage du cache client annoncé par le serveur.\r\n */\r\n constructor(public entityName: string | null, public stamp?: number) { }\r\n\r\n /**\r\n * Vrai si le message concerne l'écran de clé entityKey : même nom sans tenir compte de la\r\n * casse ni du suffixe View (un écran porte sur la table ou sur sa vue principale).\r\n */\r\n concerns(entityKey: string): boolean {\r\n if (this.entityName === null || this.entityName === undefined || this.entityName === '') {\r\n return true;\r\n }\r\n const normalize = (name: string) => (name ?? '').toLowerCase().replace(/view$/, '');\r\n return normalize(this.entityName) === normalize(entityKey);\r\n }\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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AA,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,6 +1,6 @@
|
|
|
1
1
|
import * as i7 from "@dflat-core/web/core";
|
|
2
2
|
import { EnsureModuleLoadedOnceGuard, Utilities } from "@dflat-core/web/core";
|
|
3
|
-
import { ApiErrorTypes, CoreModelModule, DictionnaryWrapper, Notification, User, UserUpdatedMessage } from "@dflat-core/web/core-model";
|
|
3
|
+
import { ApiErrorTypes, CoreModelModule, DictionnaryWrapper, FormChangedMessage, Notification, PresentationChangedMessage, User, UserUpdatedMessage } from "@dflat-core/web/core-model";
|
|
4
4
|
import { CommonModule } from "@angular/common";
|
|
5
5
|
import * as i3 from "@angular/common/http";
|
|
6
6
|
import { HttpErrorResponse, HttpHeaders, provideHttpClient, withInterceptorsFromDi, withXhr } from "@angular/common/http";
|
|
@@ -1536,6 +1536,12 @@ var HubService = class HubService {
|
|
|
1536
1536
|
});
|
|
1537
1537
|
this.publishEvents(notif);
|
|
1538
1538
|
});
|
|
1539
|
+
this.hubConnection.on("FormChanged", (entityName, stamp) => {
|
|
1540
|
+
this.busMsg.publish(new FormChangedMessage(entityName, stamp));
|
|
1541
|
+
});
|
|
1542
|
+
this.hubConnection.on("PresentationChanged", (entityName, stamp) => {
|
|
1543
|
+
this.busMsg.publish(new PresentationChangedMessage(entityName, stamp));
|
|
1544
|
+
});
|
|
1539
1545
|
this.hubConnection.onclose((e) => {
|
|
1540
1546
|
console.log(`Hub connection closed !`);
|
|
1541
1547
|
this.isConnected = false;
|
|
@@ -1603,6 +1609,8 @@ var InitCacheService = class InitCacheService {
|
|
|
1603
1609
|
this.entries = /* @__PURE__ */ new Map();
|
|
1604
1610
|
this.stamp = this.readStamp(localStorage.getDataObject(AppKeys.ACCESS_TOKEN));
|
|
1605
1611
|
busMsg.of(UserUpdatedMessage).subscribe((message) => this.onTokenChanged(message.userKey));
|
|
1612
|
+
busMsg.of(PresentationChangedMessage).subscribe((message) => this.onPresentationChanged(message));
|
|
1613
|
+
busMsg.of(FormChangedMessage).subscribe((message) => this.onFormChanged(message));
|
|
1606
1614
|
}
|
|
1607
1615
|
get(key, factory) {
|
|
1608
1616
|
let entry = this.entries.get(key);
|
|
@@ -1622,6 +1630,12 @@ var InitCacheService = class InitCacheService {
|
|
|
1622
1630
|
}
|
|
1623
1631
|
Array.from(this.entries.keys()).filter((key) => key.startsWith(prefix)).forEach((key) => this.entries.delete(key));
|
|
1624
1632
|
}
|
|
1633
|
+
onFormChanged(message) {
|
|
1634
|
+
Array.from(this.entries.keys()).filter((key) => message.concerns(key.split("/")[0])).forEach((key) => this.entries.delete(key));
|
|
1635
|
+
}
|
|
1636
|
+
onPresentationChanged(message) {
|
|
1637
|
+
Array.from(this.entries.keys()).filter((key) => message.concerns(key.split("/")[0])).forEach((key) => this.entries.delete(key));
|
|
1638
|
+
}
|
|
1625
1639
|
onTokenChanged(token) {
|
|
1626
1640
|
const stamp = this.readStamp(token);
|
|
1627
1641
|
if (stamp !== this.stamp) {
|