@colijnit/corecomponents_v12 12.2.4 → 12.2.5

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.
Files changed (24) hide show
  1. package/bundles/colijnit-corecomponents_v12.umd.js +428 -81
  2. package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
  3. package/colijnit-corecomponents_v12.d.ts +0 -2
  4. package/colijnit-corecomponents_v12.metadata.json +1 -1
  5. package/esm2015/colijnit-corecomponents_v12.js +1 -3
  6. package/esm2015/lib/components/button/button.component.js +27 -20
  7. package/esm2015/lib/components/filter-item/filter-item.component.js +10 -5
  8. package/esm2015/lib/components/input-date-picker/input-date-picker.component.js +3 -1
  9. package/esm2015/lib/components/list-of-values/list-of-values.component.js +14 -6
  10. package/esm2015/lib/directives/screen-configuration/screen-configuration.directive.js +123 -33
  11. package/esm2015/lib/directives/screen-configuration/screen-configuration.module.js +4 -6
  12. package/esm2015/lib/service/base-module-screen-config.service.js +205 -0
  13. package/esm2015/lib/service/base-module.service.js +42 -0
  14. package/esm2015/public-api.js +4 -1
  15. package/fesm2015/colijnit-corecomponents_v12.js +402 -83
  16. package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
  17. package/lib/components/button/button.component.d.ts +11 -3
  18. package/lib/directives/screen-configuration/screen-configuration.directive.d.ts +25 -9
  19. package/lib/service/base-module-screen-config.service.d.ts +47 -0
  20. package/lib/service/base-module.service.d.ts +22 -0
  21. package/package.json +5 -4
  22. package/public-api.d.ts +3 -0
  23. package/esm2015/lib/directives/screen-configuration/screen-config-component-wrapper.component.js +0 -30
  24. package/lib/directives/screen-configuration/screen-config-component-wrapper.component.d.ts +0 -11
@@ -1,6 +1,7 @@
1
- import { ElementRef, EventEmitter, OnDestroy } from "@angular/core";
2
- import { SafeHtml } from "@angular/platform-browser";
3
- export declare class ButtonComponent implements OnDestroy {
1
+ import { ElementRef, EventEmitter, OnDestroy } from '@angular/core';
2
+ import { SafeHtml } from '@angular/platform-browser';
3
+ import { ScreenConfigAdapterComponent } from '../../interfaces/screen-config-adapter.component.interface';
4
+ export declare class ButtonComponent implements ScreenConfigAdapterComponent, OnDestroy {
4
5
  private _elementRef;
5
6
  label: string;
6
7
  iconData: SafeHtml | undefined;
@@ -15,6 +16,13 @@ export declare class ButtonComponent implements OnDestroy {
15
16
  readonly isToggledChange: EventEmitter<boolean>;
16
17
  get hasIcon(): boolean;
17
18
  onHostClick(event: MouseEvent): void;
19
+ objectConfigName: string;
20
+ required: boolean;
21
+ forceReadonly: boolean;
22
+ readonly: boolean;
23
+ maxLength: number;
24
+ decimals: number;
25
+ redErrorBackground: boolean;
18
26
  constructor(_elementRef: ElementRef);
19
27
  ngOnDestroy(): void;
20
28
  focus(): void;
@@ -1,16 +1,32 @@
1
- import { ComponentFactoryResolver, OnDestroy, ViewContainerRef } from "@angular/core";
2
- import { ScreenConfigAdapterComponent } from "../../interfaces/screen-config-adapter.component.interface";
1
+ import { ElementRef, OnDestroy, Renderer2 } from '@angular/core';
2
+ import { ScreenConfigAdapterComponent } from '../../interfaces/screen-config-adapter.component.interface';
3
+ import { BaseModuleScreenConfigService } from '../../service/base-module-screen-config.service';
4
+ import { BaseModuleService } from '../../service/base-module.service';
3
5
  export declare class ScreenConfigurationDirective implements OnDestroy {
4
6
  hostComponent: ScreenConfigAdapterComponent;
5
- private _viewContainerRef;
6
- private _componentFactoryResolver;
7
- set screenConfigurationObject(screenConfigurationObject: any);
8
- get screenConfigurationObject(): any;
7
+ private _element;
8
+ private _configService;
9
+ private _renderer;
10
+ private _moduleService?;
11
+ set screenConfigurationObject(value: string);
12
+ get screenConfigurationObject(): string;
13
+ dataName: string;
14
+ screenConfigNativeElement: boolean;
9
15
  noModuleService: boolean;
16
+ private _isHeader;
10
17
  private _screenConfigurationObject;
11
- private _wrapperComponentInstance;
12
- constructor(hostComponent: ScreenConfigAdapterComponent, _viewContainerRef: ViewContainerRef, _componentFactoryResolver: ComponentFactoryResolver);
18
+ private _isTurnedOff;
19
+ private _subs;
20
+ constructor(hostComponent: ScreenConfigAdapterComponent, _element: ElementRef, _configService: BaseModuleScreenConfigService, _renderer: Renderer2, _moduleService?: BaseModuleService);
21
+ ngOnInit(): void;
13
22
  ngOnDestroy(): void;
14
- private _initWrapperComponent;
15
23
  private _updateHost;
24
+ /**
25
+ * Spawn error message tooltip onto our host comp, if any error was meant for the host (found by screenConfigurationObject);
26
+ * @param errorValidation A top-level full validation result, either from the backend or from some client-side validation error.
27
+ */
28
+ private _setErrorRedBackgroundAfterScrCfgValidate;
29
+ private _moduleInReadonlyMode;
30
+ private _mayUpdateHost;
31
+ private _setHostVisible;
16
32
  }
@@ -0,0 +1,47 @@
1
+ import { BehaviorSubject } from 'rxjs';
2
+ import { BusinessObject } from '@colijnit/ioneconnector/build/model/business-object';
3
+ import { ValidationResult } from '@colijnit/ioneconnector/build/model/validation-result';
4
+ import { ObjectConfigurationDefaultValueType } from '@colijnit/ioneconnector/build/type/object-configuration-default-value-type';
5
+ import { ObjectConfigKind } from '@colijnit/ioneconnector/build/enum/object-config-kind';
6
+ import { ObjectConfiguration } from '@colijnit/ioneconnector/build/model/object-configuration';
7
+ export declare abstract class BaseModuleScreenConfigService {
8
+ abstract screenModuleName: string;
9
+ readonly configSet: BehaviorSubject<string[]>;
10
+ get configObjects(): ObjectConfiguration[];
11
+ controlValidityByBoMap: {
12
+ bo: BusinessObject;
13
+ controlKey: string;
14
+ valid: boolean;
15
+ }[];
16
+ private _configObjects;
17
+ private _objectConfigsMap;
18
+ loadConfig(params?: string[], insertRights?: boolean): Promise<ObjectConfiguration[]>;
19
+ lazyLoadConfig(): Promise<void>;
20
+ isActiveFieldValidationObject(configObject: ObjectConfiguration): boolean;
21
+ isBoValid(bo: BusinessObject): boolean;
22
+ getObjectConfigurationFor(configName: string): ObjectConfiguration;
23
+ setObjectConfigurationFor(configName: string, configObject: ObjectConfiguration): void;
24
+ mayRead(configName: string): boolean;
25
+ isReadonly(configName: string): boolean;
26
+ mayWrite(configName: string): boolean;
27
+ immediatelyVisible(configName: string): boolean;
28
+ immediatelyHidden(configName: string): boolean;
29
+ noRights(configName: string): boolean;
30
+ isHidden(configName: string): boolean;
31
+ isRequired(configName: string): boolean;
32
+ getDefaultValue(configName: string): ObjectConfigurationDefaultValueType;
33
+ getDefaultStringValue(configName: string): string;
34
+ getDefaultNumberValue(configName: string): number;
35
+ getMaxLength(configName: string): number;
36
+ getDecimals(configName: string): number;
37
+ hasConfigObjects(): boolean;
38
+ isKind(configName: string, kind: ObjectConfigKind): boolean;
39
+ isDataNameHiddenByItselfOrAnyOfItsParentRubrics(dataName: string): boolean;
40
+ protected abstract loadConfigForModule(params: string[], insertRights?: boolean): Promise<ObjectConfiguration[]>;
41
+ private isDataNameHiddenByAnyOfItsParentRubrics;
42
+ private _getConfigNameByDataName;
43
+ private _getConfigObjectByDataName;
44
+ private _buildScreenConfigMap;
45
+ setScreenConfigurationObjectsReadOnly(value: boolean): void;
46
+ setScreenConfigurationObjectsRedErrorBackground(errorValidation: ValidationResult, setAllFalse?: boolean): void;
47
+ }
@@ -0,0 +1,22 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ import { Subject } from 'rxjs';
3
+ import { ValidationResult } from '@colijnit/ioneconnector/build/model/validation-result';
4
+ import { BaseModuleScreenConfigService } from './base-module-screen-config.service';
5
+ /**
6
+ * Base class for top-level services of CRUD-style iOne modules (the Relation, Article and Transaction modules).
7
+ * What sets these modules apart, is the concept of a relatively bulky, 'single businessobject' being manipulated throughout all the tabs.
8
+ *
9
+ * Many other (smaller?) iOne modules work with multiple LISTS of different business object types instead.
10
+ */
11
+ export declare abstract class BaseModuleService implements OnDestroy {
12
+ protected screenConfigService: BaseModuleScreenConfigService;
13
+ readonly readonlyChange: Subject<boolean>;
14
+ readonly errorValidationReceived: Subject<ValidationResult>;
15
+ readonly successfulUpdate: Subject<void>;
16
+ get readonly(): boolean;
17
+ set readonly(readonly: boolean);
18
+ protected _readonly: boolean;
19
+ private _subscriptions;
20
+ constructor(screenConfigService: BaseModuleScreenConfigService);
21
+ ngOnDestroy(): void;
22
+ }
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@colijnit/corecomponents_v12",
3
- "version": "12.2.4",
3
+ "version": "12.2.5",
4
4
  "description": "Colijn IT core components for Angular 12",
5
5
  "private": false,
6
6
  "peerDependencies": {
7
- "@angular/common": "^12.2.0",
8
- "@angular/core": "^12.2.0",
7
+ "@angular/common": ">=12.2.0",
8
+ "@angular/core": ">=12.2.0",
9
+ "@colijnit/ioneconnector": ">=3.1.8",
9
10
  "@types/hammerjs": "2.0.35",
10
11
  "@types/three": ">=0.125.0",
11
12
  "@tweenjs/tween.js": ">=17.2.0",
12
- "hammerjs": "^2.0.8",
13
+ "hammerjs": ">=2.0.8",
13
14
  "three": ">=0.125.0"
14
15
  },
15
16
  "dependencies": {
package/public-api.d.ts CHANGED
@@ -100,11 +100,14 @@ export * from './lib/components/pagination-bar/pagination-bar.component';
100
100
  export * from './lib/components/pagination-bar/pagination-bar.module';
101
101
  export * from './lib/components/checkmark-overlay/checkmark-overlay.module';
102
102
  export * from './lib/directives/screen-configuration/screen-configuration.module';
103
+ export * from './lib/directives/screen-configuration/screen-configuration.directive';
103
104
  export * from './lib/interfaces/screen-config-adapter-component-interface-name';
104
105
  export * from './lib/interfaces/screen-config-adapter.component.interface';
105
106
  export * from './lib/components/filter-item/filter-item-viewmodel';
106
107
  export * from './lib/components/filter-item/filter-viewmodel';
107
108
  export * from './lib/service/color-sequence.service';
108
109
  export * from './lib/service/overlay.service';
110
+ export * from './lib/service/base-module-screen-config.service';
111
+ export * from './lib/service/base-module.service';
109
112
  export * from './lib/translation/core-components-translation.module';
110
113
  export * from './lib/translation/core-components-translation.service';
@@ -1,30 +0,0 @@
1
- import { Component, ElementRef, ViewChild } from "@angular/core";
2
- export class ScreenConfigComponentWrapper {
3
- constructor(_elementRef) {
4
- this._elementRef = _elementRef;
5
- this._visibleOnViewInit = true;
6
- }
7
- setWrapperContent(element, visibleOnViewInit) {
8
- this._contentNativeElement = element;
9
- this._visibleOnViewInit = visibleOnViewInit;
10
- }
11
- ngAfterViewInit() {
12
- if (this.screenConfigComponentWrapper) {
13
- this.screenConfigComponentWrapper.nativeElement.appendChild(this._contentNativeElement);
14
- this.hidden = !this._visibleOnViewInit;
15
- }
16
- }
17
- }
18
- ScreenConfigComponentWrapper.decorators = [
19
- { type: Component, args: [{
20
- selector: "screen-config-component-wrapper",
21
- template: `<div *ngIf="!hidden" #screenConfigComponentWrapper></div>`
22
- },] }
23
- ];
24
- ScreenConfigComponentWrapper.ctorParameters = () => [
25
- { type: ElementRef }
26
- ];
27
- ScreenConfigComponentWrapper.propDecorators = {
28
- screenConfigComponentWrapper: [{ type: ViewChild, args: ['screenConfigComponentWrapper',] }]
29
- };
30
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NyZWVuLWNvbmZpZy1jb21wb25lbnQtd3JhcHBlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlY29tcG9uZW50cy9zcmMvbGliL2RpcmVjdGl2ZXMvc2NyZWVuLWNvbmZpZ3VyYXRpb24vc2NyZWVuLWNvbmZpZy1jb21wb25lbnQtd3JhcHBlci5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFnQixTQUFTLEVBQUUsVUFBVSxFQUFFLFNBQVMsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQU05RSxNQUFNLE9BQU8sNEJBQTRCO0lBU3ZDLFlBQ1UsV0FBdUI7UUFBdkIsZ0JBQVcsR0FBWCxXQUFXLENBQVk7UUFIekIsdUJBQWtCLEdBQVksSUFBSSxDQUFDO0lBSXhDLENBQUM7SUFFRyxpQkFBaUIsQ0FBQyxPQUFtQixFQUFFLGlCQUEwQjtRQUN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55O1xyXG5cclxuICBwdWJsaWMgaGlkZGVuOiBib29sZWFuO1xyXG5cclxuICBwcml2YXRlIF9jb250ZW50TmF0aXZlRWxlbWVudDogRWxlbWVudFJlZjtcclxuICBwcml2YXRlIF92aXNpYmxlT25WaWV3SW5pdDogYm9vbGVhbiA9IHRydWU7XHJcblxyXG4gIGNvbnN0cnVjdG9yKFxyXG4gICAgcHJpdmF0ZSBfZWxlbWVudFJlZjogRWxlbWVudFJlZlxyXG4gICkge31cclxuXHJcbiAgcHVibGljIHNldFdyYXBwZXJDb250ZW50KGVsZW1lbnQ6IEVsZW1lbnRSZWYsIHZpc2libGVPblZpZXdJbml0OiBib29sZWFuKTogdm9pZCB7XHJcbiAgICB0aGlzLl9jb250ZW50TmF0aXZlRWxlbWVudCA9IGVsZW1lbnQ7XHJcbiAgICB0aGlzLl92aXNpYmxlT25WaWV3SW5pdCA9IHZpc2libGVPblZpZXdJbml0O1xyXG4gIH1cclxuXHJcbiAgcHVibGljIG5nQWZ0ZXJWaWV3SW5pdCgpOiB2b2lkIHtcclxuICAgIGlmICh0aGlzLnNjcmVlbkNvbmZpZ0NvbXBvbmVudFdyYXBwZXIpIHtcclxuICAgICAgdGhpcy5zY3JlZW5Db25maWdDb21wb25lbnRXcmFwcGVyLm5hdGl2ZUVsZW1lbnQuYXBwZW5kQ2hpbGQodGhpcy5fY29udGVudE5hdGl2ZUVsZW1lbnQpO1xyXG4gICAgICB0aGlzLmhpZGRlbiA9ICF0aGlzLl92aXNpYmxlT25WaWV3SW5pdDtcclxuICAgIH1cclxuICB9XHJcblxyXG59XHJcbiJdfQ==
@@ -1,11 +0,0 @@
1
- import { AfterViewInit, ElementRef } from "@angular/core";
2
- export declare class ScreenConfigComponentWrapper implements AfterViewInit {
3
- private _elementRef;
4
- screenConfigComponentWrapper: any;
5
- hidden: boolean;
6
- private _contentNativeElement;
7
- private _visibleOnViewInit;
8
- constructor(_elementRef: ElementRef);
9
- setWrapperContent(element: ElementRef, visibleOnViewInit: boolean): void;
10
- ngAfterViewInit(): void;
11
- }