barsa-novin-ray-core 2.3.30 → 2.3.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, inject, ElementRef, Input, ChangeDetectionStrategy, Component, Pipe, ComponentFactoryResolver, Injector, ApplicationRef, Compiler, DOCUMENT, NgModuleFactory, InjectionToken, NgZone, EventEmitter, ChangeDetectorRef, Renderer2, HostBinding, Output, HostListener, ViewContainerRef, ViewChild, signal, Directive, TemplateRef, input, NgModule, NO_ERRORS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA, provideAppInitializer, ErrorHandler } from '@angular/core';
3
- import { Subject, from, BehaviorSubject, of, combineLatest, fromEvent, forkJoin, throwError, merge, interval, filter as filter$1, tap as tap$1, concatMap as concatMap$1, catchError as catchError$1, finalize as finalize$1, map as map$1, Observable, takeUntil as takeUntil$1, exhaustMap as exhaustMap$1, timer, debounceTime as debounceTime$1, mergeWith } from 'rxjs';
3
+ import { Subject, from, BehaviorSubject, of, exhaustMap, map as map$1, combineLatest, fromEvent, forkJoin, throwError, merge, interval, filter as filter$1, tap as tap$1, concatMap as concatMap$1, catchError as catchError$1, finalize as finalize$1, Observable, takeUntil as takeUntil$1, timer, debounceTime as debounceTime$1, mergeWith } from 'rxjs';
4
4
  import * as i1 from '@angular/router';
5
5
  import { Router, NavigationEnd, ActivatedRoute, NavigationStart, RouterEvent, RouterModule } from '@angular/router';
6
6
  import { DomSanitizer, Title } from '@angular/platform-browser';
7
- import { filter, startWith, map, tap, takeUntil, withLatestFrom, delay, debounceTime, distinctUntilChanged, exhaustMap, concatMap, finalize, publishReplay, refCount, shareReplay, switchMap, catchError, merge as merge$1, pluck, mergeWith as mergeWith$1 } from 'rxjs/operators';
7
+ import { filter, startWith, map, tap, takeUntil, withLatestFrom, delay, debounceTime, distinctUntilChanged, exhaustMap as exhaustMap$1, concatMap, finalize, publishReplay, refCount, shareReplay, switchMap, catchError, merge as merge$1, pluck, mergeWith as mergeWith$1 } from 'rxjs/operators';
8
8
  import moment from 'moment';
9
9
  import moment$1 from 'moment-hijri';
10
10
  import 'moment/locale/ar';
@@ -2389,6 +2389,13 @@ function IsDarkMode() {
2389
2389
  function nullOrUndefinedString(param) {
2390
2390
  return `${param} can not be null or undefined.`;
2391
2391
  }
2392
+ function fromEntries(entries) {
2393
+ const result = {};
2394
+ for (const [key, value] of entries) {
2395
+ result[key] = value;
2396
+ }
2397
+ return result;
2398
+ }
2392
2399
 
2393
2400
  class MoReportValuePipe {
2394
2401
  transform(name, mo, Columns, caption) {
@@ -4257,7 +4264,13 @@ class DynamicComponentService {
4257
4264
  /** Inserted by Angular inject() migration for backwards compatibility */
4258
4265
  constructor() {
4259
4266
  this.cfr = inject(ComponentFactoryResolver);
4267
+ this._injector = inject(Injector);
4260
4268
  this._dynamicModuleWithComponents = {};
4269
+ this._compiler = inject(Compiler);
4270
+ }
4271
+ addDynamicModuleResolver(modules) {
4272
+ this.requires = { ...this.requires, ...modules };
4273
+ return Promise.resolve(this.requires);
4261
4274
  }
4262
4275
  addModuleWithComponents(moduleName, ngModuleRef) {
4263
4276
  if (!this._dynamicModuleWithComponents[moduleName]) {
@@ -4267,9 +4280,9 @@ class DynamicComponentService {
4267
4280
  }
4268
4281
  }
4269
4282
  getComponentType(componentSelector, componentName, moduleName) {
4270
- const moName = moduleName + 'Module';
4283
+ const moName = `${moduleName}Module`;
4271
4284
  const module = this._dynamicModuleWithComponents[moName];
4272
- const cmpName = componentName + 'Component';
4285
+ const cmpName = `${componentName}Component`;
4273
4286
  if (!module) {
4274
4287
  return;
4275
4288
  }
@@ -4284,15 +4297,22 @@ class DynamicComponentService {
4284
4297
  }
4285
4298
  return x;
4286
4299
  }
4287
- getComponentBySelector(selector, moduleName, injector) {
4288
- const moName = moduleName + 'Module';
4300
+ getComponentBySelector(selector, componentName, moduleName, injector) {
4301
+ const moName = `${moduleName}Module`;
4289
4302
  const module = this._dynamicModuleWithComponents[moName];
4290
- if (module && module.ngModuleRef.getComponentFactory) {
4303
+ if (module) {
4291
4304
  const componentFactory = module.ngModuleRef.getComponentFactory(selector);
4292
4305
  if (componentFactory) {
4293
4306
  return of(componentFactory.create(injector));
4294
4307
  }
4295
4308
  }
4309
+ else {
4310
+ if (this.requires[moduleName]) {
4311
+ return from(this.requires[moduleName]()).pipe(exhaustMap((m) => this._compiler.compileModuleAsync(m[moName])), map$1((c) => c.create(this._injector)), map$1((c) => c.componentFactoryResolver
4312
+ .resolveComponentFactory(this.getComponentType(selector, componentName, moduleName))
4313
+ .create(injector)));
4314
+ }
4315
+ }
4296
4316
  const componentRef = this.cfr.resolveComponentFactory(NotFoundComponent).create(injector);
4297
4317
  componentRef.instance.componentName = selector;
4298
4318
  componentRef.instance.moduleName = moduleName;
@@ -4952,6 +4972,83 @@ function formRoutes(authGuard = false) {
4952
4972
  };
4953
4973
  }
4954
4974
 
4975
+ class ApplicationCtrlrService {
4976
+ constructor() {
4977
+ this._appMenuItems$ = new BehaviorSubject([]);
4978
+ this._systemsUi$ = new BehaviorSubject([]);
4979
+ this._selectedSystem$ = new BehaviorSubject(null);
4980
+ this._log = inject(LogService);
4981
+ }
4982
+ get appMenuItems$() {
4983
+ return this._appMenuItems$.asObservable();
4984
+ }
4985
+ initialize(callback) {
4986
+ BarsaApi.Ul.ApplicationCtrlr.Initialize(() => {
4987
+ this._handleEvents();
4988
+ callback && callback();
4989
+ });
4990
+ }
4991
+ _loadSystem(id, resolve, reject) {
4992
+ BarsaApi.Ul.ApplicationCtrlr._loadSystem(id, true, (data) => {
4993
+ resolve(data);
4994
+ }, (err) => {
4995
+ reject(err);
4996
+ });
4997
+ }
4998
+ _handleEvents() {
4999
+ const context = BarsaApi.Ul.ApplicationCtrlr.Adapter.Control;
5000
+ context.on({
5001
+ AddSystemUi: this._addSystemUi.bind(this),
5002
+ AddToMainTabPanel: this._addToMainTabPanel.bind(this),
5003
+ SelectedSystemChanged: this._selectedSystemChanged.bind(this),
5004
+ SetStatusBarValues: this._setStatusBarValues.bind(this),
5005
+ ShowReleaseNoteWindow: this._showReleaseNoteWindow.bind(this)
5006
+ });
5007
+ const appMenuBodyUi = context._appMenuBody;
5008
+ appMenuBodyUi.on({
5009
+ ButtonListChanged: this._appMenuBodyUi_itemsChanged.bind(this)
5010
+ });
5011
+ this._appMenuBodyUi_itemsChanged(appMenuBodyUi.items);
5012
+ this._customApplicationUi = context;
5013
+ if (context._systemsUi?.length) {
5014
+ this._selectedSystemChanged(context._selectedSystemId);
5015
+ }
5016
+ this._addSystemUi(context._systemsUi);
5017
+ this._customApplicationMenuBodyUi = appMenuBodyUi;
5018
+ }
5019
+ _appMenuBodyUi_itemsChanged(items) {
5020
+ this._appMenuItems$.next([...items]);
5021
+ }
5022
+ _addSystemUi(systemUi) {
5023
+ // this._selectedSystem$.next(systemUi);
5024
+ console.log('_addSystemUi', systemUi);
5025
+ }
5026
+ _addToMainTabPanel(customSystemUi) {
5027
+ console.log('AddToMainTabPanel', customSystemUi);
5028
+ }
5029
+ _selectedSystemChanged(systemId, forceRelayout = false) {
5030
+ const x = this._customApplicationUi._systemsUi.find((c) => c.SystemData.Id === systemId);
5031
+ if (x) {
5032
+ this._selectedSystem$.next(x);
5033
+ }
5034
+ this._log.error('SelectedSystemChanged', systemId, forceRelayout);
5035
+ }
5036
+ _setStatusBarValues(statusbarValues) {
5037
+ console.log('SetStatusBarValues', statusbarValues);
5038
+ }
5039
+ _showReleaseNoteWindow(releaseNoteData) {
5040
+ console.log('ShowReleaseNoteWindow', releaseNoteData);
5041
+ }
5042
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ApplicationCtrlrService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5043
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ApplicationCtrlrService, providedIn: 'root' }); }
5044
+ }
5045
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ApplicationCtrlrService, decorators: [{
5046
+ type: Injectable,
5047
+ args: [{
5048
+ providedIn: 'root'
5049
+ }]
5050
+ }] });
5051
+
4955
5052
  class PortalService {
4956
5053
  constructor() {
4957
5054
  this.offsetTop = 0;
@@ -4976,6 +5073,7 @@ class PortalService {
4976
5073
  this._location = inject(Location);
4977
5074
  this._localStorage = inject(LocalStorageService);
4978
5075
  this._document = inject(DOCUMENT);
5076
+ this._applicationCtrlrService = inject(ApplicationCtrlrService);
4979
5077
  this._deviceSizeSource = new BehaviorSubject(this._initalizeDeviceSize());
4980
5078
  this._loggedInSource = new BehaviorSubject(false);
4981
5079
  this.routeInitializedSource = new BehaviorSubject(false);
@@ -5128,7 +5226,7 @@ class PortalService {
5128
5226
  }));
5129
5227
  }
5130
5228
  renderUlvMainUi(navItem, vcr, injector, isReportPage = false) {
5131
- return this.createForReport(navItem).pipe(exhaustMap((ulvMainCtrlr) => this.getUlvMainUiComponent(ulvMainCtrlr.Adapter.Control, injector, isReportPage).pipe(tap((ulvManiUiComponent) => vcr.insert(ulvManiUiComponent.hostView)), map(() => ulvMainCtrlr))));
5229
+ return this.createForReport(navItem).pipe(exhaustMap$1((ulvMainCtrlr) => this.getUlvMainUiComponent(ulvMainCtrlr.Adapter.Control, injector, isReportPage).pipe(tap((ulvManiUiComponent) => vcr.insert(ulvManiUiComponent.hostView)), map(() => ulvMainCtrlr))));
5132
5230
  }
5133
5231
  getUlvMainUiComponent(customUlvMainUi, injector, isReportPage) {
5134
5232
  const customUiSetting = BarsaApi.Common.Util.TryGetValue(customUlvMainUi.Setting, 'CustomUi', null);
@@ -5244,8 +5342,8 @@ class PortalService {
5244
5342
  getComponentType(moduleName, componentName, selector) {
5245
5343
  return this.dcm.getComponentType(selector, componentName, moduleName);
5246
5344
  }
5247
- getComponent(moduleName, _modulePath, _componentName, selector, parentInjector) {
5248
- return this.dcm.getComponentBySelector(selector, moduleName, parentInjector);
5345
+ getComponent(moduleName, _modulePath, componentName, selector, parentInjector) {
5346
+ return this.dcm.getComponentBySelector(selector, componentName, moduleName, parentInjector);
5249
5347
  }
5250
5348
  loadJs$(path) {
5251
5349
  return from(new Promise((resolve, reject) => {
@@ -5802,7 +5900,7 @@ class PortalService {
5802
5900
  BarsaApi.Ul.ApplicationCtrlr.DefaultSystemId = null;
5803
5901
  }
5804
5902
  return new Promise((resolve, reject) => {
5805
- BarsaApi.Ul.ApplicationCtrlr._loadSystem(id, true, (data) => {
5903
+ this._applicationCtrlrService._loadSystem(id, (data) => {
5806
5904
  resolve(data);
5807
5905
  }, (err) => {
5808
5906
  reject(err);
@@ -11509,7 +11607,7 @@ class BaseViewItemPropsComponent extends BaseViewPropsComponent {
11509
11607
  .asObservable()
11510
11608
  .pipe(takeUntil$1(this._onDestroy$),
11511
11609
  // debounceTime(500),
11512
- exhaustMap$1((reason) => this._inlineEditSaveFormPanel(reason)), catchError$1((err) => throwError(() => err)))
11610
+ exhaustMap((reason) => this._inlineEditSaveFormPanel(reason)), catchError$1((err) => throwError(() => err)))
11513
11611
  .subscribe((res) => {
11514
11612
  if (res.saved) {
11515
11613
  this.mo.$IsChecked = false;
@@ -15198,11 +15296,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
15198
15296
 
15199
15297
  class ButtonLoadingComponent {
15200
15298
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ButtonLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15201
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.6", type: ButtonLoadingComponent, isStandalone: false, selector: "bnrc-button-loading", inputs: { valid: "valid", loading: "loading", text: "text", transparent: "transparent" }, ngImport: i0, template: "<!-- <button class=\"button\" [disabled]=\"loading\">\r\n <i [class.!tw-hidden]=\"!loading\" class=\"fa fa-circle-o-notch fa-spin\"></i\r\n >{{ (loading ? 'Wait' : text) | bbbTranslate }}\r\n</button> -->\r\n<button\r\n type=\"button\"\r\n class=\"button tw-rounded-lg\"\r\n [class.button--loading]=\"loading\"\r\n [disabled]=\"loading || !valid\"\r\n [class.transparent]=\"transparent\"\r\n>\r\n <span class=\"button__text\">{{ text | bbbTranslate }}</span>\r\n</button>\r\n", styles: [":host{display:block;width:100%}.button{width:100%;position:relative;padding:8px 16px;background:var(--button-loading);border:none;outline:none;cursor:pointer}.button .button__text{font:700 1rem IranYekanDigits,B-Font;color:var(--button-loading-text-color);transition:all .2s}.button.transparent{background:transparent;border:1px solid var(--button-loading)}.button.transparent .button__text{color:var(--button-loading)}.button.transparent .button:active{background:var(--button-loading-transparent-active)}.button[disabled],.button[disabled]:active{background-color:gray}.button:active{background:var(--button-loading-active)}.button--loading .button__text{visibility:hidden;opacity:0}.button--loading:after{content:\"\";position:absolute;width:16px;height:16px;inset:0;margin:auto;border:4px solid transparent;border-top-color:var(--button-loading-border-top-color);border-radius:50%;animation:button-loading-spinner 1s ease infinite}.transparent.button--loading:after{border-top-color:var(--button-loading-transparent-border-top-color)}@keyframes button-loading-spinner{0%{transform:rotate(0)}to{transform:rotate(1turn)}}\n"], dependencies: [{ kind: "pipe", type: BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
15299
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: ButtonLoadingComponent, isStandalone: false, selector: "bnrc-button-loading", inputs: { valid: "valid", loading: "loading", text: "text", transparent: "transparent" }, ngImport: i0, template: "<!-- <button class=\"button\" [disabled]=\"loading\">\r\n <i [class.!tw-hidden]=\"!loading\" class=\"fa fa-circle-o-notch fa-spin\"></i\r\n >{{ (loading ? 'Wait' : text) | bbbTranslate }}\r\n</button> -->\r\n<button\r\n type=\"button\"\r\n class=\"tw-bg-(--primaryColor) tw-bg-blue-500 tw-w-full hover:tw-bg-blue-700 tw-text-white tw-font-bold tw-py-2 tw-px-4 tw-rounded dark:tw-bg-blue-700 dark:hover:tw-bg-blue-900\"\r\n [disabled]=\"loading || !valid\"\r\n [class.transparent]=\"transparent\"\r\n>\r\n @if(loading){\r\n <div role=\"status\" class=\"tw-w-full tw-flex tw-justify-center\">\r\n <svg\r\n class=\"tw-mr-3 tw--ml-1 tw-size-5 tw-animate-spin tw-text-white\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n >\r\n <circle class=\"tw-opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\r\n <path\r\n class=\"tw-opacity-75\"\r\n fill=\"currentColor\"\r\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\r\n ></path>\r\n </svg>\r\n <span class=\"tw-sr-only\">{{ 'Loading' | bbbTranslate }}...</span>\r\n </div>\r\n }@else{\r\n <span class=\"button__text\">{{ text | bbbTranslate }}</span>\r\n }\r\n</button>\r\n", styles: [":host{display:block;width:100%}.button{width:100%;position:relative;padding:8px 16px;background:var(--button-loading);border:none;outline:none;cursor:pointer}.button .button__text{font:700 1rem IranYekanDigits,B-Font;color:var(--button-loading-text-color);transition:all .2s}.button.transparent{background:transparent;border:1px solid var(--button-loading)}.button.transparent .button__text{color:var(--button-loading)}.button.transparent .button:active{background:var(--button-loading-transparent-active)}.button[disabled],.button[disabled]:active{background-color:gray}.button:active{background:var(--button-loading-active)}.button--loading .button__text{visibility:hidden;opacity:0}.button--loading:after{content:\"\";position:absolute;width:16px;height:16px;inset:0;margin:auto;border:4px solid transparent;border-top-color:var(--button-loading-border-top-color);border-radius:50%;animation:button-loading-spinner 1s ease infinite}.transparent.button--loading:after{border-top-color:var(--button-loading-transparent-border-top-color)}@keyframes button-loading-spinner{0%{transform:rotate(0)}to{transform:rotate(1turn)}}\n"], dependencies: [{ kind: "pipe", type: BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
15202
15300
  }
15203
15301
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ButtonLoadingComponent, decorators: [{
15204
15302
  type: Component,
15205
- args: [{ selector: 'bnrc-button-loading', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<!-- <button class=\"button\" [disabled]=\"loading\">\r\n <i [class.!tw-hidden]=\"!loading\" class=\"fa fa-circle-o-notch fa-spin\"></i\r\n >{{ (loading ? 'Wait' : text) | bbbTranslate }}\r\n</button> -->\r\n<button\r\n type=\"button\"\r\n class=\"button tw-rounded-lg\"\r\n [class.button--loading]=\"loading\"\r\n [disabled]=\"loading || !valid\"\r\n [class.transparent]=\"transparent\"\r\n>\r\n <span class=\"button__text\">{{ text | bbbTranslate }}</span>\r\n</button>\r\n", styles: [":host{display:block;width:100%}.button{width:100%;position:relative;padding:8px 16px;background:var(--button-loading);border:none;outline:none;cursor:pointer}.button .button__text{font:700 1rem IranYekanDigits,B-Font;color:var(--button-loading-text-color);transition:all .2s}.button.transparent{background:transparent;border:1px solid var(--button-loading)}.button.transparent .button__text{color:var(--button-loading)}.button.transparent .button:active{background:var(--button-loading-transparent-active)}.button[disabled],.button[disabled]:active{background-color:gray}.button:active{background:var(--button-loading-active)}.button--loading .button__text{visibility:hidden;opacity:0}.button--loading:after{content:\"\";position:absolute;width:16px;height:16px;inset:0;margin:auto;border:4px solid transparent;border-top-color:var(--button-loading-border-top-color);border-radius:50%;animation:button-loading-spinner 1s ease infinite}.transparent.button--loading:after{border-top-color:var(--button-loading-transparent-border-top-color)}@keyframes button-loading-spinner{0%{transform:rotate(0)}to{transform:rotate(1turn)}}\n"] }]
15303
+ args: [{ selector: 'bnrc-button-loading', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<!-- <button class=\"button\" [disabled]=\"loading\">\r\n <i [class.!tw-hidden]=\"!loading\" class=\"fa fa-circle-o-notch fa-spin\"></i\r\n >{{ (loading ? 'Wait' : text) | bbbTranslate }}\r\n</button> -->\r\n<button\r\n type=\"button\"\r\n class=\"tw-bg-(--primaryColor) tw-bg-blue-500 tw-w-full hover:tw-bg-blue-700 tw-text-white tw-font-bold tw-py-2 tw-px-4 tw-rounded dark:tw-bg-blue-700 dark:hover:tw-bg-blue-900\"\r\n [disabled]=\"loading || !valid\"\r\n [class.transparent]=\"transparent\"\r\n>\r\n @if(loading){\r\n <div role=\"status\" class=\"tw-w-full tw-flex tw-justify-center\">\r\n <svg\r\n class=\"tw-mr-3 tw--ml-1 tw-size-5 tw-animate-spin tw-text-white\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n >\r\n <circle class=\"tw-opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\r\n <path\r\n class=\"tw-opacity-75\"\r\n fill=\"currentColor\"\r\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\r\n ></path>\r\n </svg>\r\n <span class=\"tw-sr-only\">{{ 'Loading' | bbbTranslate }}...</span>\r\n </div>\r\n }@else{\r\n <span class=\"button__text\">{{ text | bbbTranslate }}</span>\r\n }\r\n</button>\r\n", styles: [":host{display:block;width:100%}.button{width:100%;position:relative;padding:8px 16px;background:var(--button-loading);border:none;outline:none;cursor:pointer}.button .button__text{font:700 1rem IranYekanDigits,B-Font;color:var(--button-loading-text-color);transition:all .2s}.button.transparent{background:transparent;border:1px solid var(--button-loading)}.button.transparent .button__text{color:var(--button-loading)}.button.transparent .button:active{background:var(--button-loading-transparent-active)}.button[disabled],.button[disabled]:active{background-color:gray}.button:active{background:var(--button-loading-active)}.button--loading .button__text{visibility:hidden;opacity:0}.button--loading:after{content:\"\";position:absolute;width:16px;height:16px;inset:0;margin:auto;border:4px solid transparent;border-top-color:var(--button-loading-border-top-color);border-radius:50%;animation:button-loading-spinner 1s ease infinite}.transparent.button--loading:after{border-top-color:var(--button-loading-transparent-border-top-color)}@keyframes button-loading-spinner{0%{transform:rotate(0)}to{transform:rotate(1turn)}}\n"] }]
15206
15304
  }], propDecorators: { valid: [{
15207
15305
  type: Input
15208
15306
  }], loading: [{
@@ -15870,7 +15968,8 @@ const services = [
15870
15968
  IndexedDbService,
15871
15969
  BbbTranslatePipe,
15872
15970
  BarsaStorageService,
15873
- ServiceWorkerCommuncationService
15971
+ ServiceWorkerCommuncationService,
15972
+ ApplicationCtrlrService
15874
15973
  ];
15875
15974
  const pipes = [
15876
15975
  NumeralPipe,
@@ -15930,7 +16029,7 @@ const pipes = [
15930
16029
  SplitPipe,
15931
16030
  DynamicDarkColorPipe
15932
16031
  ];
15933
- const functionL1 = function () {
16032
+ const functionL1 = async function () {
15934
16033
  if (BarsaApi.LoginFormData.Culture === 'fa-IR') {
15935
16034
  return Promise.resolve();
15936
16035
  }
@@ -15945,7 +16044,7 @@ const functionL1 = function () {
15945
16044
  }
15946
16045
  });
15947
16046
  };
15948
- const functionL2 = function (portalService, titleService) {
16047
+ const functionL2 = function (portalService, applicationCtrlrService, titleService) {
15949
16048
  portalService.loadUserPortalSetting();
15950
16049
  portalService.loadPortalDataSync();
15951
16050
  if (portalService.portalData?.Title) {
@@ -15955,7 +16054,9 @@ const functionL2 = function (portalService, titleService) {
15955
16054
  return portalService.loadSystem(BarsaApi.LoginFormData.PortalSystemId); // login form need just portal system
15956
16055
  }
15957
16056
  else {
15958
- return portalService.loadSystem(); // load all systems if user is logged in
16057
+ return new Promise((resolve, _reject) => {
16058
+ applicationCtrlrService.initialize(resolve);
16059
+ }); // load all systems if user is logged in
15959
16060
  }
15960
16061
  };
15961
16062
  class BarsaNovinRayCoreModule extends BaseModule {
@@ -15973,11 +16074,14 @@ class BarsaNovinRayCoreModule extends BaseModule {
15973
16074
  ngModule: BarsaNovinRayCoreModule,
15974
16075
  providers: [
15975
16076
  provideAppInitializer(() => {
15976
- const initializerFn = ((portalService, titleService, promptUpdateService, barsaStorageService, swCommunication, _, router) => () => {
16077
+ const initializerFn = ((portalService, applicationCtrlrService, titleService, promptUpdateService, barsaStorageService, swCommunication, _, router) => () => {
15977
16078
  const inLocalMode = isInLocalMode();
15978
16079
  return portalService
15979
16080
  .loadServerStartupData()
15980
- .then(() => Promise.all([functionL1(), functionL2(portalService, titleService)]).finally(() => {
16081
+ .then(() => Promise.all([
16082
+ functionL1(),
16083
+ functionL2(portalService, applicationCtrlrService, titleService)
16084
+ ]).finally(() => {
15981
16085
  promptUpdateService.checkForUpdate();
15982
16086
  barsaStorageService.init();
15983
16087
  swCommunication.init();
@@ -15992,7 +16096,7 @@ class BarsaNovinRayCoreModule extends BaseModule {
15992
16096
  }
15993
16097
  return Promise.resolve();
15994
16098
  });
15995
- })(inject(PortalService), inject(Title), inject(PromptUpdateService), inject(BarsaStorageService), inject(ServiceWorkerCommuncationService), inject(NetworkStatusService), inject(Router));
16099
+ })(inject(PortalService), inject(ApplicationCtrlrService), inject(Title), inject(PromptUpdateService), inject(BarsaStorageService), inject(ServiceWorkerCommuncationService), inject(NetworkStatusService), inject(Router));
15996
16100
  return initializerFn();
15997
16101
  }),
15998
16102
  {
@@ -16295,5 +16399,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
16295
16399
  * Generated bundle index. Do not edit.
16296
16400
  */
16297
16401
 
16298
- export { APP_VERSION, AbsoluteDivBodyDirective, AffixRespondEvents, AllFilesMimeType, AnchorScrollDirective, ApiService, ApplicationBaseComponent, AttrRtlDirective, AudioMimeType, AudioRecordingService, AuthGuard, BarsaApi, BarsaDialogService, BarsaIconDictPipe, BarsaNovinRayCoreModule, BarsaReadonlyDirective, BarsaSapUiFormPageModule, BarsaStorageService, BaseColumnPropsComponent, BaseComponent, BaseController, BaseDirective, BaseDynamicComponent, BaseFormToolbaritemPropsComponent, BaseItemContentPropsComponent, BaseModule, BaseReportModel, BaseUlvSettingComponent, BaseViewContentPropsComponent, BaseViewItemPropsComponent, BaseViewPropsComponent, BbbTranslatePipe, BodyClickDirective, BoolControlInfoModel, BreadcrumbService, ButtonLoadingComponent, CalculateControlInfoModel, CanUploadFilePipe, CardMediaSizePipe, ChangeLayoutInfoCustomUi, CodeEditorControlInfoModel, ColSetting, ColumnCustomComponentPipe, ColumnCustomUiPipe, ColumnIconPipe, ColumnResizerDirective, ColumnService, ColumnValueDirective, ColumnValueOfParametersPipe, ColumnValuePipe, ComboRowImagePipe, CommandControlInfoModel, ContainerComponent, ContainerService, ContextMenuPipe, ControlUiPipe, ConvertToStylePipe, CopyDirective, CountDownDirective, CustomCommand, CustomInjector, CustomRouteReuseStategy, DIALOG_SERVICE, DateHijriService, DateMiladiService, DateRanges, DateService, DateShamsiService, DateTimeControlInfoModel, DeviceWidth, DialogParams, DynamicCommandDirective, DynamicComponentService, DynamicDarkColorPipe, DynamicFormComponent, DynamicFormToolbaritemComponent, DynamicItemComponent, DynamicLayoutComponent, DynamicRootVariableDirective, DynamicStyleDirective, DynamicTileGroupComponent, EllapsisTextDirective, EllipsifyDirective, EmptyPageComponent, EmptyPageWithRouterAndRouterOutletComponent, EnumControlInfoModel, ExecuteDynamicCommand, ExecuteWorkflowChoiceDef, FORM_DIALOG_COMPONENT, FieldBaseComponent, FieldDirective, FieldInfoTypeEnum, FieldUiComponent, FileControlInfoModel, FileInfoCountPipe, FilePictureInfoModel, FilesValidationHelper, FillAllLayoutControls, FillEmptySpaceDirective, FilterColumnsByDetailsPipe, FilterInlineActionListPipe, FilterPipe, FilterStringPipe, FilterTabPipe, FilterToolbarControlPipe, FilterWorkflowInMobilePipe, FindColumnByDbNamePipe, FindGroup, FindLayoutSettingFromLayout94, FindPreviewColumnPipe, FindToolbarItem, FioriIconPipe, FormBaseComponent, FormCloseDirective, FormComponent, FormFieldReportPageComponent, FormNewComponent, FormPageBaseComponent, FormPageComponent, FormPanelService, FormPropsBaseComponent, FormService, FormToolbarBaseComponent, GaugeControlInfoModel, GeneralControlInfoModel, GetAllColumnsSorted, GetAllHorizontalFromLayout94, GetDefaultMoObjectInfo, GetImgTags, GetVisibleValue, GridSetting, GroupBy, GroupByPipe, GroupByService, HeaderFacetValuePipe, HideAcceptCancelButtonsPipe, HideColumnsInmobilePipe, HistoryControlInfoModel, HorizontalLayoutService, HorizontalResponsiveDirective, IconControlInfoModel, ImageLazyDirective, ImageMimeType, ImagetoPrint, InMemoryStorageService, IndexedDbService, InputNumber, IntersectionObserverDirective, IntersectionStatus, IsDarkMode, IsExpandedNodePipe, IsImagePipe, ItemsRendererDirective, LabelStarTrimPipe, LabelmandatoryDirective, LayoutItemBaseComponent, LayoutMainContentService, LayoutPanelBaseComponent, LayoutService, LinearListControlInfoModel, LinearListHelper, ListCountPipe, ListRelationModel, LoadExternalFilesDirective, LocalStorageService, LogService, LoginSettingsResolver, MeasureFormTitleWidthDirective, MergeFieldsToColumnsPipe, MetaobjectDataModel, MetaobjectRelationModel, MoForReportModel, MoInfoUlvMoListPipe, MoInfoUlvPagingPipe, MoReportValueConcatPipe, MoReportValuePipe, MoValuePipe, MobileDirective, ModalRootComponent, MultipleGroupByPipe, NOTIFICATAION_POPUP_SERVER, NOTIFICATION_WEBWORKER_FACTORY, NetworkStatusService, NotFoundComponent, NotificationService, NowraptextDirective, NumberBaseComponent, NumberControlInfoModel, NumbersOnlyInputDirective, NumeralPipe, OverflowTextDirective, PageBaseComponent, PageWithFormHandlerBaseComponent, PdfMimeType, PictureFieldSourcePipe, PictureFileControlInfoModel, PlaceHolderDirective, PortalDynamicPageResolver, PortalFormPageResolver, PortalPageComponent, PortalPageResolver, PortalPageSidebarComponent, PortalReportPageResolver, PortalService, PreventDefaulEvent, PreventDefaultDirective, PrintFilesDirective, PrintImage, PromptUpdateService, RabetehAkseTakiListiControlInfoModel, RedirectHomeGuard, RedirectReportNavigatorCommandComponent, RelatedReportControlInfoModel, RelationListControlInfoModel, RemoveNewlinePipe, RenderUlvDirective, RenderUlvPaginDirective, RenderUlvViewerDirective, ReplacePipe, ReportBaseComponent, ReportBaseInfo, ReportCalendarModel, ReportContainerComponent, ReportExtraInfo, ReportField, ReportFormModel, ReportItemBaseComponent, ReportListModel, ReportModel, ReportTreeModel, ReportViewBaseComponent, ReportViewColumn, ResizableComponent, ResizableDirective, ResizableModule, ResizeObserverDirective, ReversePipe, RichStringControlInfoModel, RootPageComponent, RootPortalComponent, RouteFormChangeDirective, RoutingService, RowDataOption, RowNumberPipe, SanitizeTextPipe, SaveImageDirective, SaveImageToFile, SaveScrollPositionService, ScrollPersistDirective, ScrollToSelectedDirective, SelectionMode, SeperatorFixPipe, ServiceWorkerCommuncationService, ServiceWorkerNotificationService, ShellbarHeightService, ShortcutHandlerDirective, ShortcutRegisterDirective, SingleRelationControlInfoModel, SortDirection, SortPipe, SortSetting, SplideSliderDirective, SplitPipe, StopPropagationDirective, StringControlInfoModel, StringToNumberPipe, SubformControlInfoModel, SystemBaseComponent, TOAST_SERVICE, TableHeaderWidthMode, TableResizerDirective, TabpageService, ThImageOrIconePipe, TileGroupBreadcrumResolver, TilePropsComponent, TlbButtonsPipe, ToolbarSettingsPipe, TotalSummaryPipe, UiService, UlvCommandDirective, UlvMainService, UnlimitSessionComponent, UntilInViewDirective, UploadService, VideoMimeType, VideoRecordingService, ViewBase, VisibleValuePipe, WebOtpDirective, WordMimeType, WorfkflowwChoiceCommandDirective, addCssVariableToRoot, availablePrefixes, calcContextMenuWidth, calculateColumnContent, calculateColumnWidth, calculateColumnWidthFitToContainer, calculateFreeColumnSize, calculateMoDataListContentWidthByColumnName, cancelRequestAnimationFrame, createFormPanelMetaConditions, createGridEditorFormPanel, easeInOutCubic, elementInViewport2, enumValueToStringSize, executeUlvCommandHandler, flattenTree, forbiddenValidator, formRoutes, formatBytes, fromIntersectionObserver, genrateInlineMoId, getAllItemsPerChildren, getColumnValueOfMoDataList, getComponentDefined, getControlList, getControlSizeMode, getDateService, getDeviceIsDesktop, getDeviceIsMobile, getDeviceIsPhone, getDeviceIsTablet, getFieldValue, getFocusableTagNames, getFormSettings, getGridSettings, getHeaderValue, getIcon, getImagePath, getLabelWidth, getLayout94ObjectInfo, getLayoutControl, getNewMoGridEditor, getParentHeight, getRequestAnimationFrame, getResetGridSettings, getTargetRect, getUniqueId, getValidExtension, isFF, isFirefox, isFunction, isImage, isInLocalMode, isSafari, isTargetWindow, measureText, measureText2, measureTextBy, mobile_regex, nullOrUndefinedString, number_only, requestAnimationFramePolyfill, setColumnWidthByMaxMoContentWidth, setOneDepthLevel, setTableThWidth, shallowEqual, stopPropagation, throwIfAlreadyLoaded, toNumber, validateAllFormFields };
16402
+ export { APP_VERSION, AbsoluteDivBodyDirective, AffixRespondEvents, AllFilesMimeType, AnchorScrollDirective, ApiService, ApplicationBaseComponent, ApplicationCtrlrService, AttrRtlDirective, AudioMimeType, AudioRecordingService, AuthGuard, BarsaApi, BarsaDialogService, BarsaIconDictPipe, BarsaNovinRayCoreModule, BarsaReadonlyDirective, BarsaSapUiFormPageModule, BarsaStorageService, BaseColumnPropsComponent, BaseComponent, BaseController, BaseDirective, BaseDynamicComponent, BaseFormToolbaritemPropsComponent, BaseItemContentPropsComponent, BaseModule, BaseReportModel, BaseUlvSettingComponent, BaseViewContentPropsComponent, BaseViewItemPropsComponent, BaseViewPropsComponent, BbbTranslatePipe, BodyClickDirective, BoolControlInfoModel, BreadcrumbService, ButtonLoadingComponent, CalculateControlInfoModel, CanUploadFilePipe, CardMediaSizePipe, ChangeLayoutInfoCustomUi, CodeEditorControlInfoModel, ColSetting, ColumnCustomComponentPipe, ColumnCustomUiPipe, ColumnIconPipe, ColumnResizerDirective, ColumnService, ColumnValueDirective, ColumnValueOfParametersPipe, ColumnValuePipe, ComboRowImagePipe, CommandControlInfoModel, ContainerComponent, ContainerService, ContextMenuPipe, ControlUiPipe, ConvertToStylePipe, CopyDirective, CountDownDirective, CustomCommand, CustomInjector, CustomRouteReuseStategy, DIALOG_SERVICE, DateHijriService, DateMiladiService, DateRanges, DateService, DateShamsiService, DateTimeControlInfoModel, DeviceWidth, DialogParams, DynamicCommandDirective, DynamicComponentService, DynamicDarkColorPipe, DynamicFormComponent, DynamicFormToolbaritemComponent, DynamicItemComponent, DynamicLayoutComponent, DynamicRootVariableDirective, DynamicStyleDirective, DynamicTileGroupComponent, EllapsisTextDirective, EllipsifyDirective, EmptyPageComponent, EmptyPageWithRouterAndRouterOutletComponent, EnumControlInfoModel, ExecuteDynamicCommand, ExecuteWorkflowChoiceDef, FORM_DIALOG_COMPONENT, FieldBaseComponent, FieldDirective, FieldInfoTypeEnum, FieldUiComponent, FileControlInfoModel, FileInfoCountPipe, FilePictureInfoModel, FilesValidationHelper, FillAllLayoutControls, FillEmptySpaceDirective, FilterColumnsByDetailsPipe, FilterInlineActionListPipe, FilterPipe, FilterStringPipe, FilterTabPipe, FilterToolbarControlPipe, FilterWorkflowInMobilePipe, FindColumnByDbNamePipe, FindGroup, FindLayoutSettingFromLayout94, FindPreviewColumnPipe, FindToolbarItem, FioriIconPipe, FormBaseComponent, FormCloseDirective, FormComponent, FormFieldReportPageComponent, FormNewComponent, FormPageBaseComponent, FormPageComponent, FormPanelService, FormPropsBaseComponent, FormService, FormToolbarBaseComponent, GaugeControlInfoModel, GeneralControlInfoModel, GetAllColumnsSorted, GetAllHorizontalFromLayout94, GetDefaultMoObjectInfo, GetImgTags, GetVisibleValue, GridSetting, GroupBy, GroupByPipe, GroupByService, HeaderFacetValuePipe, HideAcceptCancelButtonsPipe, HideColumnsInmobilePipe, HistoryControlInfoModel, HorizontalLayoutService, HorizontalResponsiveDirective, IconControlInfoModel, ImageLazyDirective, ImageMimeType, ImagetoPrint, InMemoryStorageService, IndexedDbService, InputNumber, IntersectionObserverDirective, IntersectionStatus, IsDarkMode, IsExpandedNodePipe, IsImagePipe, ItemsRendererDirective, LabelStarTrimPipe, LabelmandatoryDirective, LayoutItemBaseComponent, LayoutMainContentService, LayoutPanelBaseComponent, LayoutService, LinearListControlInfoModel, LinearListHelper, ListCountPipe, ListRelationModel, LoadExternalFilesDirective, LocalStorageService, LogService, LoginSettingsResolver, MeasureFormTitleWidthDirective, MergeFieldsToColumnsPipe, MetaobjectDataModel, MetaobjectRelationModel, MoForReportModel, MoInfoUlvMoListPipe, MoInfoUlvPagingPipe, MoReportValueConcatPipe, MoReportValuePipe, MoValuePipe, MobileDirective, ModalRootComponent, MultipleGroupByPipe, NOTIFICATAION_POPUP_SERVER, NOTIFICATION_WEBWORKER_FACTORY, NetworkStatusService, NotFoundComponent, NotificationService, NowraptextDirective, NumberBaseComponent, NumberControlInfoModel, NumbersOnlyInputDirective, NumeralPipe, OverflowTextDirective, PageBaseComponent, PageWithFormHandlerBaseComponent, PdfMimeType, PictureFieldSourcePipe, PictureFileControlInfoModel, PlaceHolderDirective, PortalDynamicPageResolver, PortalFormPageResolver, PortalPageComponent, PortalPageResolver, PortalPageSidebarComponent, PortalReportPageResolver, PortalService, PreventDefaulEvent, PreventDefaultDirective, PrintFilesDirective, PrintImage, PromptUpdateService, RabetehAkseTakiListiControlInfoModel, RedirectHomeGuard, RedirectReportNavigatorCommandComponent, RelatedReportControlInfoModel, RelationListControlInfoModel, RemoveNewlinePipe, RenderUlvDirective, RenderUlvPaginDirective, RenderUlvViewerDirective, ReplacePipe, ReportBaseComponent, ReportBaseInfo, ReportCalendarModel, ReportContainerComponent, ReportExtraInfo, ReportField, ReportFormModel, ReportItemBaseComponent, ReportListModel, ReportModel, ReportTreeModel, ReportViewBaseComponent, ReportViewColumn, ResizableComponent, ResizableDirective, ResizableModule, ResizeObserverDirective, ReversePipe, RichStringControlInfoModel, RootPageComponent, RootPortalComponent, RouteFormChangeDirective, RoutingService, RowDataOption, RowNumberPipe, SanitizeTextPipe, SaveImageDirective, SaveImageToFile, SaveScrollPositionService, ScrollPersistDirective, ScrollToSelectedDirective, SelectionMode, SeperatorFixPipe, ServiceWorkerCommuncationService, ServiceWorkerNotificationService, ShellbarHeightService, ShortcutHandlerDirective, ShortcutRegisterDirective, SingleRelationControlInfoModel, SortDirection, SortPipe, SortSetting, SplideSliderDirective, SplitPipe, StopPropagationDirective, StringControlInfoModel, StringToNumberPipe, SubformControlInfoModel, SystemBaseComponent, TOAST_SERVICE, TableHeaderWidthMode, TableResizerDirective, TabpageService, ThImageOrIconePipe, TileGroupBreadcrumResolver, TilePropsComponent, TlbButtonsPipe, ToolbarSettingsPipe, TotalSummaryPipe, UiService, UlvCommandDirective, UlvMainService, UnlimitSessionComponent, UntilInViewDirective, UploadService, VideoMimeType, VideoRecordingService, ViewBase, VisibleValuePipe, WebOtpDirective, WordMimeType, WorfkflowwChoiceCommandDirective, addCssVariableToRoot, availablePrefixes, calcContextMenuWidth, calculateColumnContent, calculateColumnWidth, calculateColumnWidthFitToContainer, calculateFreeColumnSize, calculateMoDataListContentWidthByColumnName, cancelRequestAnimationFrame, createFormPanelMetaConditions, createGridEditorFormPanel, easeInOutCubic, elementInViewport2, enumValueToStringSize, executeUlvCommandHandler, flattenTree, forbiddenValidator, formRoutes, formatBytes, fromEntries, fromIntersectionObserver, genrateInlineMoId, getAllItemsPerChildren, getColumnValueOfMoDataList, getComponentDefined, getControlList, getControlSizeMode, getDateService, getDeviceIsDesktop, getDeviceIsMobile, getDeviceIsPhone, getDeviceIsTablet, getFieldValue, getFocusableTagNames, getFormSettings, getGridSettings, getHeaderValue, getIcon, getImagePath, getLabelWidth, getLayout94ObjectInfo, getLayoutControl, getNewMoGridEditor, getParentHeight, getRequestAnimationFrame, getResetGridSettings, getTargetRect, getUniqueId, getValidExtension, isFF, isFirefox, isFunction, isImage, isInLocalMode, isSafari, isTargetWindow, measureText, measureText2, measureTextBy, mobile_regex, nullOrUndefinedString, number_only, requestAnimationFramePolyfill, setColumnWidthByMaxMoContentWidth, setOneDepthLevel, setTableThWidth, shallowEqual, stopPropagation, throwIfAlreadyLoaded, toNumber, validateAllFormFields };
16299
16403
  //# sourceMappingURL=barsa-novin-ray-core.mjs.map