Refactor SDK Api Changes Side affects ...
This commit is contained in:
+12
-12
@@ -1,17 +1,17 @@
|
||||
import {
|
||||
UserGuard,
|
||||
AgentGuard,
|
||||
AdminGuard,
|
||||
AdminOrAgentGuard,
|
||||
XMabsutApiSdkModule,
|
||||
X_MABSUT_API_SDK_CONFIG,
|
||||
XPushTokenFetcherService,
|
||||
} from 'x-mabsut-api-sdk';
|
||||
import {
|
||||
XCanDeactivateGuard,
|
||||
XFrameworkCoreModule,
|
||||
X_FRAMEWORK_CORE_CONFIG,
|
||||
} from 'x-framework-core';
|
||||
import {
|
||||
UserGuard,
|
||||
AgentGuard,
|
||||
AdminGuard,
|
||||
AdminOrAgentGuard,
|
||||
XSaherElmApiSdkModule,
|
||||
XPushTokenFetcherService,
|
||||
X_SAHERELM_API_SDK_CONFIG,
|
||||
} from 'x-saherelm-api-sdk';
|
||||
import {
|
||||
XManagerService,
|
||||
XFrameworkServicesModule,
|
||||
@@ -68,8 +68,8 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
SharedModule,
|
||||
BrowserModule,
|
||||
AppRoutingModule,
|
||||
XMabsutApiSdkModule,
|
||||
XFrameworkCoreModule,
|
||||
XSaherElmApiSdkModule,
|
||||
IonicModule.forRoot(),
|
||||
BrowserAnimationsModule,
|
||||
XFrameworkServicesModule,
|
||||
@@ -122,7 +122,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
useValue: XCONFIG,
|
||||
},
|
||||
{
|
||||
provide: X_MABSUT_API_SDK_CONFIG,
|
||||
provide: X_SAHERELM_API_SDK_CONFIG,
|
||||
useValue: XCONFIG,
|
||||
},
|
||||
{
|
||||
@@ -154,4 +154,4 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
],
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
export class AppModule { }
|
||||
export class AppModule {}
|
||||
|
||||
@@ -9,8 +9,8 @@ import {
|
||||
} from 'x-framework-identity-sdk';
|
||||
import { Pages } from './page.config';
|
||||
import { LogLevel } from '@microsoft/signalr';
|
||||
import { XMabsutApiSDKConfig } from 'x-mabsut-api-sdk';
|
||||
import { NotificationAudioSources } from './audio.config';
|
||||
import { XSaherElmApiSDKConfig } from 'x-saherelm-api-sdk';
|
||||
import { XFrameworkCoreConfig, XPage } from 'x-framework-core';
|
||||
import { XFrameworkServicesConfig } from 'x-framework-services';
|
||||
import { XFrameworkComponentsConfig } from 'x-framework-components';
|
||||
@@ -39,7 +39,7 @@ export type XFrameworkIdentitySDKSharedConfig =
|
||||
Partial<XFrameworkIdentitySDKConfig>;
|
||||
export type XFrameworkPushServiceSharedConfig =
|
||||
Partial<XFrameworkPushServiceConfig>;
|
||||
export type XMabsutApiSDKSharedConfig = Partial<XMabsutApiSDKConfig>;
|
||||
export type XSaherElmApiSDKSharedConfig = Partial<XSaherElmApiSDKConfig>;
|
||||
export type XAppSharedConfig = Partial<AppConfig>;
|
||||
|
||||
export type XConfig = XFrameworkCoreConfig &
|
||||
@@ -47,7 +47,7 @@ export type XConfig = XFrameworkCoreConfig &
|
||||
XFrameworkComponentsConfig &
|
||||
XFrameworkIdentitySDKConfig &
|
||||
XFrameworkPushServiceConfig &
|
||||
XMabsutApiSDKConfig &
|
||||
XSaherElmApiSDKConfig &
|
||||
AppConfig;
|
||||
export type XSharedConfig = Partial<XConfig>;
|
||||
|
||||
@@ -171,7 +171,7 @@ export const xFrameworkPushServiceSharedConfig: XFrameworkPushServiceSharedConfi
|
||||
],
|
||||
};
|
||||
|
||||
export const xMabsutApiSDKSharedConfig: XMabsutApiSDKSharedConfig = {
|
||||
export const xMabsutApiSDKSharedConfig: XSaherElmApiSDKSharedConfig = {
|
||||
//
|
||||
// Configure API ...
|
||||
apiIdentifier: 'api',
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
XUserRoleInfo,
|
||||
XAvailableRoles,
|
||||
getTopRoleByRoleInfo,
|
||||
} from 'x-mabsut-api-sdk';
|
||||
} from 'x-saherelm-api-sdk';
|
||||
import {
|
||||
XIconNames,
|
||||
XNavigatorListItem,
|
||||
@@ -448,7 +448,7 @@ const GuestNavPageItems: XNavigatorListItem[] = [
|
||||
//
|
||||
//#region Navigator Pages Provider ...
|
||||
export async function getNavPages(
|
||||
roleInfo: XUserRoleInfo
|
||||
roleInfo: XUserRoleInfo,
|
||||
): Promise<XNavigatorListItem[]> {
|
||||
//
|
||||
if (!roleInfo) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { AdminGuard } from 'x-mabsut-api-sdk';
|
||||
import { LoginPage } from './login/login.page';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { AdminGuard } from 'x-saherelm-api-sdk';
|
||||
import { LogoutPage } from './logout/logout.page';
|
||||
import { ProfilePage } from './profile/profile.page';
|
||||
import { XCanDeactivateGuard } from 'x-framework-core';
|
||||
|
||||
@@ -4,24 +4,24 @@ import {
|
||||
TemplateRef,
|
||||
ChangeDetectionStrategy,
|
||||
} from '@angular/core';
|
||||
import {
|
||||
XFileDto,
|
||||
XPersonDto,
|
||||
XReferenceDto,
|
||||
defaultFileDto,
|
||||
fileEntityToDto,
|
||||
} from 'x-mabsut-api-sdk';
|
||||
import {
|
||||
XRef,
|
||||
nameof,
|
||||
XFileType,
|
||||
isFunction,
|
||||
getFieldNames,
|
||||
isNullOrUndefined,
|
||||
isNullOrEmptyString,
|
||||
XResourceIdentifier,
|
||||
getComponentSelector,
|
||||
XFileType,
|
||||
} from 'x-framework-core';
|
||||
import {
|
||||
XFileDto,
|
||||
XPersonDto,
|
||||
XReferenceDto,
|
||||
defaultFileDto,
|
||||
fileEntityToDto,
|
||||
} from 'x-saherelm-api-sdk';
|
||||
import {
|
||||
XListItem,
|
||||
XSlotName,
|
||||
@@ -87,7 +87,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
toolbarShowSubTitle = true;
|
||||
titleRes = this.ResourceIDs.app_name;
|
||||
toolbarSubTitle = this.resourceProvider(
|
||||
this.AppResourceIDs.files_management_page_title
|
||||
this.AppResourceIDs.files_management_page_title,
|
||||
);
|
||||
toolbarTitle = this.resourceProvider(this.titleRes);
|
||||
|
||||
@@ -184,7 +184,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
|
||||
//
|
||||
this.applyTakeUntilWrapper(
|
||||
this.managerService.settingsService.isMobile$
|
||||
this.managerService.settingsService.isMobile$,
|
||||
).subscribe((res) => {
|
||||
//
|
||||
if (!isNullOrUndefined(this.activeTab)) {
|
||||
@@ -288,7 +288,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
type: this.ModelFieldTypes.Number,
|
||||
valueProvider: (value) => {
|
||||
return this.applyLocale(
|
||||
this.resourceProvider(getFileTypeResourceID(value))
|
||||
this.resourceProvider(getFileTypeResourceID(value)),
|
||||
);
|
||||
},
|
||||
} as VModelFieldDescriptor<XFileType>,
|
||||
@@ -467,7 +467,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
? this.LIST_OWNER_REF
|
||||
: fd.template,
|
||||
};
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -478,7 +478,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
* @returns
|
||||
*/
|
||||
async handleGetQueryResult(
|
||||
query: XQueryDto
|
||||
query: XQueryDto,
|
||||
): Promise<XQueryResultDto<XFileDto>> {
|
||||
//
|
||||
let result: XQueryResultDto<XFileDto> = undefined;
|
||||
@@ -494,7 +494,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Retrieve File Dto Result ...
|
||||
this.dtoQueryResult = await this.getValueAsync(
|
||||
this.queryModelTask(query)
|
||||
this.queryModelTask(query),
|
||||
);
|
||||
|
||||
//
|
||||
@@ -603,7 +603,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
* @returns
|
||||
*/
|
||||
async validateAndPrepareListItems(
|
||||
items: Array<XListItem<XFileDto>>
|
||||
items: Array<XListItem<XFileDto>>,
|
||||
): Promise<Array<XListItem<XFileDto>>> {
|
||||
//
|
||||
let result: Array<XListItem<XFileDto>> = [];
|
||||
@@ -631,7 +631,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
*/
|
||||
async requestFillingItems(
|
||||
exists: Array<XFileDto>,
|
||||
recieved: Array<XFileDto>
|
||||
recieved: Array<XFileDto>,
|
||||
): Promise<VQueryFilledItemsProcessingResult<XFileDto>> {
|
||||
//
|
||||
let result: VQueryFilledItemsProcessingResult<XFileDto> =
|
||||
@@ -688,7 +688,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
ids.forEach((id) => {
|
||||
//
|
||||
const iSelector = `${selector}[${nameof<XFileDto>(
|
||||
'id'
|
||||
'id',
|
||||
)}="${id}"][${nameof<VFileComponent>('presentType')}="${
|
||||
VBaseDtoPresentType.AsView
|
||||
}"]`;
|
||||
@@ -744,7 +744,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
type: this.ModelFieldTypes.Number,
|
||||
valueProvider: (value) => {
|
||||
return this.applyLocale(
|
||||
this.resourceProvider(getFileTypeResourceID(value))
|
||||
this.resourceProvider(getFileTypeResourceID(value)),
|
||||
);
|
||||
},
|
||||
} as VModelFieldDescriptor<XFileType>,
|
||||
@@ -890,7 +890,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
// Since Cancel only Fired when Lock Breaked, here we do not need to handle it ...
|
||||
this.sendQueryPresenterAction(
|
||||
VQueryPresenterAction.ChangeTab,
|
||||
this.prevTab || VQueryPresenterTabs.List
|
||||
this.prevTab || VQueryPresenterTabs.List,
|
||||
);
|
||||
}
|
||||
//
|
||||
@@ -929,16 +929,16 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Retrieve Connection ID ...
|
||||
const connectionId =
|
||||
this.sharedService.mabsutAPIService.files.fileEntityPushService
|
||||
this.sharedService.saherElmAPIService.files.fileEntityPushService
|
||||
.connectionId;
|
||||
|
||||
//
|
||||
// Issue Task ...
|
||||
response = await this.getValueAsync(
|
||||
this.sharedService.mabsutAPIService.files.fileProviderService.upload(
|
||||
this.sharedService.saherElmAPIService.files.fileProviderService.upload(
|
||||
[...this.filesForUpload], // Model ...
|
||||
connectionId // Connection Id ...
|
||||
)
|
||||
connectionId, // Connection Id ...
|
||||
),
|
||||
);
|
||||
} catch (ex) {
|
||||
//
|
||||
@@ -999,7 +999,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
type: this.ModelFieldTypes.Number,
|
||||
valueProvider: (value) => {
|
||||
return this.applyLocale(
|
||||
this.resourceProvider(getFileTypeResourceID(value))
|
||||
this.resourceProvider(getFileTypeResourceID(value)),
|
||||
);
|
||||
},
|
||||
} as VModelFieldDescriptor<XFileType>,
|
||||
@@ -1115,7 +1115,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
* @returns
|
||||
*/
|
||||
detailsFilesActionsProvider: (
|
||||
f: XFileDto | File
|
||||
f: XFileDto | File,
|
||||
) => Array<XSimpleListItemSlideOption> = (f) => {
|
||||
return [];
|
||||
};
|
||||
@@ -1133,7 +1133,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
// Since Cancel only Fired when Lock Breaked, here we do not need to handle it ...
|
||||
this.sendQueryPresenterAction(
|
||||
VQueryPresenterAction.ChangeTab,
|
||||
this.prevTab || VQueryPresenterTabs.List
|
||||
this.prevTab || VQueryPresenterTabs.List,
|
||||
);
|
||||
}
|
||||
//
|
||||
@@ -1191,7 +1191,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Retrieve Connection ID ...
|
||||
const connectionId =
|
||||
this.sharedService.mabsutAPIService.files.fileEntityPushService
|
||||
this.sharedService.saherElmAPIService.files.fileEntityPushService
|
||||
.connectionId;
|
||||
|
||||
//
|
||||
@@ -1201,7 +1201,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Issue Task ...
|
||||
// response = await this.getValueAsync(
|
||||
// this.sharedService.mabsutAPIService.files.fileProviderService.update(
|
||||
// this.sharedService.saherElmAPIService.files.fileProviderService.update(
|
||||
// dtoModel.id,
|
||||
// dtoModel,
|
||||
// connectionId
|
||||
@@ -1301,7 +1301,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
type: this.ModelFieldTypes.Number,
|
||||
valueProvider: (value) => {
|
||||
return this.applyLocale(
|
||||
this.resourceProvider(getFileTypeResourceID(value))
|
||||
this.resourceProvider(getFileTypeResourceID(value)),
|
||||
);
|
||||
},
|
||||
} as VModelFieldDescriptor<XFileType>,
|
||||
@@ -1411,7 +1411,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
* @param error
|
||||
*/
|
||||
async handleCustomError(
|
||||
error?: VQueryPresenterActionIdentifier
|
||||
error?: VQueryPresenterActionIdentifier,
|
||||
): Promise<void> {
|
||||
//
|
||||
await this.setLoadingState(false);
|
||||
@@ -1597,7 +1597,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
(!isNullOrUndefined(actions.childs) &&
|
||||
this.hasChild(actions.childs) &&
|
||||
actions.childs.findIndex(
|
||||
(a) => a.id === defaultRemoveFabButton.id
|
||||
(a) => a.id === defaultRemoveFabButton.id,
|
||||
)) >= 0
|
||||
) {
|
||||
//
|
||||
@@ -1716,7 +1716,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
this.sendQueryPresenterAction(
|
||||
VQueryPresenterAction.ChangeTab,
|
||||
VQueryPresenterTabs.Details
|
||||
VQueryPresenterTabs.Details,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1747,7 +1747,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
this.sendQueryPresenterAction(
|
||||
VQueryPresenterAction.ChangeTab,
|
||||
VQueryPresenterTabs.Update
|
||||
VQueryPresenterTabs.Update,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1802,7 +1802,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
this.activeTab = VQueryPresenterTabs.Details;
|
||||
this.sendQueryPresenterAction(
|
||||
VQueryPresenterAction.ChangeTab,
|
||||
this.activeTab
|
||||
this.activeTab,
|
||||
);
|
||||
} else {
|
||||
this.hasParams = false;
|
||||
@@ -1824,15 +1824,15 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
try {
|
||||
//
|
||||
const connectionId =
|
||||
this.sharedService.mabsutAPIService.files.fileEntityPushService
|
||||
this.sharedService.saherElmAPIService.files.fileEntityPushService
|
||||
.connectionId;
|
||||
|
||||
//
|
||||
await this.getValueAsync(
|
||||
this.sharedService.mabsutAPIService.files.fileProviderService.remove(
|
||||
this.sharedService.saherElmAPIService.files.fileProviderService.remove(
|
||||
model.id,
|
||||
connectionId
|
||||
)
|
||||
connectionId,
|
||||
),
|
||||
);
|
||||
} catch {
|
||||
//
|
||||
@@ -1861,7 +1861,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
this.prevTab = undefined;
|
||||
this.sendQueryPresenterAction(
|
||||
VQueryPresenterAction.ChangeTab,
|
||||
VQueryPresenterTabs.List
|
||||
VQueryPresenterTabs.List,
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -1882,7 +1882,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
!this.toolbarShowBack ||
|
||||
!isFunction(this.toolbarBackHandler) ||
|
||||
[VQueryPresenterTabs.Add, VQueryPresenterTabs.Update].includes(
|
||||
this.activeTab
|
||||
this.activeTab,
|
||||
)
|
||||
) {
|
||||
return;
|
||||
@@ -1937,8 +1937,8 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
(fd) =>
|
||||
fd.key === this.ModelFieldNames.path &&
|
||||
!!fd.hasCustomTemplate &&
|
||||
!isNullOrUndefined(fd.template)
|
||||
)
|
||||
!isNullOrUndefined(fd.template),
|
||||
),
|
||||
);
|
||||
if (!hasTemplate && !isNullOrUndefined(this.fileNameRef)) {
|
||||
//
|
||||
@@ -1954,7 +1954,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
? this.fileNameRef
|
||||
: fd.template,
|
||||
};
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1965,8 +1965,8 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
(fd) =>
|
||||
fd.key === this.ModelFieldNames.path &&
|
||||
!!fd.hasCustomTemplate &&
|
||||
!isNullOrUndefined(fd.template)
|
||||
)
|
||||
!isNullOrUndefined(fd.template),
|
||||
),
|
||||
);
|
||||
if (!hasTemplate && !isNullOrUndefined(this.fileNameRef)) {
|
||||
//
|
||||
@@ -1982,7 +1982,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
? this.fileNameRef
|
||||
: fd.template,
|
||||
};
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1993,8 +1993,8 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
(fd) =>
|
||||
fd.key === this.ModelFieldNames.path &&
|
||||
!!fd.hasCustomTemplate &&
|
||||
!isNullOrUndefined(fd.template)
|
||||
)
|
||||
!isNullOrUndefined(fd.template),
|
||||
),
|
||||
);
|
||||
if (!hasTemplate && !isNullOrUndefined(this.fileNameRef)) {
|
||||
//
|
||||
@@ -2020,8 +2020,8 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
(fd) =>
|
||||
fd.key === this.ModelFieldNames.path &&
|
||||
!!fd.hasCustomTemplate &&
|
||||
!isNullOrUndefined(fd.template)
|
||||
)
|
||||
!isNullOrUndefined(fd.template),
|
||||
),
|
||||
);
|
||||
if (!hasTemplate && !isNullOrUndefined(this.fileNameRef)) {
|
||||
//
|
||||
@@ -2049,13 +2049,13 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Check Connected Before ...
|
||||
if (
|
||||
this.sharedService.mabsutAPIService.files.fileEntityPushService.isConnected()
|
||||
this.sharedService.saherElmAPIService.files.fileEntityPushService.isConnected()
|
||||
) {
|
||||
this.isPushServiceConnected = true;
|
||||
} else {
|
||||
//
|
||||
this.isPushServiceConnected = true;
|
||||
await this.sharedService.mabsutAPIService.files.fileEntityPushService.connect();
|
||||
await this.sharedService.saherElmAPIService.files.fileEntityPushService.connect();
|
||||
}
|
||||
} catch {
|
||||
//
|
||||
@@ -2072,7 +2072,8 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// On Added ...
|
||||
this.applyTakeUntilWrapper(
|
||||
this.sharedService.mabsutAPIService.files.fileEntityPushService.onAdded$
|
||||
this.sharedService.saherElmAPIService.files.fileEntityPushService
|
||||
.onAdded$,
|
||||
).subscribe(async (event) => {
|
||||
//
|
||||
if (isNullOrUndefined(event)) {
|
||||
@@ -2083,7 +2084,8 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// On Removed ...
|
||||
this.applyTakeUntilWrapper(
|
||||
this.sharedService.mabsutAPIService.files.fileEntityPushService.onDeleted$
|
||||
this.sharedService.saherElmAPIService.files.fileEntityPushService
|
||||
.onDeleted$,
|
||||
).subscribe(async (event) => {
|
||||
//
|
||||
if (isNullOrUndefined(event) && isNullOrUndefined(this.dtoQueryResult)) {
|
||||
@@ -2093,7 +2095,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Check if Model Exists in Current Context or not ...
|
||||
let model = this.dtoQueryResult.items.find(
|
||||
(i) => i.id === event.model.id
|
||||
(i) => i.id === event.model.id,
|
||||
);
|
||||
const modelP = fileEntityToDto(event.model, model.owner);
|
||||
if (!isNullOrUndefined(model) && !isNullOrUndefined(modelP)) {
|
||||
@@ -2127,7 +2129,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
this.sendQueryPresenterAction(
|
||||
VQueryPresenterAction.ChangeTab,
|
||||
VQueryPresenterTabs.List
|
||||
VQueryPresenterTabs.List,
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -2135,7 +2137,8 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// On Updated ...
|
||||
this.applyTakeUntilWrapper(
|
||||
this.sharedService.mabsutAPIService.files.fileEntityPushService.onUpdated$
|
||||
this.sharedService.saherElmAPIService.files.fileEntityPushService
|
||||
.onUpdated$,
|
||||
).subscribe(async (event) => {
|
||||
//
|
||||
if (isNullOrUndefined(event) || isNullOrUndefined(this.dtoQueryResult)) {
|
||||
@@ -2145,7 +2148,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Check if Model Exists in Current Context or not ...
|
||||
let model = this.dtoQueryResult.items.find(
|
||||
(i) => i.id === event.model.id
|
||||
(i) => i.id === event.model.id,
|
||||
);
|
||||
if (isNullOrUndefined(model)) {
|
||||
return;
|
||||
@@ -2155,9 +2158,9 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
let fromEntity: XFileDto = undefined;
|
||||
try {
|
||||
fromEntity = await this.getValueAsync(
|
||||
this.sharedService.mabsutAPIService.files.fileProviderService.get(
|
||||
event.model.id
|
||||
)
|
||||
this.sharedService.saherElmAPIService.files.fileProviderService.get(
|
||||
event.model.id,
|
||||
),
|
||||
);
|
||||
} catch {
|
||||
return;
|
||||
@@ -2204,7 +2207,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
const selector = getQuerySelectorOfSpecifiedAttribute(
|
||||
VFileComponent,
|
||||
this.ModelFieldNames.id,
|
||||
this.updateModel.id
|
||||
this.updateModel.id,
|
||||
);
|
||||
await this.waitForElement(selector).then(async (el) => {
|
||||
//
|
||||
@@ -2236,7 +2239,7 @@ export abstract class FilesBaseProviderPage extends VQueryPresenterBasePage {
|
||||
const selector = getQuerySelectorOfSpecifiedAttribute(
|
||||
VFileComponent,
|
||||
this.ModelFieldNames.id,
|
||||
this.detailsModel.id
|
||||
this.detailsModel.id,
|
||||
);
|
||||
await this.waitForElement(selector).then(async (el) => {
|
||||
//
|
||||
|
||||
@@ -28,14 +28,14 @@ export class FilesExplorerPage extends FilesBaseProviderPage {
|
||||
//#region Abstractions ...
|
||||
getModelTask(identifier: string): Observable<any> {
|
||||
//
|
||||
return this.sharedService.mabsutAPIService.files.fileProviderService.get(
|
||||
identifier
|
||||
return this.sharedService.saherElmAPIService.files.fileProviderService.get(
|
||||
identifier,
|
||||
);
|
||||
}
|
||||
|
||||
queryModelTask(query: XQueryDto): Observable<XQueryResultDto<any>> {
|
||||
return this.sharedService.mabsutAPIService.files.fileProviderService.query(
|
||||
query
|
||||
return this.sharedService.saherElmAPIService.files.fileProviderService.query(
|
||||
query,
|
||||
);
|
||||
}
|
||||
//#endregion
|
||||
|
||||
@@ -28,14 +28,14 @@ export class FilesManagementPage extends FilesBaseProviderPage {
|
||||
//#region Abstractions ...
|
||||
getModelTask(identifier: string): Observable<any> {
|
||||
//
|
||||
return this.sharedService.mabsutAPIService.files.fileProviderService.get(
|
||||
identifier
|
||||
return this.sharedService.saherElmAPIService.files.fileProviderService.get(
|
||||
identifier,
|
||||
);
|
||||
}
|
||||
|
||||
queryModelTask(query: XQueryDto): Observable<XQueryResultDto<any>> {
|
||||
return this.sharedService.mabsutAPIService.files.fileProviderService.query(
|
||||
query
|
||||
return this.sharedService.saherElmAPIService.files.fileProviderService.query(
|
||||
query,
|
||||
);
|
||||
}
|
||||
//#endregion
|
||||
|
||||
@@ -56,9 +56,9 @@ import {
|
||||
} from 'src/app/views/v-query-presenter/v-query-presenter.typings';
|
||||
import { XQueryDto, XQueryResultDto } from 'x-framework-identity-sdk';
|
||||
import { sendAction } from 'src/app/views/tools/action-provider.tools';
|
||||
import { defaultTagDto, XReferenceDto, XTagDto } from 'x-mabsut-api-sdk';
|
||||
import { VTagComponent } from 'src/app/views/tags/v-tag/v-tag.component';
|
||||
import { VTagPresentType } from 'src/app/views/tags/v-tag/v-tag.typings';
|
||||
import { defaultTagDto, XReferenceDto, XTagDto } from 'x-saherelm-api-sdk';
|
||||
import { PersonPresentType } from 'src/app/views/v-person/v-person.typings';
|
||||
import { VDtoCommonProperties } from 'src/app/views/typings/dto.common.typings';
|
||||
import { VPagePresenter } from 'src/app/views/v-page-presenter/v-page-presenter.component';
|
||||
@@ -696,13 +696,13 @@ export abstract class TagsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Retrieve Connection ID ...
|
||||
const connectionId =
|
||||
this.sharedService.mabsutAPIService.tags.tagEntityPushService
|
||||
this.sharedService.saherElmAPIService.tags.tagEntityPushService
|
||||
.connectionId;
|
||||
|
||||
//
|
||||
// Issue Task ...
|
||||
response = await this.getValueAsync(
|
||||
this.sharedService.mabsutAPIService.tags.tagProviderService.add(
|
||||
this.sharedService.saherElmAPIService.tags.tagProviderService.add(
|
||||
dtoModel, // Model ...
|
||||
connectionId // Connection Id ...
|
||||
)
|
||||
@@ -874,13 +874,13 @@ export abstract class TagsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Retrieve Connection ID ...
|
||||
const connectionId =
|
||||
this.sharedService.mabsutAPIService.tags.tagEntityPushService
|
||||
this.sharedService.saherElmAPIService.tags.tagEntityPushService
|
||||
.connectionId;
|
||||
|
||||
//
|
||||
// Issue Task ...
|
||||
response = await this.getValueAsync(
|
||||
this.sharedService.mabsutAPIService.tags.tagProviderService.update(
|
||||
this.sharedService.saherElmAPIService.tags.tagProviderService.update(
|
||||
dtoModel.id,
|
||||
dtoModel,
|
||||
connectionId
|
||||
@@ -1447,12 +1447,12 @@ export abstract class TagsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
try {
|
||||
//
|
||||
const connectionId =
|
||||
this.sharedService.mabsutAPIService.tags.tagEntityPushService
|
||||
this.sharedService.saherElmAPIService.tags.tagEntityPushService
|
||||
.connectionId;
|
||||
|
||||
//
|
||||
await this.getValueAsync(
|
||||
this.sharedService.mabsutAPIService.tags.tagProviderService.remove(
|
||||
this.sharedService.saherElmAPIService.tags.tagProviderService.remove(
|
||||
model.id,
|
||||
connectionId
|
||||
)
|
||||
@@ -1566,13 +1566,13 @@ export abstract class TagsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Check Connected Before ...
|
||||
if (
|
||||
this.sharedService.mabsutAPIService.tags.tagEntityPushService.isConnected()
|
||||
this.sharedService.saherElmAPIService.tags.tagEntityPushService.isConnected()
|
||||
) {
|
||||
this.isPushServiceConnected = true;
|
||||
} else {
|
||||
//
|
||||
this.isPushServiceConnected = true;
|
||||
await this.sharedService.mabsutAPIService.tags.tagEntityPushService.connect();
|
||||
await this.sharedService.saherElmAPIService.tags.tagEntityPushService.connect();
|
||||
}
|
||||
} catch {
|
||||
//
|
||||
@@ -1589,7 +1589,7 @@ export abstract class TagsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// On Added ...
|
||||
this.applyTakeUntilWrapper(
|
||||
this.sharedService.mabsutAPIService.tags.tagEntityPushService.onAdded$
|
||||
this.sharedService.saherElmAPIService.tags.tagEntityPushService.onAdded$
|
||||
).subscribe(async (event) => {
|
||||
//
|
||||
if (isNullOrUndefined(event)) {
|
||||
@@ -1600,7 +1600,7 @@ export abstract class TagsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// On Removed ...
|
||||
this.applyTakeUntilWrapper(
|
||||
this.sharedService.mabsutAPIService.tags.tagEntityPushService.onDeleted$
|
||||
this.sharedService.saherElmAPIService.tags.tagEntityPushService.onDeleted$
|
||||
).subscribe(async (event) => {
|
||||
//
|
||||
if (isNullOrUndefined(event) && isNullOrUndefined(this.dtoQueryResult)) {
|
||||
@@ -1652,7 +1652,7 @@ export abstract class TagsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// On Updated ...
|
||||
this.applyTakeUntilWrapper(
|
||||
this.sharedService.mabsutAPIService.tags.tagEntityPushService.onUpdated$
|
||||
this.sharedService.saherElmAPIService.tags.tagEntityPushService.onUpdated$
|
||||
).subscribe(async (event) => {
|
||||
//
|
||||
if (isNullOrUndefined(event) || isNullOrUndefined(this.dtoQueryResult)) {
|
||||
@@ -1673,7 +1673,7 @@ export abstract class TagsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
try {
|
||||
//
|
||||
modelP = await this.getValueAsync(
|
||||
this.sharedService.mabsutAPIService.tags.tagProviderService.get(
|
||||
this.sharedService.saherElmAPIService.tags.tagProviderService.get(
|
||||
event.model.id
|
||||
)
|
||||
);
|
||||
|
||||
@@ -29,14 +29,15 @@ export class TagsExplorerPage extends TagsBaseProviderPage {
|
||||
//#region Abstractions ...
|
||||
getModelTask(identifier: string): Observable<any> {
|
||||
//
|
||||
return this.sharedService.mabsutAPIService.tags.tagProviderService
|
||||
.get(toNumber(identifier));
|
||||
return this.sharedService.saherElmAPIService.tags.tagProviderService.get(
|
||||
toNumber(identifier),
|
||||
);
|
||||
}
|
||||
|
||||
queryModelTask(query: XQueryDto): Observable<XQueryResultDto<any>> {
|
||||
return this.sharedService.mabsutAPIService.tags.tagProviderService.query(
|
||||
query
|
||||
return this.sharedService.saherElmAPIService.tags.tagProviderService.query(
|
||||
query,
|
||||
);
|
||||
}
|
||||
//#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,14 +29,14 @@ export class TagsManagementPage extends TagsBaseProviderPage {
|
||||
//#region Abstractions ...
|
||||
getModelTask(identifier: string): Observable<any> {
|
||||
//
|
||||
return this.sharedService.mabsutAPIService.tags.tagProviderService.get(
|
||||
toNumber(identifier)
|
||||
return this.sharedService.saherElmAPIService.tags.tagProviderService.get(
|
||||
toNumber(identifier),
|
||||
);
|
||||
}
|
||||
|
||||
queryModelTask(query: XQueryDto): Observable<XQueryResultDto<any>> {
|
||||
return this.sharedService.mabsutAPIService.tags.tagProviderService.query(
|
||||
query
|
||||
return this.sharedService.saherElmAPIService.tags.tagProviderService.query(
|
||||
query,
|
||||
);
|
||||
}
|
||||
//#endregion
|
||||
|
||||
@@ -4,12 +4,6 @@ import {
|
||||
TemplateRef,
|
||||
ChangeDetectionStrategy,
|
||||
} from '@angular/core';
|
||||
import {
|
||||
XFileDto,
|
||||
XPersonDto,
|
||||
XWebinarDto,
|
||||
XWebinarType,
|
||||
} from 'x-mabsut-api-sdk';
|
||||
import {
|
||||
XRef,
|
||||
nameof,
|
||||
@@ -20,6 +14,12 @@ import {
|
||||
XResourceIdentifier,
|
||||
getComponentSelector,
|
||||
} from 'x-framework-core';
|
||||
import {
|
||||
XFileDto,
|
||||
XPersonDto,
|
||||
XWebinarDto,
|
||||
XWebinarType,
|
||||
} from 'x-saherelm-api-sdk';
|
||||
import {
|
||||
XListItem,
|
||||
XSlotName,
|
||||
@@ -110,7 +110,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
toolbarShowSubTitle = true;
|
||||
titleRes = this.ResourceIDs.app_name;
|
||||
toolbarSubTitle = this.resourceProvider(
|
||||
this.AppResourceIDs.webinars_management_page_title
|
||||
this.AppResourceIDs.webinars_management_page_title,
|
||||
);
|
||||
toolbarTitle = this.resourceProvider(this.titleRes);
|
||||
|
||||
@@ -121,11 +121,11 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
readonly TagsPresenterPresertTypes = Object.assign(
|
||||
VTagsPresenterPresentType,
|
||||
{}
|
||||
{},
|
||||
);
|
||||
readonly FilesPresenterPresertTypes = Object.assign(
|
||||
{},
|
||||
VFilesPresenterPresentType
|
||||
VFilesPresenterPresentType,
|
||||
);
|
||||
readonly ButtonTypes = Object.assign(XButtonType, {});
|
||||
readonly ModelFieldTypes = Object.assign(VModelFieldTypes);
|
||||
@@ -213,19 +213,19 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
|
||||
//
|
||||
this.applyTakeUntilWrapper(
|
||||
this.managerService.settingsService.isMobile$
|
||||
this.managerService.settingsService.isMobile$,
|
||||
).subscribe((res) => {
|
||||
//
|
||||
if (!isNullOrUndefined(this.activeTab)) {
|
||||
//
|
||||
switch(this.activeTab) {
|
||||
switch (this.activeTab) {
|
||||
//
|
||||
case VQueryPresenterTabs.List:
|
||||
sendAction({
|
||||
provider: this.listItemActionProvider,
|
||||
action: VBaseDtoAction.Refresh
|
||||
action: VBaseDtoAction.Refresh,
|
||||
});
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -445,7 +445,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
? this.LIST_OWNER_REF
|
||||
: fd.template,
|
||||
};
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -456,7 +456,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
* @returns
|
||||
*/
|
||||
async handleGetQueryResult(
|
||||
query: XQueryDto
|
||||
query: XQueryDto,
|
||||
): Promise<XQueryResultDto<VWebinarViewDto>> {
|
||||
//
|
||||
let result: XQueryResultDto<VWebinarViewDto> = undefined;
|
||||
@@ -472,7 +472,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Retrieve Webinar Dto Result ...
|
||||
this.dtoQueryResult = await this.getValueAsync(
|
||||
this.queryModelTask(query)
|
||||
this.queryModelTask(query),
|
||||
);
|
||||
|
||||
//
|
||||
@@ -490,7 +490,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Converts XWebinarDto to VWebinarViewDto ...
|
||||
result.items = this.dtoQueryResult.items.map((i) =>
|
||||
ToWebinarViewDto(i, this.managerService.currentLocale)
|
||||
ToWebinarViewDto(i, this.managerService.currentLocale),
|
||||
);
|
||||
|
||||
//
|
||||
@@ -583,7 +583,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
* @returns
|
||||
*/
|
||||
async validateAndPrepareListItems(
|
||||
items: Array<XListItem<VWebinarViewDto>>
|
||||
items: Array<XListItem<VWebinarViewDto>>,
|
||||
): Promise<Array<XListItem<VWebinarViewDto>>> {
|
||||
//
|
||||
let result: Array<XListItem<VWebinarViewDto>> = [];
|
||||
@@ -611,7 +611,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
*/
|
||||
async requestFillingItems(
|
||||
exists: Array<VWebinarViewDto>,
|
||||
recieved: Array<VWebinarViewDto>
|
||||
recieved: Array<VWebinarViewDto>,
|
||||
): Promise<VQueryFilledItemsProcessingResult<VWebinarViewDto>> {
|
||||
//
|
||||
let result: VQueryFilledItemsProcessingResult<VWebinarViewDto> =
|
||||
@@ -668,7 +668,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
ids.forEach((id) => {
|
||||
//
|
||||
const iSelector = `${selector}[${nameof<VWebinarViewDto>(
|
||||
'id'
|
||||
'id',
|
||||
)}="${id}"][${nameof<VWebinarViewComponent>('presentType')}="${
|
||||
VBaseDtoPresentType.AsView
|
||||
}"]`;
|
||||
@@ -891,7 +891,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
// Since Cancel only Fired when Lock Breaked, here we do not need to handle it ...
|
||||
this.sendQueryPresenterAction(
|
||||
VQueryPresenterAction.ChangeTab,
|
||||
this.prevTab || VQueryPresenterTabs.List
|
||||
this.prevTab || VQueryPresenterTabs.List,
|
||||
);
|
||||
}
|
||||
//
|
||||
@@ -918,7 +918,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
async handleAddModel(
|
||||
model: VWebinarViewDto,
|
||||
tags?: Array<string>,
|
||||
files?: Array<File>
|
||||
files?: Array<File>,
|
||||
) {
|
||||
//
|
||||
if (isNullOrUndefined(model)) {
|
||||
@@ -956,7 +956,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Retrieve Connection ID ...
|
||||
const connectionId =
|
||||
this.sharedService.mabsutAPIService.webinars.webinarEntityPushService
|
||||
this.sharedService.saherElmAPIService.webinars.webinarEntityPushService
|
||||
.connectionId;
|
||||
|
||||
//
|
||||
@@ -966,12 +966,12 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Issue Task ...
|
||||
response = await this.getValueAsync(
|
||||
this.sharedService.mabsutAPIService.webinars.webinarProviderService.create(
|
||||
this.sharedService.saherElmAPIService.webinars.webinarProviderService.create(
|
||||
dtoModel, // Model ...
|
||||
pTags, // Tags ...
|
||||
pFiles, // Files ...
|
||||
connectionId // Connection Id ...
|
||||
)
|
||||
connectionId, // Connection Id ...
|
||||
),
|
||||
);
|
||||
} catch (ex) {
|
||||
//
|
||||
@@ -1191,7 +1191,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
* @returns
|
||||
*/
|
||||
detailsFilesActionsProvider: (
|
||||
f: XFileDto | File
|
||||
f: XFileDto | File,
|
||||
) => Array<XSimpleListItemSlideOption> = (f) => {
|
||||
return [];
|
||||
};
|
||||
@@ -1209,7 +1209,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
// Since Cancel only Fired when Lock Breaked, here we do not need to handle it ...
|
||||
this.sendQueryPresenterAction(
|
||||
VQueryPresenterAction.ChangeTab,
|
||||
this.prevTab || VQueryPresenterTabs.List
|
||||
this.prevTab || VQueryPresenterTabs.List,
|
||||
);
|
||||
}
|
||||
//
|
||||
@@ -1267,7 +1267,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Retrieve Connection ID ...
|
||||
const connectionId =
|
||||
this.sharedService.mabsutAPIService.webinars.webinarEntityPushService
|
||||
this.sharedService.saherElmAPIService.webinars.webinarEntityPushService
|
||||
.connectionId;
|
||||
|
||||
//
|
||||
@@ -1277,10 +1277,10 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Issue Task ...
|
||||
response = await this.getValueAsync(
|
||||
this.sharedService.mabsutAPIService.webinars.webinarProviderService.update(
|
||||
this.sharedService.saherElmAPIService.webinars.webinarProviderService.update(
|
||||
dtoModel,
|
||||
connectionId
|
||||
)
|
||||
connectionId,
|
||||
),
|
||||
);
|
||||
} catch (ex) {
|
||||
//
|
||||
@@ -1386,7 +1386,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
* @param error
|
||||
*/
|
||||
async handleCustomError(
|
||||
error?: VQueryPresenterActionIdentifier
|
||||
error?: VQueryPresenterActionIdentifier,
|
||||
): Promise<void> {
|
||||
//
|
||||
await this.setLoadingState(false);
|
||||
@@ -1609,7 +1609,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
(!isNullOrUndefined(actions.childs) &&
|
||||
this.hasChild(actions.childs) &&
|
||||
actions.childs.findIndex(
|
||||
(a) => a.id === defaultEditFabButton.id
|
||||
(a) => a.id === defaultEditFabButton.id,
|
||||
)) >= 0
|
||||
) {
|
||||
//
|
||||
@@ -1642,7 +1642,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
(!isNullOrUndefined(actions.childs) &&
|
||||
this.hasChild(actions.childs) &&
|
||||
actions.childs.findIndex(
|
||||
(a) => a.id === defaultRemoveFabButton.id
|
||||
(a) => a.id === defaultRemoveFabButton.id,
|
||||
)) >= 0
|
||||
) {
|
||||
//
|
||||
@@ -1675,7 +1675,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
(!isNullOrUndefined(actions.childs) &&
|
||||
this.hasChild(actions.childs) &&
|
||||
actions.childs.findIndex(
|
||||
(a) => a.id === defaultCloseFabButton.id
|
||||
(a) => a.id === defaultCloseFabButton.id,
|
||||
)) >= 0
|
||||
) {
|
||||
//
|
||||
@@ -1708,7 +1708,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
(!isNullOrUndefined(actions.childs) &&
|
||||
this.hasChild(actions.childs) &&
|
||||
actions.childs.findIndex(
|
||||
(a) => a.id === defaultConnectFabButton.id
|
||||
(a) => a.id === defaultConnectFabButton.id,
|
||||
)) >= 0
|
||||
) {
|
||||
//
|
||||
@@ -1881,7 +1881,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
this.sendQueryPresenterAction(
|
||||
VQueryPresenterAction.ChangeTab,
|
||||
VQueryPresenterTabs.Details
|
||||
VQueryPresenterTabs.Details,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1912,7 +1912,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
this.sendQueryPresenterAction(
|
||||
VQueryPresenterAction.ChangeTab,
|
||||
VQueryPresenterTabs.Update
|
||||
VQueryPresenterTabs.Update,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1967,7 +1967,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
this.activeTab = VQueryPresenterTabs.Details;
|
||||
this.sendQueryPresenterAction(
|
||||
VQueryPresenterAction.ChangeTab,
|
||||
this.activeTab
|
||||
this.activeTab,
|
||||
);
|
||||
} else {
|
||||
this.hasParams = false;
|
||||
@@ -2008,13 +2008,13 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
try {
|
||||
//
|
||||
const connectionId =
|
||||
this.sharedService.mabsutAPIService.webinars.webinarEntityPushService
|
||||
.connectionId;
|
||||
this.sharedService.saherElmAPIService.webinars
|
||||
.webinarEntityPushService.connectionId;
|
||||
response = await this.getValueAsync(
|
||||
this.sharedService.mabsutAPIService.webinars.webinarProviderService.update(
|
||||
this.sharedService.saherElmAPIService.webinars.webinarProviderService.update(
|
||||
dtoModel,
|
||||
connectionId
|
||||
)
|
||||
connectionId,
|
||||
),
|
||||
);
|
||||
} catch {
|
||||
//
|
||||
@@ -2032,7 +2032,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
const updateVDto = ToWebinarViewDto(
|
||||
response,
|
||||
this.managerService.currentLocale
|
||||
this.managerService.currentLocale,
|
||||
);
|
||||
const actions = await this.prepareListActions(updateVDto);
|
||||
this.sendQueryPresenterAction(VQueryPresenterAction.UpdateModel, {
|
||||
@@ -2099,15 +2099,15 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
try {
|
||||
//
|
||||
const connectionId =
|
||||
this.sharedService.mabsutAPIService.webinars.webinarEntityPushService
|
||||
.connectionId;
|
||||
this.sharedService.saherElmAPIService.webinars
|
||||
.webinarEntityPushService.connectionId;
|
||||
|
||||
//
|
||||
await this.getValueAsync(
|
||||
this.sharedService.mabsutAPIService.webinars.webinarProviderService.remove(
|
||||
this.sharedService.saherElmAPIService.webinars.webinarProviderService.remove(
|
||||
model.id,
|
||||
connectionId
|
||||
)
|
||||
connectionId,
|
||||
),
|
||||
);
|
||||
} catch {
|
||||
//
|
||||
@@ -2136,7 +2136,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
this.prevTab = undefined;
|
||||
this.sendQueryPresenterAction(
|
||||
VQueryPresenterAction.ChangeTab,
|
||||
VQueryPresenterTabs.List
|
||||
VQueryPresenterTabs.List,
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -2157,7 +2157,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
!this.toolbarShowBack ||
|
||||
!isFunction(this.toolbarBackHandler) ||
|
||||
[VQueryPresenterTabs.Add, VQueryPresenterTabs.Update].includes(
|
||||
this.activeTab
|
||||
this.activeTab,
|
||||
)
|
||||
) {
|
||||
return;
|
||||
@@ -2209,7 +2209,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
private provideItemOptions(
|
||||
userId: string,
|
||||
isAdmin: boolean,
|
||||
item: VWebinarViewDto
|
||||
item: VWebinarViewDto,
|
||||
) {
|
||||
//
|
||||
let result: Array<XSimpleListItemSlideOption> = [];
|
||||
@@ -2283,13 +2283,13 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Check Connected Before ...
|
||||
if (
|
||||
this.sharedService.mabsutAPIService.webinars.webinarEntityPushService.isConnected()
|
||||
this.sharedService.saherElmAPIService.webinars.webinarEntityPushService.isConnected()
|
||||
) {
|
||||
this.isPushServiceConnected = true;
|
||||
} else {
|
||||
//
|
||||
this.isPushServiceConnected = true;
|
||||
await this.sharedService.mabsutAPIService.webinars.webinarEntityPushService.connect();
|
||||
await this.sharedService.saherElmAPIService.webinars.webinarEntityPushService.connect();
|
||||
}
|
||||
} catch {
|
||||
//
|
||||
@@ -2306,8 +2306,8 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// On Added ...
|
||||
this.applyTakeUntilWrapper(
|
||||
this.sharedService.mabsutAPIService.webinars.webinarEntityPushService
|
||||
.onAdded$
|
||||
this.sharedService.saherElmAPIService.webinars.webinarEntityPushService
|
||||
.onAdded$,
|
||||
).subscribe(async (event) => {
|
||||
//
|
||||
if (isNullOrUndefined(event)) {
|
||||
@@ -2346,8 +2346,8 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// On Removed ...
|
||||
this.applyTakeUntilWrapper(
|
||||
this.sharedService.mabsutAPIService.webinars.webinarEntityPushService
|
||||
.onDeleted$
|
||||
this.sharedService.saherElmAPIService.webinars.webinarEntityPushService
|
||||
.onDeleted$,
|
||||
).subscribe(async (event) => {
|
||||
//
|
||||
if (isNullOrUndefined(event) && isNullOrUndefined(this.dtoQueryResult)) {
|
||||
@@ -2357,7 +2357,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Check if Model Exists in Current Context or not ...
|
||||
let model = this.dtoQueryResult.items.find(
|
||||
(i) => i.id === event.model.id
|
||||
(i) => i.id === event.model.id,
|
||||
);
|
||||
const modelP = ToWebinarViewDto(model, this.managerService.currentLocale);
|
||||
if (!isNullOrUndefined(model) && !isNullOrUndefined(modelP)) {
|
||||
@@ -2391,7 +2391,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
this.sendQueryPresenterAction(
|
||||
VQueryPresenterAction.ChangeTab,
|
||||
VQueryPresenterTabs.List
|
||||
VQueryPresenterTabs.List,
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -2399,8 +2399,8 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// On Updated ...
|
||||
this.applyTakeUntilWrapper(
|
||||
this.sharedService.mabsutAPIService.webinars.webinarEntityPushService
|
||||
.onUpdated$
|
||||
this.sharedService.saherElmAPIService.webinars.webinarEntityPushService
|
||||
.onUpdated$,
|
||||
).subscribe(async (event) => {
|
||||
//
|
||||
if (isNullOrUndefined(event) || isNullOrUndefined(this.dtoQueryResult)) {
|
||||
@@ -2410,7 +2410,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
// Check if Model Exists in Current Context or not ...
|
||||
let model = this.dtoQueryResult.items.find(
|
||||
(i) => i.id === event.model.id
|
||||
(i) => i.id === event.model.id,
|
||||
);
|
||||
if (isNullOrUndefined(model)) {
|
||||
return;
|
||||
@@ -2420,9 +2420,9 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
let fromEntity: XWebinarDto = undefined;
|
||||
try {
|
||||
fromEntity = await this.getValueAsync(
|
||||
this.sharedService.mabsutAPIService.webinars.webinarProviderService.get(
|
||||
event.model.id
|
||||
)
|
||||
this.sharedService.saherElmAPIService.webinars.webinarProviderService.get(
|
||||
event.model.id,
|
||||
),
|
||||
);
|
||||
} catch {
|
||||
return;
|
||||
@@ -2436,7 +2436,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
//
|
||||
const modelP = ToWebinarViewDto(
|
||||
fromEntity,
|
||||
this.managerService.currentLocale
|
||||
this.managerService.currentLocale,
|
||||
);
|
||||
|
||||
//
|
||||
@@ -2472,7 +2472,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
const selector = getQuerySelectorOfSpecifiedAttribute(
|
||||
VWebinarViewComponent,
|
||||
this.ModelFieldNames.id,
|
||||
this.updateModel.id
|
||||
this.updateModel.id,
|
||||
);
|
||||
await this.waitForElement(selector).then(async (el) => {
|
||||
//
|
||||
@@ -2504,7 +2504,7 @@ export abstract class WebinarsBaseProviderPage extends VQueryPresenterBasePage {
|
||||
const selector = getQuerySelectorOfSpecifiedAttribute(
|
||||
VWebinarViewComponent,
|
||||
this.ModelFieldNames.id,
|
||||
this.detailsModel.id
|
||||
this.detailsModel.id,
|
||||
);
|
||||
await this.waitForElement(selector).then(async (el) => {
|
||||
//
|
||||
|
||||
@@ -30,18 +30,18 @@ export class WebinarsExplorerPage extends WebinarsBaseProviderPage {
|
||||
//#region Abstractions ...
|
||||
getModelTask(identifier: string): Observable<any> {
|
||||
//
|
||||
return this.sharedService.mabsutAPIService.webinars.webinarProviderService
|
||||
return this.sharedService.saherElmAPIService.webinars.webinarProviderService
|
||||
.get(identifier)
|
||||
.pipe(
|
||||
concatMap((m) =>
|
||||
this.getValue(ToWebinarViewDto(m, this.managerService.currentLocale))
|
||||
)
|
||||
this.getValue(ToWebinarViewDto(m, this.managerService.currentLocale)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
queryModelTask(query: XQueryDto): Observable<XQueryResultDto<any>> {
|
||||
return this.sharedService.mabsutAPIService.webinars.webinarProviderService.query(
|
||||
query
|
||||
return this.sharedService.saherElmAPIService.webinars.webinarProviderService.query(
|
||||
query,
|
||||
);
|
||||
}
|
||||
//#endregion
|
||||
|
||||
@@ -30,18 +30,18 @@ export class WebinarsManagementPage extends WebinarsBaseProviderPage {
|
||||
//#region Abstractions ...
|
||||
getModelTask(identifier: string): Observable<any> {
|
||||
//
|
||||
return this.sharedService.mabsutAPIService.webinars.webinarProviderService
|
||||
return this.sharedService.saherElmAPIService.webinars.webinarProviderService
|
||||
.get(identifier)
|
||||
.pipe(
|
||||
concatMap((m) =>
|
||||
this.getValue(ToWebinarViewDto(m, this.managerService.currentLocale))
|
||||
)
|
||||
this.getValue(ToWebinarViewDto(m, this.managerService.currentLocale)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
queryModelTask(query: XQueryDto): Observable<XQueryResultDto<any>> {
|
||||
return this.sharedService.mabsutAPIService.webinars.webinarProviderService.query(
|
||||
query
|
||||
return this.sharedService.saherElmAPIService.webinars.webinarProviderService.query(
|
||||
query,
|
||||
);
|
||||
}
|
||||
//#endregion
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
import {
|
||||
XUserRoleInfo,
|
||||
XMabsutAPIService,
|
||||
toRoleInfoByRoles,
|
||||
} from 'x-mabsut-api-sdk';
|
||||
import {
|
||||
XParam,
|
||||
XLoggable,
|
||||
@@ -10,6 +5,11 @@ import {
|
||||
isNullOrUndefined,
|
||||
isNullOrEmptyString,
|
||||
} from 'x-framework-core';
|
||||
import {
|
||||
XUserRoleInfo,
|
||||
toRoleInfoByRoles,
|
||||
XSaherElmAPIService,
|
||||
} from 'x-saherelm-api-sdk';
|
||||
import { timer } from 'rxjs';
|
||||
import {
|
||||
ApiValidators,
|
||||
@@ -53,7 +53,7 @@ export class SharedService extends XLoggable {
|
||||
|
||||
//
|
||||
return res.isLoggedIn;
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -61,7 +61,7 @@ export class SharedService extends XLoggable {
|
||||
*/
|
||||
user$ = this.state$.pipe(
|
||||
filter((res) => !!res),
|
||||
map((state) => prepareUserProfileDtoFields(state.profile))
|
||||
map((state) => prepareUserProfileDtoFields(state.profile)),
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -79,7 +79,7 @@ export class SharedService extends XLoggable {
|
||||
*/
|
||||
token$ = this.state$.pipe(
|
||||
filter((res) => !!res),
|
||||
map((state) => state.accessToken)
|
||||
map((state) => state.accessToken),
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -97,7 +97,7 @@ export class SharedService extends XLoggable {
|
||||
|
||||
//
|
||||
return result;
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
//
|
||||
@@ -109,9 +109,9 @@ export class SharedService extends XLoggable {
|
||||
this.isAgent$.pipe(
|
||||
map((isAgent) => {
|
||||
return isAdmin || isAgent;
|
||||
})
|
||||
)
|
||||
)
|
||||
}),
|
||||
),
|
||||
),
|
||||
);
|
||||
//#endregion
|
||||
|
||||
@@ -132,10 +132,10 @@ export class SharedService extends XLoggable {
|
||||
public managerService: XManagerService,
|
||||
public accountsService: XAccountService,
|
||||
public electronService: XElectronService,
|
||||
public mabsutAPIService: XMabsutAPIService,
|
||||
public saherElmAPIService: XSaherElmAPIService,
|
||||
public mediaDevicesService: XMediaDevicesService,
|
||||
public contentShareService: XContentShareService,
|
||||
public scrollingInfoProvider: XScrollingProviderService
|
||||
public scrollingInfoProvider: XScrollingProviderService,
|
||||
) {
|
||||
super(config);
|
||||
|
||||
@@ -163,7 +163,7 @@ export class SharedService extends XLoggable {
|
||||
//
|
||||
// Try to Refresh Tokens if Expired ...
|
||||
const tokens = await toPromise(
|
||||
this.authService.refreshTokensOnly()
|
||||
this.authService.refreshTokensOnly(),
|
||||
);
|
||||
if (!isNullOrUndefined(tokens)) {
|
||||
//
|
||||
@@ -197,8 +197,8 @@ export class SharedService extends XLoggable {
|
||||
(userId === profile.email ||
|
||||
userId === profile.userId ||
|
||||
userId === profile.userName ||
|
||||
userId === profile.phoneNumber)
|
||||
)
|
||||
userId === profile.phoneNumber),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -218,8 +218,8 @@ export class SharedService extends XLoggable {
|
||||
userId !== profile.email &&
|
||||
userId !== profile.userId &&
|
||||
userId !== profile.userName &&
|
||||
userId !== profile.phoneNumber
|
||||
)
|
||||
userId !== profile.phoneNumber,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ export class VRegisterComponent extends VBaseInCardComponent {
|
||||
//
|
||||
// getTermsAndConditionsTask ...
|
||||
isChanged = changeKeys.includes(
|
||||
nameofInstance(this, 'getTermsAndConditionsTask')
|
||||
nameofInstance(this, 'getTermsAndConditionsTask'),
|
||||
);
|
||||
if (isChanged) {
|
||||
//
|
||||
@@ -82,8 +82,8 @@ export class VRegisterComponent extends VBaseInCardComponent {
|
||||
if (!isValid) {
|
||||
//
|
||||
this.getTermsAndConditionsTask = (lang: string) => {
|
||||
return this.sharedService.mabsutAPIService.terms.termsProviderService.get(
|
||||
lang
|
||||
return this.sharedService.saherElmAPIService.terms.termsProviderService.get(
|
||||
lang,
|
||||
);
|
||||
};
|
||||
}
|
||||
@@ -177,7 +177,7 @@ export class VRegisterComponent extends VBaseInCardComponent {
|
||||
this.step =
|
||||
this.managerService.secureStorageService.readOfType<VRegistrationSteps>(
|
||||
RegistrationKeys.Step,
|
||||
false
|
||||
false,
|
||||
);
|
||||
|
||||
//
|
||||
@@ -197,7 +197,7 @@ export class VRegisterComponent extends VBaseInCardComponent {
|
||||
this.actionRequest =
|
||||
this.managerService.secureStorageService.readOfType<XActionRequestDto>(
|
||||
RegistrationKeys.ActionRequest,
|
||||
false
|
||||
false,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ export class VRegisterComponent extends VBaseInCardComponent {
|
||||
this.actionResponse =
|
||||
this.managerService.secureStorageService.readOfType<XActionResponseDto>(
|
||||
RegistrationKeys.ActionResponse,
|
||||
false
|
||||
false,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -318,7 +318,7 @@ export class VRegisterComponent extends VBaseInCardComponent {
|
||||
this.managerService.secureStorageService.write(
|
||||
RegistrationKeys.Step,
|
||||
this.step,
|
||||
true
|
||||
true,
|
||||
);
|
||||
|
||||
//
|
||||
@@ -326,7 +326,7 @@ export class VRegisterComponent extends VBaseInCardComponent {
|
||||
this.managerService.secureStorageService.write(
|
||||
RegistrationKeys.ActionRequest,
|
||||
this.actionRequest,
|
||||
true
|
||||
true,
|
||||
);
|
||||
|
||||
//
|
||||
@@ -334,7 +334,7 @@ export class VRegisterComponent extends VBaseInCardComponent {
|
||||
this.managerService.secureStorageService.write(
|
||||
RegistrationKeys.ActionResponse,
|
||||
this.actionResponse,
|
||||
true
|
||||
true,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,11 +31,6 @@ import {
|
||||
isNullOrEmptyString,
|
||||
XResourceIdentifier,
|
||||
} from 'x-framework-core';
|
||||
import {
|
||||
toRoleInfo,
|
||||
XAvailableRoles,
|
||||
extractAvaialableRoles,
|
||||
} from 'x-mabsut-api-sdk';
|
||||
import {
|
||||
defaultAvatar,
|
||||
UserProfileTasks,
|
||||
@@ -43,6 +38,11 @@ import {
|
||||
VUserDtoContainer,
|
||||
VUserPresentTypeIdentifier,
|
||||
} from './v-user.typings';
|
||||
import {
|
||||
toRoleInfo,
|
||||
XAvailableRoles,
|
||||
extractAvaialableRoles,
|
||||
} from 'x-saherelm-api-sdk';
|
||||
import {
|
||||
XSlotName,
|
||||
XFormValidators,
|
||||
@@ -111,7 +111,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
//
|
||||
readonly FriendshipActionsPresentTypes = Object.assign(
|
||||
{},
|
||||
FriendshipActionsPresentType
|
||||
FriendshipActionsPresentType,
|
||||
);
|
||||
readonly VPresentTypes = Object.assign({}, VUserPresentType);
|
||||
readonly FormControlTypes = Object.assign({}, XFormControlType);
|
||||
@@ -253,7 +253,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
result = applyFormatDate(
|
||||
value,
|
||||
XDateFormat.DateOfBirth,
|
||||
this.managerService
|
||||
this.managerService,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -607,7 +607,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
result = applyFormatDate(
|
||||
value,
|
||||
XDateFormat.EventDate,
|
||||
this.managerService
|
||||
this.managerService,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -633,7 +633,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
result = applyFormatDate(
|
||||
value,
|
||||
XDateFormat.EventDate,
|
||||
this.managerService
|
||||
this.managerService,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -839,7 +839,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
public managerService: XManagerService,
|
||||
public changeDetector: ChangeDetectorRef,
|
||||
protected popoverService: XPopoverService,
|
||||
protected propertyProvider: VUserDtoContainer
|
||||
protected propertyProvider: VUserDtoContainer,
|
||||
) {
|
||||
super(
|
||||
zone,
|
||||
@@ -851,7 +851,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
managerService,
|
||||
changeDetector,
|
||||
popoverService,
|
||||
propertyProvider
|
||||
propertyProvider,
|
||||
);
|
||||
}
|
||||
//#endregion
|
||||
@@ -868,7 +868,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
|
||||
//
|
||||
const canSelectUserChanged = changeKeys.includes(
|
||||
nameof<VUserComponent>('canSelectUser')
|
||||
nameof<VUserComponent>('canSelectUser'),
|
||||
);
|
||||
if (canSelectUserChanged) {
|
||||
//
|
||||
@@ -879,7 +879,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
|
||||
//
|
||||
const isAvatarChanged = changeKeys.includes(
|
||||
nameof<VUserComponent>('avatarSize')
|
||||
nameof<VUserComponent>('avatarSize'),
|
||||
);
|
||||
if (isAvatarChanged) {
|
||||
this.handleAvatarSizeChanged();
|
||||
@@ -887,7 +887,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
|
||||
//
|
||||
const isUserInfoColorChanged = changeKeys.includes(
|
||||
nameof<VUserComponent>('userInfoColor')
|
||||
nameof<VUserComponent>('userInfoColor'),
|
||||
);
|
||||
if (isUserInfoColorChanged) {
|
||||
//
|
||||
@@ -898,7 +898,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
|
||||
//
|
||||
const isPutUserInfoOnCardHeaderChanged = changeKeys.includes(
|
||||
nameof<VUserComponent>('putUserInfoOnCardHeader')
|
||||
nameof<VUserComponent>('putUserInfoOnCardHeader'),
|
||||
);
|
||||
if (isPutUserInfoOnCardHeaderChanged) {
|
||||
if (isNullOrUndefined(this.putUserInfoOnCardHeader)) {
|
||||
@@ -914,7 +914,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
|
||||
//
|
||||
const isAutoStylingSlotsChanged = changeKeys.includes(
|
||||
nameof<VUserComponent>('autoStylingSlots')
|
||||
nameof<VUserComponent>('autoStylingSlots'),
|
||||
);
|
||||
if (isAutoStylingSlotsChanged) {
|
||||
//
|
||||
@@ -925,7 +925,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
|
||||
//
|
||||
const isFriendshipActionsTypeChanged = changeKeys.includes(
|
||||
nameof<VUserComponent>('friendshipActionsType')
|
||||
nameof<VUserComponent>('friendshipActionsType'),
|
||||
);
|
||||
if (isFriendshipActionsTypeChanged) {
|
||||
if (isNullOrUndefined(isFriendshipActionsTypeChanged)) {
|
||||
@@ -936,7 +936,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
|
||||
//
|
||||
const isShowActionsOnProfileViewChanged = changeKeys.includes(
|
||||
nameof<VUserComponent>('showActionsOnProfileView')
|
||||
nameof<VUserComponent>('showActionsOnProfileView'),
|
||||
);
|
||||
if (isShowActionsOnProfileViewChanged) {
|
||||
if (isNullOrUndefined(this.showActionsOnProfileView)) {
|
||||
@@ -947,13 +947,13 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
|
||||
//
|
||||
const isAvatarSlotChanged = changeKeys.includes(
|
||||
nameof<VUserComponent>('avatarSlot')
|
||||
nameof<VUserComponent>('avatarSlot'),
|
||||
);
|
||||
const isFullNameSlotChanged = changeKeys.includes(
|
||||
nameof<VUserComponent>('fullNameSlot')
|
||||
nameof<VUserComponent>('fullNameSlot'),
|
||||
);
|
||||
const isFriendshipActionsSlotChanged = changeKeys.includes(
|
||||
nameof<VUserComponent>('friendshipActionsSlot')
|
||||
nameof<VUserComponent>('friendshipActionsSlot'),
|
||||
);
|
||||
if (
|
||||
isAvatarSlotChanged ||
|
||||
@@ -976,7 +976,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
this.applyTakeUntilWrapper(this.sharedService.user$).subscribe(
|
||||
async (up) => {
|
||||
await this.validateFieldsOnUser(up);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
//#endregion
|
||||
@@ -989,7 +989,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
* @param model
|
||||
*/
|
||||
validate(
|
||||
model?: Partial<XUserProfileDto>
|
||||
model?: Partial<XUserProfileDto>,
|
||||
): VModelValidationResult<XUserProfileDto> {
|
||||
//
|
||||
let result: VModelValidationResult<XUserProfileDto>;
|
||||
@@ -1014,7 +1014,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
!isNullOrUndefined(normalized) && !this.isSameAsDefault(normalized);
|
||||
if (!isValid) {
|
||||
validationErrors.push(
|
||||
this.getExceptionMessage(XExceptionIDs.InvalidArgs)
|
||||
this.getExceptionMessage(XExceptionIDs.InvalidArgs),
|
||||
);
|
||||
} else {
|
||||
//
|
||||
@@ -1026,8 +1026,8 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
if (!isValid) {
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.user_id
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidUserName)}`
|
||||
this.AppResourceIDs.user_id,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidUserName)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1037,8 +1037,8 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
if (!isValid) {
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.user_name
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidUserName)}`
|
||||
this.AppResourceIDs.user_name,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidUserName)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1050,8 +1050,8 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
if (!isValid) {
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.email
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidEmailAddress)}`
|
||||
this.AppResourceIDs.email,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidEmailAddress)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1063,8 +1063,8 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
if (!isValid) {
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.phone_number
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidMobileNumber)}`
|
||||
this.AppResourceIDs.phone_number,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidMobileNumber)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1078,8 +1078,8 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
if (!isValid) {
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.date_of_birth
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidData)}`
|
||||
this.AppResourceIDs.date_of_birth,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidData)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1089,8 +1089,8 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
if (!isValid) {
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.first_name
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.AppResourceIDs.first_name,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1100,8 +1100,8 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
if (!isValid) {
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.last_name
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.AppResourceIDs.last_name,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1113,8 +1113,8 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
if (!isValid) {
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.gender
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.AppResourceIDs.gender,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1124,13 +1124,13 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
!isNullOrUndefined(normalized.roles) &&
|
||||
this.hasChild(normalized.roles) &&
|
||||
normalized.roles.every((r: any) =>
|
||||
extractAvaialableRoles().includes(r)
|
||||
extractAvaialableRoles().includes(r),
|
||||
);
|
||||
if (!isValid) {
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.role
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.AppResourceIDs.role,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1204,8 +1204,8 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
!isNullOrUndefined(profile.avatar) &&
|
||||
!isNullOrEmptyString(profile.avatar)
|
||||
? profile.avatar
|
||||
: defaultAvatar
|
||||
)
|
||||
: defaultAvatar,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1216,7 +1216,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
*/
|
||||
getUserFullName() {
|
||||
return this.getValue(this.model).pipe(
|
||||
map((profile) => getFullName(profile))
|
||||
map((profile) => getFullName(profile)),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1245,7 +1245,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
|
||||
//
|
||||
return result;
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1277,7 +1277,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
|
||||
//
|
||||
return result;
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1291,7 +1291,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
wrapWithCard: this.getValue(this.wrapWithCard),
|
||||
putUserInfoOnCardHeader: this.getValue(this.putUserInfoOnCardHeader),
|
||||
}).pipe(
|
||||
map((info) => !(!!info.wrapWithCard && !!info.putUserInfoOnCardHeader))
|
||||
map((info) => !(!!info.wrapWithCard && !!info.putUserInfoOnCardHeader)),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1325,7 +1325,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
//
|
||||
return result;
|
||||
}),
|
||||
first()
|
||||
first(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1384,7 +1384,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
//
|
||||
return result;
|
||||
}),
|
||||
first()
|
||||
first(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1395,7 +1395,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
*/
|
||||
isFriendshipActionsSupported() {
|
||||
return this.getValue(this.supportFriendshipActions).pipe(
|
||||
map((isSupport) => isNullOrUndefined(isSupport) || !!isSupport)
|
||||
map((isSupport) => isNullOrUndefined(isSupport) || !!isSupport),
|
||||
);
|
||||
}
|
||||
//#endregion
|
||||
@@ -1493,14 +1493,14 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
// UnFollow Follower ...
|
||||
mTaskName = XFriendshipTasks.UnFollowFollower;
|
||||
mTask = this.sharedService.accountsService.unFollowFollower(
|
||||
event.destUser
|
||||
event.destUser,
|
||||
);
|
||||
} else if (event.type === XFriendshipType.Following) {
|
||||
//
|
||||
// UnFollow Following ...
|
||||
mTaskName = XFriendshipTasks.UnFollowFollowing;
|
||||
mTask = this.sharedService.accountsService.unFollowFollowing(
|
||||
event.destUser
|
||||
event.destUser,
|
||||
);
|
||||
}
|
||||
break;
|
||||
@@ -1645,7 +1645,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
'emailConfirmed',
|
||||
'phoneNumberConfirmed',
|
||||
],
|
||||
true
|
||||
true,
|
||||
);
|
||||
} else if (isAdmin) {
|
||||
//
|
||||
@@ -1677,7 +1677,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
'emailConfirmed',
|
||||
'phoneNumberConfirmed',
|
||||
],
|
||||
true
|
||||
true,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1710,7 +1710,7 @@ export class VUserComponent extends VBaseDtoComponent<XUserProfileDto> {
|
||||
//
|
||||
const mTaskName = XFriendshipTasks.LoadProfile;
|
||||
const mTask = this.sharedService.accountsService.getProfile(
|
||||
this.model.userId
|
||||
this.model.userId,
|
||||
);
|
||||
|
||||
//
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
import { defaultAvatar, defaultFullName } from './v-user.typings';
|
||||
import { XGender, XUserProfileDto } from 'x-framework-identity-sdk';
|
||||
import { AppResourceIDs } from 'src/app/config/localization.config';
|
||||
import { getTopRoleByRoles, XAvailableRoles } from 'x-mabsut-api-sdk';
|
||||
import { getTopRoleByRoles, XAvailableRoles } from 'x-saherelm-api-sdk';
|
||||
|
||||
/**
|
||||
* Generate User Full Name ...
|
||||
|
||||
@@ -32,9 +32,9 @@ import {
|
||||
VBaseDtoActionModel,
|
||||
VBaseDtoPresentType,
|
||||
} from '../../v-dto/v-dto.typings';
|
||||
import { defaultFileDto, XFileDto } from 'x-mabsut-api-sdk';
|
||||
import { VFilePresentType } from '../v-file/v-file.typings';
|
||||
import { VFileComponent } from '../v-file/v-file.component';
|
||||
import { defaultFileDto, XFileDto } from 'x-saherelm-api-sdk';
|
||||
import { VBaseComponent } from '../../classes/v-base.component';
|
||||
|
||||
@Component({
|
||||
@@ -206,7 +206,7 @@ export class VFileInputComponent extends VBaseComponent {
|
||||
* @returns
|
||||
*/
|
||||
private async handleCloseDialog(
|
||||
action?: VFileInputReturnActionIdentifier | any
|
||||
action?: VFileInputReturnActionIdentifier | any,
|
||||
) {
|
||||
//
|
||||
if (isNullOrUndefined(this.context) || isNullOrEmptyString(this.context)) {
|
||||
@@ -223,7 +223,7 @@ export class VFileInputComponent extends VBaseComponent {
|
||||
//
|
||||
case VFileInputModalContext.PopOver:
|
||||
await this.managerService.dialogService.popoverController.dismiss(
|
||||
action
|
||||
action,
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
isNullOrUndefined,
|
||||
XResourceIdentifier,
|
||||
} from 'x-framework-core';
|
||||
import { XFileDto } from 'x-mabsut-api-sdk';
|
||||
import { XFileDto } from 'x-saherelm-api-sdk';
|
||||
import { XFileStatus } from 'x-framework-components';
|
||||
import { FileLocalizationsResourceIDs } from './v-file.configs';
|
||||
import { AppResourceIDs } from 'src/app/config/localization.config';
|
||||
@@ -66,7 +66,7 @@ export function getFileStatus(
|
||||
file: File,
|
||||
allowedExtensions: Array<string> = [],
|
||||
minAllowedFileSize: number = 0,
|
||||
maxAllowedFileSize: number = 0
|
||||
maxAllowedFileSize: number = 0,
|
||||
) {
|
||||
//
|
||||
let result = XFileStatus.EMPTY;
|
||||
@@ -144,7 +144,7 @@ export function getFileStatus(
|
||||
export function getCanAddFileStatus(
|
||||
file: File,
|
||||
files: Array<XFileDto | File>,
|
||||
maxAllowedFiles: number = 0
|
||||
maxAllowedFiles: number = 0,
|
||||
) {
|
||||
//
|
||||
let result = XFileStatus.EMPTY;
|
||||
@@ -184,7 +184,7 @@ export function getCanAddFileStatus(
|
||||
export function getCanAddFileStatusByFilesCount(
|
||||
file: File,
|
||||
filesCount: number = 0,
|
||||
maxAllowedFiles: number = 0
|
||||
maxAllowedFiles: number = 0,
|
||||
) {
|
||||
//
|
||||
let result = XFileStatus.EMPTY;
|
||||
@@ -212,4 +212,3 @@ export function getCanAddFileStatusByFilesCount(
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,13 +12,6 @@ import {
|
||||
getFileTypeResourceID,
|
||||
getCanAddFileStatusByFilesCount,
|
||||
} from '../v-file.tools';
|
||||
import {
|
||||
XFileDto,
|
||||
XPersonDto,
|
||||
XReferenceDto,
|
||||
defaultFileDto,
|
||||
prepareFileDtoFields,
|
||||
} from 'x-mabsut-api-sdk';
|
||||
import {
|
||||
toArray,
|
||||
XFileType,
|
||||
@@ -35,6 +28,13 @@ import {
|
||||
XResourceIdentifier,
|
||||
XExceptionIdentifier,
|
||||
} from 'x-framework-core';
|
||||
import {
|
||||
XFileDto,
|
||||
XPersonDto,
|
||||
XReferenceDto,
|
||||
defaultFileDto,
|
||||
prepareFileDtoFields,
|
||||
} from 'x-saherelm-api-sdk';
|
||||
import {
|
||||
VFilePresentType,
|
||||
isVFilePresentType,
|
||||
@@ -129,7 +129,7 @@ export class VFileComponent extends VBaseDtoComponent<XFileDto> {
|
||||
type: this.ModelFieldTypes.Number,
|
||||
valueProvider: (value) => {
|
||||
return this.applyLocale(
|
||||
this.resourceProvider(getFileTypeResourceID(value))
|
||||
this.resourceProvider(getFileTypeResourceID(value)),
|
||||
);
|
||||
},
|
||||
} as VModelFieldDescriptor<XFileType>,
|
||||
@@ -352,7 +352,7 @@ export class VFileComponent extends VBaseDtoComponent<XFileDto> {
|
||||
//
|
||||
// Reference Present Type ...
|
||||
isChanged = changeKeys.includes(
|
||||
nameofInstance(this, 'referencePresentType')
|
||||
nameofInstance(this, 'referencePresentType'),
|
||||
);
|
||||
if (isChanged) {
|
||||
//
|
||||
@@ -499,7 +499,7 @@ export class VFileComponent extends VBaseDtoComponent<XFileDto> {
|
||||
* @param event
|
||||
*/
|
||||
async handleFileUploadFileChanges(
|
||||
event: XOneOrManyType<File | XFileBlob | any>
|
||||
event: XOneOrManyType<File | XFileBlob | any>,
|
||||
) {
|
||||
//
|
||||
// Validate ...
|
||||
@@ -522,7 +522,7 @@ export class VFileComponent extends VBaseDtoComponent<XFileDto> {
|
||||
file,
|
||||
this.fileUploadAllowedExtensions,
|
||||
this.fileUploadMinAllowedFileSize,
|
||||
this.fileUploadMaxAllowedFileSize
|
||||
this.fileUploadMaxAllowedFileSize,
|
||||
);
|
||||
|
||||
//
|
||||
@@ -536,7 +536,7 @@ export class VFileComponent extends VBaseDtoComponent<XFileDto> {
|
||||
{
|
||||
exception,
|
||||
dissmissable: true,
|
||||
}
|
||||
},
|
||||
);
|
||||
throwException(exception);
|
||||
}
|
||||
@@ -546,7 +546,7 @@ export class VFileComponent extends VBaseDtoComponent<XFileDto> {
|
||||
getCanAddFileStatusByFilesCount(
|
||||
file,
|
||||
this.fileUploadFilesCount,
|
||||
this.fileUploadMaxAllowedFiles
|
||||
this.fileUploadMaxAllowedFiles,
|
||||
) === XFileStatus.OK;
|
||||
if (!isValid) {
|
||||
//
|
||||
@@ -556,7 +556,7 @@ export class VFileComponent extends VBaseDtoComponent<XFileDto> {
|
||||
{
|
||||
exception,
|
||||
dissmissable: true,
|
||||
}
|
||||
},
|
||||
);
|
||||
throwException(exception);
|
||||
}
|
||||
@@ -622,12 +622,12 @@ export class VFileComponent extends VBaseDtoComponent<XFileDto> {
|
||||
setTimeout(
|
||||
() =>
|
||||
this.referencesListActionProvider.next({ action: XListAction.Refresh }),
|
||||
200
|
||||
200,
|
||||
);
|
||||
setTimeout(
|
||||
() =>
|
||||
this.referencesListActionProvider.next({ action: XListAction.Refresh }),
|
||||
500
|
||||
500,
|
||||
);
|
||||
|
||||
//
|
||||
@@ -703,7 +703,7 @@ export class VFileComponent extends VBaseDtoComponent<XFileDto> {
|
||||
if (!isValid) {
|
||||
//
|
||||
validationErrors.push(
|
||||
this.getExceptionMessage(XExceptionIDs.InvalidArgs)
|
||||
this.getExceptionMessage(XExceptionIDs.InvalidArgs),
|
||||
);
|
||||
} else {
|
||||
//
|
||||
@@ -719,8 +719,8 @@ export class VFileComponent extends VBaseDtoComponent<XFileDto> {
|
||||
//
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.ResourceIDs.type
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.ResourceIDs.type,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -731,8 +731,8 @@ export class VFileComponent extends VBaseDtoComponent<XFileDto> {
|
||||
//
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.name
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.AppResourceIDs.name,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -743,8 +743,8 @@ export class VFileComponent extends VBaseDtoComponent<XFileDto> {
|
||||
//
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.path
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.AppResourceIDs.path,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -755,8 +755,8 @@ export class VFileComponent extends VBaseDtoComponent<XFileDto> {
|
||||
//
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.uploaded_on
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.AppResourceIDs.uploaded_on,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -851,8 +851,8 @@ export class VFileComponent extends VBaseDtoComponent<XFileDto> {
|
||||
(fd) =>
|
||||
fd.key === this.FieldNames.owner &&
|
||||
!!fd.hasCustomTemplate &&
|
||||
!isNullOrUndefined(fd.template)
|
||||
)
|
||||
!isNullOrUndefined(fd.template),
|
||||
),
|
||||
);
|
||||
|
||||
//
|
||||
@@ -862,8 +862,8 @@ export class VFileComponent extends VBaseDtoComponent<XFileDto> {
|
||||
(fd) =>
|
||||
fd.key === this.FieldNames.references &&
|
||||
!!fd.hasCustomTemplate &&
|
||||
!isNullOrUndefined(fd.template)
|
||||
)
|
||||
!isNullOrUndefined(fd.template),
|
||||
),
|
||||
);
|
||||
|
||||
//
|
||||
@@ -907,7 +907,7 @@ export class VFileComponent extends VBaseDtoComponent<XFileDto> {
|
||||
? this.ownerRef
|
||||
: fd.template,
|
||||
};
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -947,7 +947,7 @@ export class VFileComponent extends VBaseDtoComponent<XFileDto> {
|
||||
? this.referencesRef
|
||||
: fd.template,
|
||||
};
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,12 +32,15 @@ import {
|
||||
VFilesPresenterPresentTypeIdentfier,
|
||||
} from './v-files-presenter.typings';
|
||||
import { Observable, Subject } from 'rxjs';
|
||||
import { isXFileDto, XFileDto } from 'x-mabsut-api-sdk';
|
||||
import {
|
||||
VFileInputFilePrperties,
|
||||
VFileInputModalContext,
|
||||
} from '../v-file-input/v-file-input.typings';
|
||||
import { isXFileDto, XFileDto } from 'x-saherelm-api-sdk';
|
||||
import { VFilePresentType } from '../v-file/v-file.typings';
|
||||
import { VBaseInCardComponent } from '../../classes/v-base.component';
|
||||
import { VFileInputComponent } from '../v-file-input/v-file-input.component';
|
||||
import { XSimpleActionBarItem } from '../../typings/simple.actionbar.typings';
|
||||
import { VFileInputFilePrperties, VFileInputModalContext } from '../v-file-input/v-file-input.typings';
|
||||
import { defaultRemoveSlideOption } from '../../constants/slide.options.defaults';
|
||||
import { XSimpleListItemSlideOption } from '../../typings/simple.list-item.typings';
|
||||
|
||||
@@ -52,7 +55,7 @@ export class VFilesPresenterComponent extends VBaseInCardComponent {
|
||||
//#region Props ...
|
||||
readonly FilesPresenterPresentTypes = Object.assign(
|
||||
{},
|
||||
VFilesPresenterPresentType
|
||||
VFilesPresenterPresentType,
|
||||
);
|
||||
readonly FilePresentTypes = Object.assign({}, VFilePresentType);
|
||||
|
||||
@@ -77,13 +80,13 @@ export class VFilesPresenterComponent extends VBaseInCardComponent {
|
||||
|
||||
@Input()
|
||||
filesReader: Observable<Array<XFileDto>> = undefined;
|
||||
|
||||
|
||||
@Input()
|
||||
fileProperties: VFileInputFilePrperties;
|
||||
|
||||
@Input()
|
||||
fileActionsProvider: (
|
||||
file: XFileDto | File
|
||||
file: XFileDto | File,
|
||||
) => Array<XSimpleListItemSlideOption> = (f) => {
|
||||
return [
|
||||
//
|
||||
@@ -157,7 +160,7 @@ export class VFilesPresenterComponent extends VBaseInCardComponent {
|
||||
//
|
||||
// Tag Action Provider ...
|
||||
isChanged = changeKeys.includes(
|
||||
nameofInstance(this, 'fileActionsProvider')
|
||||
nameofInstance(this, 'fileActionsProvider'),
|
||||
);
|
||||
if (isChanged) {
|
||||
//
|
||||
@@ -226,7 +229,7 @@ export class VFilesPresenterComponent extends VBaseInCardComponent {
|
||||
//
|
||||
// File Background Color ...
|
||||
isChanged = changeKeys.includes(
|
||||
nameofInstance(this, 'fileBackgroundColor')
|
||||
nameofInstance(this, 'fileBackgroundColor'),
|
||||
);
|
||||
if (isChanged) {
|
||||
//
|
||||
@@ -381,7 +384,7 @@ export class VFilesPresenterComponent extends VBaseInCardComponent {
|
||||
*/
|
||||
handleActionClicked(
|
||||
file: XFileDto | File,
|
||||
action: XSimpleListItemSlideOption
|
||||
action: XSimpleListItemSlideOption,
|
||||
) {
|
||||
//
|
||||
// Validate ...
|
||||
@@ -410,13 +413,13 @@ export class VFilesPresenterComponent extends VBaseInCardComponent {
|
||||
//
|
||||
// Checking in List Items ...
|
||||
let idx = this.filesListItems.findIndex((fli) =>
|
||||
this.isSame(file, fli.data)
|
||||
this.isSame(file, fli.data),
|
||||
);
|
||||
if (idx >= 0) {
|
||||
//
|
||||
this.filesListItems = [
|
||||
...this.filesListItems.filter(
|
||||
(fli) => !this.isSame(file, fli.data)
|
||||
(fli) => !this.isSame(file, fli.data),
|
||||
),
|
||||
];
|
||||
|
||||
@@ -424,11 +427,11 @@ export class VFilesPresenterComponent extends VBaseInCardComponent {
|
||||
this.listActionProvider.next({ action: XListAction.Refresh });
|
||||
setTimeout(
|
||||
() => this.listActionProvider.next({ action: XListAction.Refresh }),
|
||||
200
|
||||
200,
|
||||
);
|
||||
setTimeout(
|
||||
() => this.listActionProvider.next({ action: XListAction.Refresh }),
|
||||
500
|
||||
500,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -469,7 +472,7 @@ export class VFilesPresenterComponent extends VBaseInCardComponent {
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}) < 0)
|
||||
}) < 0),
|
||||
);
|
||||
|
||||
//
|
||||
@@ -491,7 +494,7 @@ export class VFilesPresenterComponent extends VBaseInCardComponent {
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}) < 0
|
||||
}) < 0,
|
||||
);
|
||||
|
||||
//
|
||||
@@ -540,7 +543,7 @@ export class VFilesPresenterComponent extends VBaseInCardComponent {
|
||||
*/
|
||||
handleListItemOrdersChanged() {
|
||||
//
|
||||
const orderFiles = this.filesListItems.map(fli => fli.data);
|
||||
const orderFiles = this.filesListItems.map((fli) => fli.data);
|
||||
this.files = [...orderFiles];
|
||||
this.handlePrepareFilesState();
|
||||
}
|
||||
@@ -618,18 +621,18 @@ export class VFilesPresenterComponent extends VBaseInCardComponent {
|
||||
data: f,
|
||||
slideOptions: this.fileActionsProvider(f),
|
||||
} as XListItem<XFileDto | File>;
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
//
|
||||
this.listActionProvider.next({ action: XListAction.Refresh });
|
||||
setTimeout(
|
||||
() => this.listActionProvider.next({ action: XListAction.Refresh }),
|
||||
200
|
||||
200,
|
||||
);
|
||||
setTimeout(
|
||||
() => this.listActionProvider.next({ action: XListAction.Refresh }),
|
||||
500
|
||||
500,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -664,7 +667,7 @@ export class VFilesPresenterComponent extends VBaseInCardComponent {
|
||||
|
||||
//
|
||||
await this.handleAction(event.action, event.payload);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -729,7 +732,7 @@ export class VFilesPresenterComponent extends VBaseInCardComponent {
|
||||
this.listActionProvider.next({ action: XListAction.Refresh });
|
||||
setTimeout(
|
||||
() => this.listActionProvider.next({ action: XListAction.Refresh }),
|
||||
500
|
||||
500,
|
||||
);
|
||||
this.handlePrepareFilesState();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { XFileDto } from 'x-mabsut-api-sdk';
|
||||
import { XFileDto } from 'x-saherelm-api-sdk';
|
||||
import { XBaseActionModel } from 'x-framework-components';
|
||||
import { isValueInEnum } from '../../tools/v-base.tools';
|
||||
|
||||
@@ -30,8 +30,7 @@ export enum VFilesPresenterAction {
|
||||
|
||||
export type VFilesPresenterActionIdentifier = VFilesPresenterAction | string;
|
||||
|
||||
export interface VFilesPresenterActionModel
|
||||
extends XBaseActionModel<VFilesPresenterAction> {}
|
||||
export interface VFilesPresenterActionModel extends XBaseActionModel<VFilesPresenterAction> {}
|
||||
|
||||
export function isVFilesPresenterAction(value: string) {
|
||||
return isValueInEnum(value, Object.assign({}, VFilesPresenterAction));
|
||||
|
||||
@@ -32,7 +32,7 @@ import {
|
||||
XButtonType,
|
||||
XIconIdentifier,
|
||||
} from 'x-framework-components';
|
||||
import { XFileDto } from 'x-mabsut-api-sdk';
|
||||
import { XFileDto } from 'x-saherelm-api-sdk';
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { SafeUrl } from '@angular/platform-browser';
|
||||
import { FileLocalizationsResourceIDs } from '../v-file.configs';
|
||||
@@ -578,7 +578,7 @@ export class VMediaComponent extends VBaseInCardComponent {
|
||||
this.detectType(value);
|
||||
this.safeUrl =
|
||||
this.sharedService.managerService.securityService.toSafeURL(
|
||||
URL.createObjectURL(value)
|
||||
URL.createObjectURL(value),
|
||||
);
|
||||
} else if (isXFileBlob(this.src)) {
|
||||
//
|
||||
@@ -601,7 +601,7 @@ export class VMediaComponent extends VBaseInCardComponent {
|
||||
this.detectType(value);
|
||||
this.url = undefined;
|
||||
this.safeUrl = this.sharedService.managerService.securityService.toSafeURL(
|
||||
URL.createObjectURL(value)
|
||||
URL.createObjectURL(value),
|
||||
);
|
||||
this.info = value.name;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
isNullOrUndefined,
|
||||
isNullOrEmptyString,
|
||||
} from 'x-framework-core';
|
||||
import { isXFileDto, XFileDto } from 'x-mabsut-api-sdk';
|
||||
import { isXFileDto, XFileDto } from 'x-saherelm-api-sdk';
|
||||
import { XBaseActionModel } from 'x-framework-components';
|
||||
import { isValueInEnum } from 'src/app/views/tools/v-base.tools';
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
XLocaleResourceDto,
|
||||
defaultLocaleResourceDto,
|
||||
prepareLocaleResourceDtoFields,
|
||||
} from 'x-mabsut-api-sdk';
|
||||
} from 'x-saherelm-api-sdk';
|
||||
import {
|
||||
nthItems,
|
||||
getFieldNames,
|
||||
@@ -205,7 +205,7 @@ export class VLocaleComponent extends VBaseDtoComponent<XLocaleResourceDto> {
|
||||
* @param model
|
||||
*/
|
||||
validate(
|
||||
model?: Partial<XLocaleResourceDto>
|
||||
model?: Partial<XLocaleResourceDto>,
|
||||
): VModelValidationResult<XLocaleResourceDto> {
|
||||
//
|
||||
let result: VModelValidationResult<XLocaleResourceDto>;
|
||||
@@ -228,7 +228,7 @@ export class VLocaleComponent extends VBaseDtoComponent<XLocaleResourceDto> {
|
||||
if (!isValid) {
|
||||
//
|
||||
validationErrors.push(
|
||||
this.getExceptionMessage(XExceptionIDs.InvalidArgs)
|
||||
this.getExceptionMessage(XExceptionIDs.InvalidArgs),
|
||||
);
|
||||
} else {
|
||||
//
|
||||
@@ -241,8 +241,8 @@ export class VLocaleComponent extends VBaseDtoComponent<XLocaleResourceDto> {
|
||||
//
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.ResourceIDs.language
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.ResourceIDs.language,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -253,8 +253,8 @@ export class VLocaleComponent extends VBaseDtoComponent<XLocaleResourceDto> {
|
||||
//
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.ResourceIDs.translation
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.ResourceIDs.translation,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -323,17 +323,18 @@ export class VLocaleComponent extends VBaseDtoComponent<XLocaleResourceDto> {
|
||||
}
|
||||
|
||||
//
|
||||
const request = this.sharedService.mabsutAPIService.strings.stringProviderService
|
||||
.languages()
|
||||
.pipe(
|
||||
map((languages) => {
|
||||
//
|
||||
this.availableLanguages = [...languages];
|
||||
const request =
|
||||
this.sharedService.saherElmAPIService.strings.stringProviderService
|
||||
.languages()
|
||||
.pipe(
|
||||
map((languages) => {
|
||||
//
|
||||
this.availableLanguages = [...languages];
|
||||
|
||||
//
|
||||
this.prepareLanguageAutoComplete();
|
||||
})
|
||||
);
|
||||
//
|
||||
this.prepareLanguageAutoComplete();
|
||||
}),
|
||||
);
|
||||
|
||||
//
|
||||
await this.getValueAsync(request);
|
||||
@@ -366,7 +367,7 @@ export class VLocaleComponent extends VBaseDtoComponent<XLocaleResourceDto> {
|
||||
) {
|
||||
//
|
||||
const languageFD = this.fieldDescriptors.find(
|
||||
(fd) => fd.key == this.FieldNames.language
|
||||
(fd) => fd.key == this.FieldNames.language,
|
||||
);
|
||||
if (languageFD.allowFieldForm) {
|
||||
//
|
||||
@@ -415,7 +416,7 @@ export class VLocaleComponent extends VBaseDtoComponent<XLocaleResourceDto> {
|
||||
inField = true;
|
||||
canDo = this.isFormView(this.FieldNames.language);
|
||||
fcIDX = this.inFormFieldsFormConfigs.findIndex(
|
||||
(f) => f.name === this.FieldNames.language
|
||||
(f) => f.name === this.FieldNames.language,
|
||||
);
|
||||
}
|
||||
//
|
||||
@@ -430,7 +431,7 @@ export class VLocaleComponent extends VBaseDtoComponent<XLocaleResourceDto> {
|
||||
|
||||
//
|
||||
fcIDX = this.modelFormConfig.controls.findIndex(
|
||||
(f) => f.propName === this.FieldNames.language
|
||||
(f) => f.propName === this.FieldNames.language,
|
||||
);
|
||||
if (fcIDX >= 0) {
|
||||
fcIDX = this.modelFormConfig.controls[fcIDX].index;
|
||||
@@ -570,7 +571,7 @@ export class VLocaleComponent extends VBaseDtoComponent<XLocaleResourceDto> {
|
||||
//
|
||||
// Check HasChild Items or not ...
|
||||
this.isLanguageAutoCompleteOpened = this.hasChild(
|
||||
this.languageAutoCompleteItems
|
||||
this.languageAutoCompleteItems,
|
||||
);
|
||||
|
||||
//
|
||||
@@ -589,7 +590,7 @@ export class VLocaleComponent extends VBaseDtoComponent<XLocaleResourceDto> {
|
||||
const filteredItems = this.availableLanguages.filter(
|
||||
(i) =>
|
||||
toNormalString(i).includes(this.languageAutoCompleteQuery) &&
|
||||
toNormalString(i) !== this.languageAutoCompleteQuery
|
||||
toNormalString(i) !== this.languageAutoCompleteQuery,
|
||||
);
|
||||
if (this.hasChild(filteredItems)) {
|
||||
//
|
||||
@@ -608,7 +609,7 @@ export class VLocaleComponent extends VBaseDtoComponent<XLocaleResourceDto> {
|
||||
|
||||
//
|
||||
this.isLanguageAutoCompleteOpened = this.hasChild(
|
||||
this.languageAutoCompleteItems
|
||||
this.languageAutoCompleteItems,
|
||||
);
|
||||
|
||||
//
|
||||
|
||||
@@ -4,18 +4,18 @@ import {
|
||||
TemplateRef,
|
||||
ChangeDetectionStrategy,
|
||||
} from '@angular/core';
|
||||
import {
|
||||
XResourceDto,
|
||||
XLocaleResourceDto,
|
||||
defaultResourceDto,
|
||||
prepareResourceDtoFields,
|
||||
} from 'x-mabsut-api-sdk';
|
||||
import {
|
||||
getFieldNames,
|
||||
XExceptionIDs,
|
||||
XStandardType,
|
||||
isNullOrUndefined,
|
||||
} from 'x-framework-core';
|
||||
import {
|
||||
XResourceDto,
|
||||
XLocaleResourceDto,
|
||||
defaultResourceDto,
|
||||
prepareResourceDtoFields,
|
||||
} from 'x-saherelm-api-sdk';
|
||||
import {
|
||||
XFormControlType,
|
||||
XFormControlAppearance,
|
||||
@@ -146,7 +146,7 @@ export class VResourceComponent extends VBaseDtoComponent<XResourceDto> {
|
||||
event: VModelState<XLocaleResourceDto>,
|
||||
key: string,
|
||||
index: number,
|
||||
vale: XLocaleResourceDto
|
||||
vale: XLocaleResourceDto,
|
||||
) {
|
||||
// //
|
||||
// const fdIDX = this.fieldDescriptors.findIndex((f) => f.key === key);
|
||||
@@ -191,7 +191,7 @@ export class VResourceComponent extends VBaseDtoComponent<XResourceDto> {
|
||||
* @param model
|
||||
*/
|
||||
validate(
|
||||
model?: Partial<XResourceDto>
|
||||
model?: Partial<XResourceDto>,
|
||||
): VModelValidationResult<XResourceDto> {
|
||||
//
|
||||
let result: VModelValidationResult<XResourceDto>;
|
||||
@@ -214,7 +214,7 @@ export class VResourceComponent extends VBaseDtoComponent<XResourceDto> {
|
||||
if (!isValid) {
|
||||
//
|
||||
validationErrors.push(
|
||||
this.getExceptionMessage(XExceptionIDs.InvalidArgs)
|
||||
this.getExceptionMessage(XExceptionIDs.InvalidArgs),
|
||||
);
|
||||
} else {
|
||||
//
|
||||
@@ -273,7 +273,7 @@ export class VResourceComponent extends VBaseDtoComponent<XResourceDto> {
|
||||
|
||||
//
|
||||
const fdIDX = this.fieldDescriptors.findIndex(
|
||||
(fd) => fd.key === this.FieldNames.locales
|
||||
(fd) => fd.key === this.FieldNames.locales,
|
||||
);
|
||||
if (fdIDX < 0) {
|
||||
return;
|
||||
|
||||
@@ -4,11 +4,6 @@ import {
|
||||
TemplateRef,
|
||||
ChangeDetectionStrategy,
|
||||
} from '@angular/core';
|
||||
import {
|
||||
XStringDto,
|
||||
defaultStringDto,
|
||||
prepareStringDtoFields,
|
||||
} from 'x-mabsut-api-sdk';
|
||||
import {
|
||||
nthItems,
|
||||
getFieldNames,
|
||||
@@ -19,6 +14,11 @@ import {
|
||||
isNullOrUndefined,
|
||||
isNullOrEmptyString,
|
||||
} from 'x-framework-core';
|
||||
import {
|
||||
XStringDto,
|
||||
defaultStringDto,
|
||||
prepareStringDtoFields,
|
||||
} from 'x-saherelm-api-sdk';
|
||||
import {
|
||||
XListItem,
|
||||
XFormControlType,
|
||||
@@ -274,7 +274,7 @@ export class VStringComponent extends VBaseDtoComponent<XStringDto> {
|
||||
if (!isValid) {
|
||||
//
|
||||
validationErrors.push(
|
||||
this.getExceptionMessage(XExceptionIDs.InvalidArgs)
|
||||
this.getExceptionMessage(XExceptionIDs.InvalidArgs),
|
||||
);
|
||||
} else {
|
||||
//
|
||||
@@ -290,8 +290,8 @@ export class VStringComponent extends VBaseDtoComponent<XStringDto> {
|
||||
//
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.ResourceIDs.language
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.ResourceIDs.language,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -302,8 +302,8 @@ export class VStringComponent extends VBaseDtoComponent<XStringDto> {
|
||||
//
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.resource_title
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.AppResourceIDs.resource_title,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -314,8 +314,8 @@ export class VStringComponent extends VBaseDtoComponent<XStringDto> {
|
||||
//
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.ResourceIDs.translation
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.ResourceIDs.translation,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -386,17 +386,18 @@ export class VStringComponent extends VBaseDtoComponent<XStringDto> {
|
||||
}
|
||||
|
||||
//
|
||||
const request = this.sharedService.mabsutAPIService.strings.stringProviderService
|
||||
.languages()
|
||||
.pipe(
|
||||
map((languages) => {
|
||||
//
|
||||
this.availableLanguages = [...languages];
|
||||
const request =
|
||||
this.sharedService.saherElmAPIService.strings.stringProviderService
|
||||
.languages()
|
||||
.pipe(
|
||||
map((languages) => {
|
||||
//
|
||||
this.availableLanguages = [...languages];
|
||||
|
||||
//
|
||||
this.prepareLanguageAutoComplete();
|
||||
})
|
||||
);
|
||||
//
|
||||
this.prepareLanguageAutoComplete();
|
||||
}),
|
||||
);
|
||||
|
||||
//
|
||||
await this.getValueAsync(request);
|
||||
@@ -429,7 +430,7 @@ export class VStringComponent extends VBaseDtoComponent<XStringDto> {
|
||||
) {
|
||||
//
|
||||
const languageFD = this.fieldDescriptors.find(
|
||||
(fd) => fd.key == this.FieldNames.language
|
||||
(fd) => fd.key == this.FieldNames.language,
|
||||
);
|
||||
if (languageFD.allowFieldForm) {
|
||||
//
|
||||
@@ -478,7 +479,7 @@ export class VStringComponent extends VBaseDtoComponent<XStringDto> {
|
||||
inField = true;
|
||||
canDo = this.isFormView(this.FieldNames.language);
|
||||
fcIDX = this.inFormFieldsFormConfigs.findIndex(
|
||||
(f) => f.name === this.FieldNames.language
|
||||
(f) => f.name === this.FieldNames.language,
|
||||
);
|
||||
}
|
||||
//
|
||||
@@ -493,7 +494,7 @@ export class VStringComponent extends VBaseDtoComponent<XStringDto> {
|
||||
|
||||
//
|
||||
fcIDX = this.modelFormConfig.controls.findIndex(
|
||||
(f) => f.propName === this.FieldNames.language
|
||||
(f) => f.propName === this.FieldNames.language,
|
||||
);
|
||||
if (fcIDX >= 0) {
|
||||
fcIDX = this.modelFormConfig.controls[fcIDX].index;
|
||||
@@ -633,7 +634,7 @@ export class VStringComponent extends VBaseDtoComponent<XStringDto> {
|
||||
//
|
||||
// Check HasChild Items or not ...
|
||||
this.isLanguageAutoCompleteOpened = this.hasChild(
|
||||
this.languageAutoCompleteItems
|
||||
this.languageAutoCompleteItems,
|
||||
);
|
||||
|
||||
//
|
||||
@@ -652,7 +653,7 @@ export class VStringComponent extends VBaseDtoComponent<XStringDto> {
|
||||
const filteredItems = this.availableLanguages.filter(
|
||||
(i) =>
|
||||
toNormalString(i).includes(this.languageAutoCompleteQuery) &&
|
||||
toNormalString(i) !== this.languageAutoCompleteQuery
|
||||
toNormalString(i) !== this.languageAutoCompleteQuery,
|
||||
);
|
||||
if (this.hasChild(filteredItems)) {
|
||||
//
|
||||
@@ -671,7 +672,7 @@ export class VStringComponent extends VBaseDtoComponent<XStringDto> {
|
||||
|
||||
//
|
||||
this.isLanguageAutoCompleteOpened = this.hasChild(
|
||||
this.languageAutoCompleteItems
|
||||
this.languageAutoCompleteItems,
|
||||
);
|
||||
|
||||
//
|
||||
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
VBaseDtoPresentType,
|
||||
VBaseDtoModelFiredActionModel,
|
||||
} from '../../v-dto/v-dto.typings';
|
||||
import { XTagDto } from 'x-mabsut-api-sdk';
|
||||
import { XTagDto } from 'x-saherelm-api-sdk';
|
||||
import { VBaseComponent } from '../../classes/v-base.component';
|
||||
|
||||
@Component({
|
||||
@@ -178,7 +178,7 @@ export class VTagInputComponent extends VBaseComponent {
|
||||
* @returns
|
||||
*/
|
||||
private async handleCloseDialog(
|
||||
action?: VTagInputReturnActionIdentifier | any
|
||||
action?: VTagInputReturnActionIdentifier | any,
|
||||
) {
|
||||
//
|
||||
if (isNullOrUndefined(this.context) || isNullOrEmptyString(this.context)) {
|
||||
@@ -189,15 +189,13 @@ export class VTagInputComponent extends VBaseComponent {
|
||||
switch (this.context) {
|
||||
//
|
||||
case VTagInputModalContext.Modal:
|
||||
await this.managerService.dialogService.modalController.dismiss(
|
||||
action
|
||||
);
|
||||
await this.managerService.dialogService.modalController.dismiss(action);
|
||||
break;
|
||||
|
||||
//
|
||||
case VTagInputModalContext.PopOver:
|
||||
await this.managerService.dialogService.popoverController.dismiss(
|
||||
action
|
||||
action,
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
defaultTagDto,
|
||||
XReferenceDto,
|
||||
prepareTagDtoFields,
|
||||
} from 'x-mabsut-api-sdk';
|
||||
} from 'x-saherelm-api-sdk';
|
||||
import { Subject } from 'rxjs';
|
||||
import {
|
||||
VBaseDtoComponent,
|
||||
@@ -180,7 +180,7 @@ export class VTagComponent extends VBaseDtoComponent<XTagDto> {
|
||||
//
|
||||
// Reference Present Type ...
|
||||
isChanged = changeKeys.includes(
|
||||
nameofInstance(this, 'referencePresentType')
|
||||
nameofInstance(this, 'referencePresentType'),
|
||||
);
|
||||
if (isChanged) {
|
||||
//
|
||||
@@ -224,12 +224,12 @@ export class VTagComponent extends VBaseDtoComponent<XTagDto> {
|
||||
setTimeout(
|
||||
() =>
|
||||
this.referencesListActionProvider.next({ action: XListAction.Refresh }),
|
||||
200
|
||||
200,
|
||||
);
|
||||
setTimeout(
|
||||
() =>
|
||||
this.referencesListActionProvider.next({ action: XListAction.Refresh }),
|
||||
500
|
||||
500,
|
||||
);
|
||||
|
||||
//
|
||||
@@ -277,7 +277,7 @@ export class VTagComponent extends VBaseDtoComponent<XTagDto> {
|
||||
if (!isValid) {
|
||||
//
|
||||
validationErrors.push(
|
||||
this.getExceptionMessage(XExceptionIDs.InvalidArgs)
|
||||
this.getExceptionMessage(XExceptionIDs.InvalidArgs),
|
||||
);
|
||||
} else {
|
||||
//
|
||||
@@ -290,8 +290,8 @@ export class VTagComponent extends VBaseDtoComponent<XTagDto> {
|
||||
//
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.tag
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.AppResourceIDs.tag,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -395,7 +395,7 @@ export class VTagComponent extends VBaseDtoComponent<XTagDto> {
|
||||
? this.referencesRef
|
||||
: fd.template,
|
||||
};
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import {
|
||||
VTagsPresenterPresentTypeIdentfier,
|
||||
} from './v-tags-presenter.typings';
|
||||
import { Observable, Subject } from 'rxjs';
|
||||
import { defaultTagDto, XTagDto } from 'x-mabsut-api-sdk';
|
||||
import { defaultTagDto, XTagDto } from 'x-saherelm-api-sdk';
|
||||
import { VBaseDtoPresentType } from '../../v-dto/v-dto.typings';
|
||||
import { VBaseInCardComponent } from '../../classes/v-base.component';
|
||||
import { VTagInputComponent } from '../v-tag-input/v-tag-input.component';
|
||||
@@ -53,7 +53,7 @@ export class VTagsPresenterComponent extends VBaseInCardComponent {
|
||||
//#region Props ...
|
||||
readonly TagsPresenterPresentTypes = Object.assign(
|
||||
{},
|
||||
VTagsPresenterPresentType
|
||||
VTagsPresenterPresentType,
|
||||
);
|
||||
readonly TagPresentTypes = Object.assign({}, VBaseDtoPresentType);
|
||||
|
||||
@@ -84,7 +84,7 @@ export class VTagsPresenterComponent extends VBaseInCardComponent {
|
||||
|
||||
@Input()
|
||||
tagActionsProvider: (tag: string) => Array<XSimpleListItemSlideOption> = (
|
||||
t
|
||||
t,
|
||||
) => {
|
||||
return [
|
||||
//
|
||||
@@ -363,7 +363,7 @@ export class VTagsPresenterComponent extends VBaseInCardComponent {
|
||||
!isNullOrUndefined(this.tags) &&
|
||||
this.hasChild(this.tags) &&
|
||||
this.tags.findIndex(
|
||||
(t) => toNormalString(t) === toNormalString(tag.tag)
|
||||
(t) => toNormalString(t) === toNormalString(tag.tag),
|
||||
) >= 0;
|
||||
if (isExists) {
|
||||
return;
|
||||
@@ -390,11 +390,11 @@ export class VTagsPresenterComponent extends VBaseInCardComponent {
|
||||
this.listActionProvider.next({ action: XListAction.Refresh });
|
||||
setTimeout(
|
||||
() => this.listActionProvider.next({ action: XListAction.Refresh }),
|
||||
200
|
||||
200,
|
||||
);
|
||||
setTimeout(
|
||||
() => this.listActionProvider.next({ action: XListAction.Refresh }),
|
||||
500
|
||||
500,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -429,7 +429,7 @@ export class VTagsPresenterComponent extends VBaseInCardComponent {
|
||||
let tagIDX =
|
||||
!isNullOrUndefined(this.tags) && this.hasChild(this.tags)
|
||||
? this.tags.findIndex(
|
||||
(t) => toNormalString(t) === toNormalString(tag)
|
||||
(t) => toNormalString(t) === toNormalString(tag),
|
||||
)
|
||||
: -1;
|
||||
let isExists = tagIDX >= 0;
|
||||
@@ -442,13 +442,13 @@ export class VTagsPresenterComponent extends VBaseInCardComponent {
|
||||
//
|
||||
// Checking in List Items ...
|
||||
let tagIDX = this.tagsListItems.findIndex(
|
||||
(tli) => toNormalString(tli.data) === toNormalString(tag)
|
||||
(tli) => toNormalString(tli.data) === toNormalString(tag),
|
||||
);
|
||||
if (tagIDX >= 0) {
|
||||
//
|
||||
this.tagsListItems = [
|
||||
...this.tagsListItems.filter(
|
||||
(tli) => toNormalString(tli.data) !== toNormalString(tag)
|
||||
(tli) => toNormalString(tli.data) !== toNormalString(tag),
|
||||
),
|
||||
];
|
||||
|
||||
@@ -456,11 +456,11 @@ export class VTagsPresenterComponent extends VBaseInCardComponent {
|
||||
this.listActionProvider.next({ action: XListAction.Refresh });
|
||||
setTimeout(
|
||||
() => this.listActionProvider.next({ action: XListAction.Refresh }),
|
||||
200
|
||||
200,
|
||||
);
|
||||
setTimeout(
|
||||
() => this.listActionProvider.next({ action: XListAction.Refresh }),
|
||||
500
|
||||
500,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -492,8 +492,8 @@ export class VTagsPresenterComponent extends VBaseInCardComponent {
|
||||
!this.hasChild(this.originalTags) ||
|
||||
(this.hasChild(this.originalTags) &&
|
||||
this.originalTags.findIndex(
|
||||
(ot) => toNormalString(t) === toNormalString(ot)
|
||||
) < 0)
|
||||
(ot) => toNormalString(t) === toNormalString(ot),
|
||||
) < 0),
|
||||
);
|
||||
|
||||
//
|
||||
@@ -509,7 +509,7 @@ export class VTagsPresenterComponent extends VBaseInCardComponent {
|
||||
removeds = this.originalTags.filter(
|
||||
(ot) =>
|
||||
this.tags.findIndex((t) => toNormalString(ot) === toNormalString(t)) <
|
||||
0
|
||||
0,
|
||||
);
|
||||
|
||||
//
|
||||
@@ -634,7 +634,7 @@ export class VTagsPresenterComponent extends VBaseInCardComponent {
|
||||
|
||||
//
|
||||
await this.handleAction(event.action, event.payload);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -699,7 +699,7 @@ export class VTagsPresenterComponent extends VBaseInCardComponent {
|
||||
this.listActionProvider.next({ action: XListAction.Refresh });
|
||||
setTimeout(
|
||||
() => this.listActionProvider.next({ action: XListAction.Refresh }),
|
||||
500
|
||||
500,
|
||||
);
|
||||
this.handlePrepareTagsState();
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ import {
|
||||
XPickerColumnOption,
|
||||
XLanguageDescriptor,
|
||||
isNullOrEmptyString,
|
||||
XColorWithBrightness,
|
||||
XBehaviourEventType,
|
||||
XColorWithBrightness,
|
||||
} from 'x-framework-core';
|
||||
import {
|
||||
XMenuSlot,
|
||||
@@ -196,7 +196,7 @@ export class VPageComponent extends XPageComponent {
|
||||
|
||||
@Input()
|
||||
toolbarTitle: XStandardType<string> = super.resourceProvider(
|
||||
this.ResourceIDs.app_name
|
||||
this.ResourceIDs.app_name,
|
||||
);
|
||||
//#endregion
|
||||
|
||||
@@ -319,7 +319,7 @@ export class VPageComponent extends XPageComponent {
|
||||
public managerService: XManagerService,
|
||||
public changeDetector: ChangeDetectorRef,
|
||||
protected popoverService: XPopoverService,
|
||||
protected propertyProvider: XPageContainer
|
||||
protected propertyProvider: XPageContainer,
|
||||
) {
|
||||
super(
|
||||
config,
|
||||
@@ -330,7 +330,7 @@ export class VPageComponent extends XPageComponent {
|
||||
zone,
|
||||
changeDetector,
|
||||
menuController,
|
||||
propertyProvider
|
||||
propertyProvider,
|
||||
);
|
||||
|
||||
//
|
||||
@@ -346,7 +346,7 @@ export class VPageComponent extends XPageComponent {
|
||||
|
||||
//
|
||||
this.menuState = this.isMobileUi$.pipe(
|
||||
map((isMobile) => (isMobile ? XMenuState.WillClose : XMenuState.Opened))
|
||||
map((isMobile) => (isMobile ? XMenuState.WillClose : XMenuState.Opened)),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -375,7 +375,7 @@ export class VPageComponent extends XPageComponent {
|
||||
|
||||
//
|
||||
const isHasSideChanged = changeKeys.includes(
|
||||
nameof<VPageComponent>('hasSide')
|
||||
nameof<VPageComponent>('hasSide'),
|
||||
);
|
||||
if (isHasSideChanged) {
|
||||
await this.handleHasSideEffect();
|
||||
@@ -383,10 +383,10 @@ export class VPageComponent extends XPageComponent {
|
||||
|
||||
//
|
||||
const isToolbarHasMenuChanged = changeKeys.includes(
|
||||
nameof<VPageComponent>('toolbarHasMenu')
|
||||
nameof<VPageComponent>('toolbarHasMenu'),
|
||||
);
|
||||
const isToolbarShowMenuChanged = changeKeys.includes(
|
||||
nameof<VPageComponent>('toolbarShowMenu')
|
||||
nameof<VPageComponent>('toolbarShowMenu'),
|
||||
);
|
||||
if (isToolbarHasMenuChanged || isToolbarShowMenuChanged) {
|
||||
this.detectChanges();
|
||||
@@ -394,7 +394,7 @@ export class VPageComponent extends XPageComponent {
|
||||
|
||||
//
|
||||
let isChanged = changeKeys.includes(
|
||||
nameof<VPageComponent>('actionProvider')
|
||||
nameof<VPageComponent>('actionProvider'),
|
||||
);
|
||||
if (isChanged) {
|
||||
this.subscribeActionProvider();
|
||||
@@ -402,7 +402,7 @@ export class VPageComponent extends XPageComponent {
|
||||
|
||||
//
|
||||
isChanged = changeKeys.includes(
|
||||
nameof<VPageComponent>('toolbarShowProgressBar')
|
||||
nameof<VPageComponent>('toolbarShowProgressBar'),
|
||||
);
|
||||
if (isChanged) {
|
||||
//
|
||||
@@ -434,7 +434,7 @@ export class VPageComponent extends XPageComponent {
|
||||
|
||||
//
|
||||
await this.prepareNavPages(user);
|
||||
}
|
||||
},
|
||||
);
|
||||
//#endregion
|
||||
|
||||
@@ -451,7 +451,7 @@ export class VPageComponent extends XPageComponent {
|
||||
this.applyTakeUntilWrapper(this.scrolledEvent.asObservable()).subscribe(
|
||||
async (event) => {
|
||||
await this.onScrolledEvent(event);
|
||||
}
|
||||
},
|
||||
);
|
||||
//#endregion
|
||||
}
|
||||
@@ -495,8 +495,8 @@ export class VPageComponent extends XPageComponent {
|
||||
const isLoggedIn = await this.sharedService.authService.isLoggedIn();
|
||||
const currentRoute = decodeURI(
|
||||
decodeURIComponent(
|
||||
this.managerService.getFullUrl(this.managerService.getRoute())
|
||||
)
|
||||
this.managerService.getFullUrl(this.managerService.getRoute()),
|
||||
),
|
||||
);
|
||||
|
||||
//
|
||||
@@ -505,7 +505,7 @@ export class VPageComponent extends XPageComponent {
|
||||
//
|
||||
// Check Landing Page ...
|
||||
const landingPageUrl = this.managerService.getFullUrl(
|
||||
this.managerService.getPageRoute(Pages.Landing)
|
||||
this.managerService.getPageRoute(Pages.Landing),
|
||||
);
|
||||
const isInLandingPage = currentRoute == landingPageUrl;
|
||||
if (!isInLandingPage) {
|
||||
@@ -574,19 +574,19 @@ export class VPageComponent extends XPageComponent {
|
||||
if (isLoggedIn) {
|
||||
//
|
||||
const startupUrl = this.managerService.getFullUrl(
|
||||
this.managerService.getPageRoute(Pages.Startup)
|
||||
this.managerService.getPageRoute(Pages.Startup),
|
||||
);
|
||||
const landingUrl = this.managerService.getFullUrl(
|
||||
this.managerService.getPageRoute(Pages.Landing)
|
||||
this.managerService.getPageRoute(Pages.Landing),
|
||||
);
|
||||
const registerUrl = this.managerService.getFullUrl(
|
||||
this.managerService.getPageRoute(Pages.Register)
|
||||
this.managerService.getPageRoute(Pages.Register),
|
||||
);
|
||||
const notAuthorizedUrl = this.managerService.getFullUrl(
|
||||
this.managerService.getPageRoute(Pages.NotAuthorized)
|
||||
this.managerService.getPageRoute(Pages.NotAuthorized),
|
||||
);
|
||||
const errorUrl = this.managerService.getFullUrl(
|
||||
this.managerService.getPageRoute(Pages.Error)
|
||||
this.managerService.getPageRoute(Pages.Error),
|
||||
);
|
||||
const isInOpenPages =
|
||||
currentRoute === errorUrl ||
|
||||
@@ -739,7 +739,7 @@ export class VPageComponent extends XPageComponent {
|
||||
//
|
||||
await this.managerService.navigateByPageReplace(
|
||||
Pages.ProfileView,
|
||||
navigationExtras
|
||||
navigationExtras,
|
||||
);
|
||||
}
|
||||
//#endregion
|
||||
@@ -777,7 +777,7 @@ export class VPageComponent extends XPageComponent {
|
||||
value,
|
||||
this.managerService.currentLocale,
|
||||
getDateFormatString(this.managerService.currentLocale),
|
||||
true
|
||||
true,
|
||||
);
|
||||
}
|
||||
//
|
||||
@@ -800,7 +800,7 @@ export class VPageComponent extends XPageComponent {
|
||||
//
|
||||
// if User Confirmed Lock Break, do Action ...
|
||||
action();
|
||||
}
|
||||
},
|
||||
);
|
||||
} else {
|
||||
//
|
||||
@@ -820,7 +820,7 @@ export class VPageComponent extends XPageComponent {
|
||||
//
|
||||
// if User Confirmed Lock Break, do Action ...
|
||||
action();
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
//#endregion
|
||||
@@ -908,7 +908,7 @@ export class VPageComponent extends XPageComponent {
|
||||
name: ai.name,
|
||||
locale: ai.locale,
|
||||
};
|
||||
}
|
||||
},
|
||||
);
|
||||
if (!hasChild(availableLanguages)) {
|
||||
return;
|
||||
@@ -948,7 +948,7 @@ export class VPageComponent extends XPageComponent {
|
||||
//
|
||||
await this.managerService.settingsService.changeLocale(
|
||||
selectedLocale,
|
||||
true
|
||||
true,
|
||||
);
|
||||
},
|
||||
},
|
||||
@@ -968,7 +968,7 @@ export class VPageComponent extends XPageComponent {
|
||||
await this.managerService.dialogService.presentAreYouSureYesNoDialog(
|
||||
async () => {
|
||||
await this.managerService.navigateByPageReplace(Pages.Logout);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
XPersonDto,
|
||||
defaultPersonDto,
|
||||
preparePersonDtoFields,
|
||||
} from 'x-mabsut-api-sdk';
|
||||
} from 'x-saherelm-api-sdk';
|
||||
import {
|
||||
PersonPresentType,
|
||||
isPersonPresentType,
|
||||
@@ -129,7 +129,7 @@ export class VPersonComponent extends VBaseDtoComponent<XPersonDto> {
|
||||
//
|
||||
// Handle Avatar Slot Changed ...
|
||||
isChanged = changeKeys.includes(
|
||||
nameof<VPersonComponent>('avatarSlotInCardView')
|
||||
nameof<VPersonComponent>('avatarSlotInCardView'),
|
||||
);
|
||||
if (isChanged) {
|
||||
//
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { XPersonDto } from 'x-mabsut-api-sdk';
|
||||
import { XPersonDto } from 'x-saherelm-api-sdk';
|
||||
import { defaultPersonAvatar, defaultPersonFullName } from './v-person.typings';
|
||||
import { isNullOrEmptyString, isNullOrUndefined } from 'x-framework-core';
|
||||
|
||||
|
||||
@@ -1,14 +1,3 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import {
|
||||
XReferenceDto,
|
||||
defaultReferenceDto,
|
||||
prepareReferenceDtoFields,
|
||||
} from 'x-mabsut-api-sdk';
|
||||
import {
|
||||
VBaseDtoComponent,
|
||||
VModelFieldDescriptor,
|
||||
VModelValidationResult,
|
||||
} from '../v-dto/v-dto.typings';
|
||||
import {
|
||||
toXString,
|
||||
getFieldNames,
|
||||
@@ -17,11 +6,22 @@ import {
|
||||
isNullOrUndefined,
|
||||
isNullOrEmptyString,
|
||||
} from 'x-framework-core';
|
||||
import {
|
||||
XReferenceDto,
|
||||
defaultReferenceDto,
|
||||
prepareReferenceDtoFields,
|
||||
} from 'x-saherelm-api-sdk';
|
||||
import {
|
||||
VReferencePresentType,
|
||||
isVReferencePresentType,
|
||||
VReferencePresentTypeIdentifier,
|
||||
} from './v-reference.typings';
|
||||
import {
|
||||
VBaseDtoComponent,
|
||||
VModelFieldDescriptor,
|
||||
VModelValidationResult,
|
||||
} from '../v-dto/v-dto.typings';
|
||||
import { Component, Input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'v-reference',
|
||||
@@ -133,7 +133,7 @@ export class VReferenceComponent extends VBaseDtoComponent<XReferenceDto<any>> {
|
||||
* @returns
|
||||
*/
|
||||
validate(
|
||||
model?: Partial<XReferenceDto<any>>
|
||||
model?: Partial<XReferenceDto<any>>,
|
||||
): VModelValidationResult<XReferenceDto<any>> {
|
||||
//
|
||||
let result: VModelValidationResult<XReferenceDto<any>> = undefined;
|
||||
@@ -156,7 +156,7 @@ export class VReferenceComponent extends VBaseDtoComponent<XReferenceDto<any>> {
|
||||
if (!isValid) {
|
||||
//
|
||||
validationErrors.push(
|
||||
this.getExceptionMessage(XExceptionIDs.InvalidArgs)
|
||||
this.getExceptionMessage(XExceptionIDs.InvalidArgs),
|
||||
);
|
||||
} else {
|
||||
//
|
||||
@@ -169,8 +169,8 @@ export class VReferenceComponent extends VBaseDtoComponent<XReferenceDto<any>> {
|
||||
//
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.index
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.AppResourceIDs.index,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -181,8 +181,8 @@ export class VReferenceComponent extends VBaseDtoComponent<XReferenceDto<any>> {
|
||||
//
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.provided_for
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.AppResourceIDs.provided_for,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -193,8 +193,8 @@ export class VReferenceComponent extends VBaseDtoComponent<XReferenceDto<any>> {
|
||||
//
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.referenced_to
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.AppResourceIDs.referenced_to,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { isValueInEnum } from '../tools/v-base.tools';
|
||||
import { isNullOrUndefined, isString } from 'x-framework-core';
|
||||
import { isXReferenceDto, XReferenceDto } from 'x-mabsut-api-sdk';
|
||||
import { isXReferenceDto, XReferenceDto } from 'x-saherelm-api-sdk';
|
||||
|
||||
//
|
||||
//#region ReferenceType ...
|
||||
@@ -38,7 +38,7 @@ export function isVReferencePresentType(value: string) {
|
||||
}
|
||||
|
||||
export function isVisibleVReferencePresentType(
|
||||
value: VReferencePresentTypeIdentifier
|
||||
value: VReferencePresentTypeIdentifier,
|
||||
) {
|
||||
return (
|
||||
isVReferencePresentType(value) && value !== VReferencePresentType.AsNone
|
||||
|
||||
@@ -182,7 +182,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
public sharedService: SharedService,
|
||||
public managerService: XManagerService,
|
||||
public changeDetector: ChangeDetectorRef,
|
||||
protected popoverService: XPopoverService
|
||||
protected popoverService: XPopoverService,
|
||||
) {
|
||||
super(
|
||||
zone,
|
||||
@@ -193,7 +193,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
sharedService,
|
||||
managerService,
|
||||
changeDetector,
|
||||
popoverService //
|
||||
popoverService, //
|
||||
);
|
||||
}
|
||||
//#endregion
|
||||
@@ -231,20 +231,21 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
try {
|
||||
//
|
||||
const connectionId =
|
||||
this.sharedService.mabsutAPIService.webinars.webinarPushService.connectionId;
|
||||
this.sharedService.saherElmAPIService.webinars.webinarPushService
|
||||
.connectionId;
|
||||
const entity = await this.getValueAsync(
|
||||
this.sharedService.mabsutAPIService.webinars.webinarProviderService.get(
|
||||
this.model.id
|
||||
)
|
||||
this.sharedService.saherElmAPIService.webinars.webinarProviderService.get(
|
||||
this.model.id,
|
||||
),
|
||||
);
|
||||
if (!isNullOrUndefined(entity) && !!entity.enabled) {
|
||||
//
|
||||
entity.enabled = false;
|
||||
await this.getValueAsync(
|
||||
this.sharedService.mabsutAPIService.webinars.webinarProviderService.update(
|
||||
this.sharedService.saherElmAPIService.webinars.webinarProviderService.update(
|
||||
entity,
|
||||
connectionId
|
||||
)
|
||||
connectionId,
|
||||
),
|
||||
);
|
||||
}
|
||||
} catch {}
|
||||
@@ -276,8 +277,8 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
return this.sharedService.userId$.pipe(
|
||||
map(
|
||||
(userId) =>
|
||||
!isNullOrEmptyString(userId) && userId === this.model.ownerId
|
||||
)
|
||||
!isNullOrEmptyString(userId) && userId === this.model.ownerId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -285,8 +286,8 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
return this.sharedService.userId$.pipe(
|
||||
map(
|
||||
(userId) =>
|
||||
!isNullOrEmptyString(userId) && userId !== this.model.ownerId
|
||||
)
|
||||
!isNullOrEmptyString(userId) && userId !== this.model.ownerId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -309,11 +310,11 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
let type = this.resourceProvider(
|
||||
isOwner
|
||||
? this.AppResourceIDs.webinar_owner
|
||||
: this.AppResourceIDs.webinar_joiner
|
||||
: this.AppResourceIDs.webinar_joiner,
|
||||
);
|
||||
result = `${this.model.title}`;
|
||||
return this.applyLocale(result);
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -336,10 +337,10 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
result = this.resourceProvider(
|
||||
isOwner
|
||||
? this.AppResourceIDs.webinar_owner
|
||||
: this.AppResourceIDs.webinar_joiner
|
||||
: this.AppResourceIDs.webinar_joiner,
|
||||
);
|
||||
return this.applyLocale(result);
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
//#endregion
|
||||
@@ -390,11 +391,11 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
if (
|
||||
force &&
|
||||
(this.isWebinarServiceConnected ||
|
||||
this.sharedService.mabsutAPIService.webinars.webinarPushService.isConnected())
|
||||
this.sharedService.saherElmAPIService.webinars.webinarPushService.isConnected())
|
||||
) {
|
||||
//
|
||||
try {
|
||||
await this.sharedService.mabsutAPIService.webinars.webinarPushService.disconnect();
|
||||
await this.sharedService.saherElmAPIService.webinars.webinarPushService.disconnect();
|
||||
} catch {}
|
||||
|
||||
//
|
||||
@@ -402,20 +403,22 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
}
|
||||
|
||||
//
|
||||
if (this.sharedService.mabsutAPIService.webinars.webinarPushService.isConnected()) {
|
||||
if (
|
||||
this.sharedService.saherElmAPIService.webinars.webinarPushService.isConnected()
|
||||
) {
|
||||
//
|
||||
await this.handleLoadingState(false);
|
||||
this.isWebinarServiceConnected = true;
|
||||
} else {
|
||||
try {
|
||||
//
|
||||
await this.sharedService.mabsutAPIService.webinars.webinarPushService.connect();
|
||||
await this.sharedService.saherElmAPIService.webinars.webinarPushService.connect();
|
||||
this.isWebinarServiceConnected = true;
|
||||
await this.handleLoadingState(false);
|
||||
} catch {
|
||||
//
|
||||
await this.handleConnectionCheck(
|
||||
XWebinarExceptionIDs.ServiceConnectError
|
||||
XWebinarExceptionIDs.ServiceConnectError,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -445,7 +448,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
if (!isOwner && !isSubscriber) {
|
||||
//
|
||||
await this.handleConnectionCheck(
|
||||
XWebinarExceptionIDs.UnKnownVisitorError
|
||||
XWebinarExceptionIDs.UnKnownVisitorError,
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -475,7 +478,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
if (!this.isWebinarServiceConnected) {
|
||||
//
|
||||
await this.handleConnectionCheck(
|
||||
XWebinarExceptionIDs.ServiceConnectError
|
||||
XWebinarExceptionIDs.ServiceConnectError,
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -497,7 +500,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
//
|
||||
this.localStream =
|
||||
await this.sharedService.mediaDevicesService.getMediaDevice(
|
||||
this.currentMediaDevice
|
||||
this.currentMediaDevice,
|
||||
);
|
||||
|
||||
//
|
||||
@@ -539,8 +542,8 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
try {
|
||||
//
|
||||
this.isWebinarConnected = true;
|
||||
await this.sharedService.mabsutAPIService.webinars.webinarPushService.openWebinar(
|
||||
this.model.id
|
||||
await this.sharedService.saherElmAPIService.webinars.webinarPushService.openWebinar(
|
||||
this.model.id,
|
||||
);
|
||||
} catch {
|
||||
//
|
||||
@@ -560,7 +563,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
//
|
||||
// Create a Remote Peer ...
|
||||
this.remotePeer =
|
||||
this.sharedService.mabsutAPIService.webinars.webinarPushService.rtcPeerService.createConnection();
|
||||
this.sharedService.saherElmAPIService.webinars.webinarPushService.rtcPeerService.createConnection();
|
||||
|
||||
//
|
||||
// Then we have to Attach Peer Connection On Track Event Listener
|
||||
@@ -601,7 +604,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
};
|
||||
this.sendRemoteVideoAction(
|
||||
this.VideoProvidedActions.SetState,
|
||||
state
|
||||
state,
|
||||
);
|
||||
|
||||
//
|
||||
@@ -619,7 +622,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
};
|
||||
this.sendRemoteVideoAction(
|
||||
this.VideoProvidedActions.SetState,
|
||||
state
|
||||
state,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -631,7 +634,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
//
|
||||
// After this we have to Attach ICE Candidate Events Handler ...
|
||||
this.remotePeer.onicecandidate = async (
|
||||
event: RTCPeerConnectionIceEvent
|
||||
event: RTCPeerConnectionIceEvent,
|
||||
) => {
|
||||
//
|
||||
// Validate ...
|
||||
@@ -646,16 +649,16 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
//
|
||||
// Send Recieved Candidate through Signalling Service ...
|
||||
// since we send only this candidate to webinar owner, there is no neew to Specified To ...
|
||||
await this.sharedService.mabsutAPIService.webinars.webinarPushService.candidate(
|
||||
await this.sharedService.saherElmAPIService.webinars.webinarPushService.candidate(
|
||||
candidateJson,
|
||||
''
|
||||
'',
|
||||
);
|
||||
}
|
||||
};
|
||||
} catch {
|
||||
//
|
||||
await this.handleConnectionCheck(
|
||||
XWebinarExceptionIDs.RTCPeerConnectionError
|
||||
XWebinarExceptionIDs.RTCPeerConnectionError,
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -665,8 +668,8 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
try {
|
||||
//
|
||||
this.isWebinarConnected = true;
|
||||
await this.sharedService.mabsutAPIService.webinars.webinarPushService.joinWebinar(
|
||||
this.model.id
|
||||
await this.sharedService.saherElmAPIService.webinars.webinarPushService.joinWebinar(
|
||||
this.model.id,
|
||||
);
|
||||
} catch {
|
||||
//
|
||||
@@ -737,12 +740,13 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
viewerId: string,
|
||||
webinarId: string,
|
||||
userId: string,
|
||||
username?: string
|
||||
username?: string,
|
||||
) {
|
||||
//
|
||||
// Reading Our Connection Id ...
|
||||
const connectionId =
|
||||
this.sharedService.mabsutAPIService.webinars.webinarPushService.connectionId;
|
||||
this.sharedService.saherElmAPIService.webinars.webinarPushService
|
||||
.connectionId;
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
@@ -777,7 +781,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
// First ...
|
||||
// we Have to Create a Peer Connection for it ...
|
||||
const pc =
|
||||
this.sharedService.mabsutAPIService.webinars.webinarPushService.rtcPeerService.createConnection();
|
||||
this.sharedService.saherElmAPIService.webinars.webinarPushService.rtcPeerService.createConnection();
|
||||
|
||||
//
|
||||
// Second ...
|
||||
@@ -792,9 +796,9 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
//
|
||||
// Prepare Model to Signalling ...
|
||||
const json = JSON.stringify(e.candidate);
|
||||
await this.sharedService.mabsutAPIService.webinars.webinarPushService.candidate(
|
||||
await this.sharedService.saherElmAPIService.webinars.webinarPushService.candidate(
|
||||
json,
|
||||
viewerId
|
||||
viewerId,
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -810,9 +814,9 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
|
||||
//
|
||||
const offerJson = JSON.stringify(offer);
|
||||
await this.sharedService.mabsutAPIService.webinars.webinarPushService.offer(
|
||||
await this.sharedService.saherElmAPIService.webinars.webinarPushService.offer(
|
||||
offerJson,
|
||||
viewerId
|
||||
viewerId,
|
||||
);
|
||||
} catch {}
|
||||
};
|
||||
@@ -845,7 +849,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
} catch {
|
||||
//
|
||||
await this.handleConnectionCheck(
|
||||
XWebinarExceptionIDs.RTCPeerConnectionError
|
||||
XWebinarExceptionIDs.RTCPeerConnectionError,
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -859,8 +863,8 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
const message = this.applyLocale(
|
||||
this.resourceProvider(this.AppResourceIDs.visitor_joined_message).replace(
|
||||
'${TMP1}&',
|
||||
username
|
||||
)
|
||||
username,
|
||||
),
|
||||
);
|
||||
await this.managerService.notificationService.presentInfoNotification({
|
||||
message,
|
||||
@@ -881,12 +885,13 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
viewerId: string,
|
||||
webinarId: string,
|
||||
userId: string,
|
||||
username?: string
|
||||
username?: string,
|
||||
) {
|
||||
//
|
||||
// Reading Our Connection Id ...
|
||||
const connectionId =
|
||||
this.sharedService.mabsutAPIService.webinars.webinarPushService.connectionId;
|
||||
this.sharedService.saherElmAPIService.webinars.webinarPushService
|
||||
.connectionId;
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
@@ -932,8 +937,8 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
const message = this.applyLocale(
|
||||
this.resourceProvider(this.AppResourceIDs.visitor_leaved_message).replace(
|
||||
'${TMP1}&',
|
||||
username
|
||||
)
|
||||
username,
|
||||
),
|
||||
);
|
||||
await this.managerService.notificationService.presentInfoNotification({
|
||||
message,
|
||||
@@ -1014,7 +1019,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
await this.managerService.notificationService.presentWarningNotification({
|
||||
dissmissable: true,
|
||||
message: this.resourceProvider(
|
||||
this.AppResourceIDs.webinar_closed_message
|
||||
this.AppResourceIDs.webinar_closed_message,
|
||||
),
|
||||
});
|
||||
await this.handleCloseDialog();
|
||||
@@ -1050,7 +1055,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
// Retrieve Offering Model ...
|
||||
const offerModel: RTCSessionDescriptionInit = JSON.parse(offer);
|
||||
this.remotePeer.setRemoteDescription(
|
||||
new RTCSessionDescription(offerModel)
|
||||
new RTCSessionDescription(offerModel),
|
||||
);
|
||||
|
||||
//
|
||||
@@ -1061,8 +1066,8 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
//
|
||||
// Signalling Answer ...
|
||||
const answerJsno = JSON.stringify(answer);
|
||||
await this.sharedService.mabsutAPIService.webinars.webinarPushService.answer(
|
||||
answerJsno
|
||||
await this.sharedService.saherElmAPIService.webinars.webinarPushService.answer(
|
||||
answerJsno,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1300,8 +1305,8 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
let visitors: Array<XHubConnectionDto> = [];
|
||||
try {
|
||||
visitors =
|
||||
await this.sharedService.mabsutAPIService.webinars.webinarPushService.webinarVisitors(
|
||||
this.model.id
|
||||
await this.sharedService.saherElmAPIService.webinars.webinarPushService.webinarVisitors(
|
||||
this.model.id,
|
||||
);
|
||||
} catch {}
|
||||
|
||||
@@ -1316,7 +1321,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
* @param error
|
||||
*/
|
||||
private async handleConnectionCheck(
|
||||
error: XWebinarExceptionIdentifier = undefined
|
||||
error: XWebinarExceptionIdentifier = undefined,
|
||||
) {
|
||||
//
|
||||
if (!isNullOrUndefined(this.loadingHandlerTiemout)) {
|
||||
@@ -1415,7 +1420,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
|
||||
//
|
||||
// Webinar Opened ...
|
||||
this.sharedService.mabsutAPIService.webinars.webinarPushService.onWebinarOpened$
|
||||
this.sharedService.saherElmAPIService.webinars.webinarPushService.onWebinarOpened$
|
||||
.pipe(takeUntil(this.webinaPushServiceUnSubscriber))
|
||||
.subscribe((webinarId) => {
|
||||
//
|
||||
@@ -1434,7 +1439,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
|
||||
//
|
||||
// Webinar Closed ...
|
||||
this.sharedService.mabsutAPIService.webinars.webinarPushService.onWebinarClosed$
|
||||
this.sharedService.saherElmAPIService.webinars.webinarPushService.onWebinarClosed$
|
||||
.pipe(takeUntil(this.webinaPushServiceUnSubscriber))
|
||||
.subscribe((webinarId) => {
|
||||
//
|
||||
@@ -1453,7 +1458,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
|
||||
//
|
||||
// Viewer Joined ...
|
||||
this.sharedService.mabsutAPIService.webinars.webinarPushService.onViewerJoined$
|
||||
this.sharedService.saherElmAPIService.webinars.webinarPushService.onViewerJoined$
|
||||
.pipe(takeUntil(this.webinaPushServiceUnSubscriber))
|
||||
.subscribe((data) => {
|
||||
//
|
||||
@@ -1474,13 +1479,13 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
data.viewerId,
|
||||
data.webinarId,
|
||||
data.userId,
|
||||
data.username
|
||||
data.username,
|
||||
);
|
||||
});
|
||||
|
||||
//
|
||||
// Viewer Leaved ...
|
||||
this.sharedService.mabsutAPIService.webinars.webinarPushService.onViewerLeaved$
|
||||
this.sharedService.saherElmAPIService.webinars.webinarPushService.onViewerLeaved$
|
||||
.pipe(takeUntil(this.webinaPushServiceUnSubscriber))
|
||||
.subscribe((data) => {
|
||||
//
|
||||
@@ -1501,13 +1506,13 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
data.viewerId,
|
||||
data.webinarId,
|
||||
data.userId,
|
||||
data.username
|
||||
data.username,
|
||||
);
|
||||
});
|
||||
|
||||
//
|
||||
// Offer Recieved ...
|
||||
this.sharedService.mabsutAPIService.webinars.webinarPushService.onOfferRecieved$
|
||||
this.sharedService.saherElmAPIService.webinars.webinarPushService.onOfferRecieved$
|
||||
.pipe(takeUntil(this.webinaPushServiceUnSubscriber))
|
||||
.subscribe((offer) => {
|
||||
//
|
||||
@@ -1521,7 +1526,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
|
||||
//
|
||||
// Answer Recieved ...
|
||||
this.sharedService.mabsutAPIService.webinars.webinarPushService.onAnswerRecieved$
|
||||
this.sharedService.saherElmAPIService.webinars.webinarPushService.onAnswerRecieved$
|
||||
.pipe(takeUntil(this.webinaPushServiceUnSubscriber))
|
||||
.subscribe((data) => {
|
||||
//
|
||||
@@ -1535,7 +1540,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
|
||||
//
|
||||
// Candidate Recieved ...
|
||||
this.sharedService.mabsutAPIService.webinars.webinarPushService.onCandidateRecieved$
|
||||
this.sharedService.saherElmAPIService.webinars.webinarPushService.onCandidateRecieved$
|
||||
.pipe(takeUntil(this.webinaPushServiceUnSubscriber))
|
||||
.subscribe((data) => {
|
||||
//
|
||||
@@ -1641,7 +1646,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
//
|
||||
case VWebinarModalContext.PopOver:
|
||||
await this.managerService.dialogService.popoverController.dismiss(
|
||||
action
|
||||
action,
|
||||
);
|
||||
break;
|
||||
}
|
||||
@@ -1661,7 +1666,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
if (!isNullOrUndefined(this.localVideoActionProvider)) {
|
||||
//
|
||||
this.applyTakeUntilWrapper(
|
||||
this.localVideoActionProvider.asObservable()
|
||||
this.localVideoActionProvider.asObservable(),
|
||||
).subscribe(async (event) => {
|
||||
//
|
||||
// Validate Action ...
|
||||
@@ -1730,7 +1735,7 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
if (!isNullOrUndefined(this.remoteVideoActionProvider)) {
|
||||
//
|
||||
this.applyTakeUntilWrapper(
|
||||
this.remoteVideoActionProvider.asObservable()
|
||||
this.remoteVideoActionProvider.asObservable(),
|
||||
).subscribe((event) => {
|
||||
//
|
||||
// Validate Action ...
|
||||
@@ -1841,8 +1846,8 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
if (isOwner) {
|
||||
//
|
||||
// Owner Close Webinar ...
|
||||
await this.sharedService.mabsutAPIService.webinars.webinarPushService.closeWebinar(
|
||||
this.model.id
|
||||
await this.sharedService.saherElmAPIService.webinars.webinarPushService.closeWebinar(
|
||||
this.model.id,
|
||||
);
|
||||
|
||||
//
|
||||
@@ -1888,8 +1893,8 @@ export class VWebinarConnectComponent extends VBaseComponent {
|
||||
if (isSubscriber) {
|
||||
//
|
||||
// Subscriber Leave Webinar ...
|
||||
await this.sharedService.mabsutAPIService.webinars.webinarPushService.leaveWebinar(
|
||||
this.model.id
|
||||
await this.sharedService.saherElmAPIService.webinars.webinarPushService.leaveWebinar(
|
||||
this.model.id,
|
||||
);
|
||||
|
||||
//
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
XPersonDto,
|
||||
XWebinarType,
|
||||
isDefaultPersonDto,
|
||||
} from 'x-mabsut-api-sdk';
|
||||
} from 'x-saherelm-api-sdk';
|
||||
import {
|
||||
getFieldNames,
|
||||
XExceptionIDs,
|
||||
@@ -117,7 +117,7 @@ export class VWebinarViewComponent extends VBaseDtoComponent<VWebinarViewDto> {
|
||||
|
||||
@Input()
|
||||
fileActionsProvider: (
|
||||
t: XFileDto | File
|
||||
t: XFileDto | File,
|
||||
) => Array<XSimpleListItemSlideOption>;
|
||||
|
||||
//
|
||||
@@ -499,8 +499,8 @@ export class VWebinarViewComponent extends VBaseDtoComponent<VWebinarViewDto> {
|
||||
//
|
||||
if (!isNullOrUndefined(this.model) && !isNullOrEmptyString(this.model.id)) {
|
||||
result =
|
||||
this.sharedService.mabsutAPIService.webinars.webinarProviderService.getTags(
|
||||
this.model.id
|
||||
this.sharedService.saherElmAPIService.webinars.webinarProviderService.getTags(
|
||||
this.model.id,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -518,8 +518,8 @@ export class VWebinarViewComponent extends VBaseDtoComponent<VWebinarViewDto> {
|
||||
//
|
||||
if (!isNullOrUndefined(this.model) && !isNullOrEmptyString(this.model.id)) {
|
||||
result =
|
||||
this.sharedService.mabsutAPIService.webinars.webinarProviderService.getFiles(
|
||||
this.model.id
|
||||
this.sharedService.saherElmAPIService.webinars.webinarProviderService.getFiles(
|
||||
this.model.id,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -575,7 +575,7 @@ export class VWebinarViewComponent extends VBaseDtoComponent<VWebinarViewDto> {
|
||||
* @returns
|
||||
*/
|
||||
validate(
|
||||
model?: Partial<VWebinarViewDto>
|
||||
model?: Partial<VWebinarViewDto>,
|
||||
): VModelValidationResult<VWebinarViewDto> {
|
||||
//
|
||||
let result: VModelValidationResult<VWebinarViewDto> = undefined;
|
||||
@@ -598,7 +598,7 @@ export class VWebinarViewComponent extends VBaseDtoComponent<VWebinarViewDto> {
|
||||
if (!isValid) {
|
||||
//
|
||||
validationErrors.push(
|
||||
this.getExceptionMessage(XExceptionIDs.InvalidArgs)
|
||||
this.getExceptionMessage(XExceptionIDs.InvalidArgs),
|
||||
);
|
||||
} else {
|
||||
//
|
||||
@@ -614,8 +614,8 @@ export class VWebinarViewComponent extends VBaseDtoComponent<VWebinarViewDto> {
|
||||
//
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.ResourceIDs.language
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.ResourceIDs.language,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -626,8 +626,8 @@ export class VWebinarViewComponent extends VBaseDtoComponent<VWebinarViewDto> {
|
||||
//
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.title
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.AppResourceIDs.title,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -638,8 +638,8 @@ export class VWebinarViewComponent extends VBaseDtoComponent<VWebinarViewDto> {
|
||||
//
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.AppResourceIDs.description
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.AppResourceIDs.description,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -650,8 +650,8 @@ export class VWebinarViewComponent extends VBaseDtoComponent<VWebinarViewDto> {
|
||||
//
|
||||
validationErrors.push(
|
||||
`${this.resourceProvider(
|
||||
this.ResourceIDs.type
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`
|
||||
this.ResourceIDs.type,
|
||||
)}: ${this.getExceptionMessage(XExceptionIDs.InvalidArgs)}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -943,7 +943,7 @@ export class VWebinarViewComponent extends VBaseDtoComponent<VWebinarViewDto> {
|
||||
? this.ownerRef
|
||||
: fd.template,
|
||||
};
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,14 +10,14 @@ import {
|
||||
XWebinarDto,
|
||||
XWebinarType,
|
||||
preparePersonDtoFields,
|
||||
} from 'x-mabsut-api-sdk';
|
||||
} from 'x-saherelm-api-sdk';
|
||||
import { VModelValidationResult } from '../v-dto/v-dto.typings';
|
||||
import { AppResourceIDs } from 'src/app/config/localization.config';
|
||||
import { defaultVWebinarViewDto, VWebinarViewDto } from './v-webinar.typings';
|
||||
|
||||
export function ToWebinarViewDto(
|
||||
model: XWebinarDto,
|
||||
forLanguage: XLocale | string
|
||||
forLanguage: XLocale | string,
|
||||
) {
|
||||
//
|
||||
// Validate ...
|
||||
@@ -31,13 +31,13 @@ export function ToWebinarViewDto(
|
||||
//
|
||||
// Title ...
|
||||
const titleLocale = model.title.locales.find(
|
||||
(m) => m.language == forLanguage
|
||||
(m) => m.language == forLanguage,
|
||||
);
|
||||
|
||||
//
|
||||
// Description ...
|
||||
const descriptionLocale = model.description.locales.find(
|
||||
(m) => m.language == forLanguage
|
||||
(m) => m.language == forLanguage,
|
||||
);
|
||||
|
||||
//
|
||||
@@ -153,7 +153,7 @@ export function prepareVWebinarViewDtoFields(model?: VWebinarViewDto) {
|
||||
export function isDefaultVWebinarViewDto(model?: VWebinarViewDto) {
|
||||
return isSameObject(
|
||||
prepareVWebinarViewDtoFields(model),
|
||||
defaultVWebinarViewDto
|
||||
defaultVWebinarViewDto,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { XBaseDto } from 'x-framework-core';
|
||||
import { XPersonDto, XWebinarType } from 'x-mabsut-api-sdk';
|
||||
import { XPersonDto, XWebinarType } from 'x-saherelm-api-sdk';
|
||||
|
||||
export interface VWebinarViewDto extends XBaseDto {
|
||||
id: string;
|
||||
|
||||
Reference in New Issue
Block a user