@acrodata/gui 1.0.0 → 1.1.0

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,7 +1,6 @@
1
1
  import { ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
- import { MatIconRegistry } from '@angular/material/icon';
4
- import { DomSanitizer } from '@angular/platform-browser';
3
+ import { GuiIconsRegistry } from '../gui-icons';
5
4
  import { GuiControl } from '../interface';
6
5
  import { GuiFileUploaderConfig } from './file-uploader-config';
7
6
  import * as i0 from "@angular/core";
@@ -25,7 +24,7 @@ export declare class GuiFileUploader implements ControlValueAccessor, OnChanges
25
24
  file: FileUploadContent;
26
25
  private onChange;
27
26
  private onTouched;
28
- constructor(fileUploaderCfg: GuiFileUploaderConfig, cdr: ChangeDetectorRef, iconRegistry: MatIconRegistry, sanitizer: DomSanitizer);
27
+ constructor(fileUploaderCfg: GuiFileUploaderConfig, cdr: ChangeDetectorRef, iconsRegistry: GuiIconsRegistry);
29
28
  ngOnChanges(changes: SimpleChanges): void;
30
29
  writeValue(value: string): void;
31
30
  registerOnChange(fn: (value: string) => void): void;
package/gui-form.d.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { FormArray, FormGroup } from '@angular/forms';
3
- import { MatIconRegistry } from '@angular/material/icon';
4
- import { DomSanitizer } from '@angular/platform-browser';
5
3
  import { Subscription } from 'rxjs';
6
4
  import { GuiControl, GuiFieldType, GuiFields, GuiTabsMode } from './interface';
5
+ import { GuiIconsRegistry } from './gui-icons';
7
6
  import * as i0 from "@angular/core";
8
7
  export declare class GuiForm implements OnChanges, OnInit, OnDestroy {
9
8
  /**
@@ -26,7 +25,7 @@ export declare class GuiForm implements OnChanges, OnInit, OnDestroy {
26
25
  formSubscription: Subscription;
27
26
  controlSubscriptions: Subscription[];
28
27
  uid: string;
29
- constructor(iconRegistry: MatIconRegistry, sanitizer: DomSanitizer);
28
+ constructor(iconsRegistry: GuiIconsRegistry);
30
29
  ngOnChanges(changes: SimpleChanges): void;
31
30
  ngOnInit(): void;
32
31
  ngOnDestroy(): void;
package/gui-icons.d.ts CHANGED
@@ -1,3 +1,30 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { MatIconRegistry } from '@angular/material/icon';
3
+ import { DomSanitizer } from '@angular/platform-browser';
4
+ import * as i0 from "@angular/core";
1
5
  export declare const svgIcons: {
2
- [key: string]: string;
6
+ horizontal: string;
7
+ vertical: string;
8
+ add: string;
9
+ delete: string;
10
+ copy: string;
11
+ link: string;
12
+ clear: string;
13
+ file: string;
14
+ upload: string;
3
15
  };
16
+ export type GuiIconType = keyof typeof svgIcons;
17
+ export type GuiIconsConfig = {
18
+ [k in GuiIconType]: string;
19
+ };
20
+ /** Injection token that can be used to provide the default icons. */
21
+ export declare const GUI_ICONS_CONFIG: InjectionToken<GuiIconsConfig>;
22
+ export declare class GuiIconsRegistry {
23
+ private _iconRegistry;
24
+ private _sanitizer;
25
+ private _defaultIcons?;
26
+ constructor(_iconRegistry: MatIconRegistry, _sanitizer: DomSanitizer, _defaultIcons?: GuiIconsConfig | undefined);
27
+ add(...iconNames: GuiIconType[]): void;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<GuiIconsRegistry, [null, null, { optional: true; }]>;
29
+ static ɵprov: i0.ɵɵInjectableDeclaration<GuiIconsRegistry>;
30
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@acrodata/gui",
3
- "version": "1.0.0",
4
- "description": "A lightweight GUI library for Angular",
3
+ "version": "1.1.0",
4
+ "description": "JSON powered GUI for configurable panels.",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
package/public-api.d.ts CHANGED
@@ -16,4 +16,5 @@ export * from './slider/slider';
16
16
  export * from './switch/switch';
17
17
  export * from './textarea/textarea';
18
18
  export * from './gui-utils';
19
+ export * from './gui-icons';
19
20
  export * from './interface';