@acrodata/gui 0.2.5 → 0.3.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.
- package/esm2022/gui-form.mjs +37 -4
- package/esm2022/gui-utils.mjs +28 -1
- package/esm2022/interface.mjs +1 -1
- package/fesm2022/acrodata-gui.mjs +63 -4
- package/fesm2022/acrodata-gui.mjs.map +1 -1
- package/gui-form.d.ts +1 -0
- package/gui-utils.d.ts +3 -0
- package/interface.d.ts +10 -2
- package/package.json +1 -1
package/gui-form.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare class GuiForm implements OnChanges, OnInit, OnDestroy {
|
|
|
23
23
|
modelChange: EventEmitter<any>;
|
|
24
24
|
formFields: GuiControl[];
|
|
25
25
|
formSubscription: Subscription;
|
|
26
|
+
controlSubscriptions: Subscription[];
|
|
26
27
|
constructor(cdr: ChangeDetectorRef);
|
|
27
28
|
ngOnChanges(changes: SimpleChanges): void;
|
|
28
29
|
ngOnInit(): void;
|
package/gui-utils.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ElementRef, OnInit, PipeTransform } from '@angular/core';
|
|
2
|
+
import { GuiDefaultValue, GuiOperator } from './interface';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
4
5
|
* Lightweight EJS template engine
|
|
@@ -31,3 +32,5 @@ export declare class GuiFlexDirective implements OnInit {
|
|
|
31
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<GuiFlexDirective, never>;
|
|
32
33
|
static ɵdir: i0.ɵɵDirectiveDeclaration<GuiFlexDirective, "[flex]", never, { "flex": { "alias": "flex"; "required": false; }; }, {}, never, never, false, never>;
|
|
33
34
|
}
|
|
35
|
+
export declare function compareValues(a: GuiDefaultValue, b: GuiDefaultValue, operator: GuiOperator): boolean;
|
|
36
|
+
export declare function getValueByPath(obj: Record<string, any>, path: string): Record<string, any> | undefined;
|
package/interface.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
export type GuiFieldType = 'group' | 'inline' | 'tabs' | 'tab' | 'menu' | 'menuItem' | 'text' | 'number' | 'switch' | 'slider' | 'fill' | 'select' | 'buttonToggle' | 'imageSelect' | 'textarea' | 'hidden' | 'image' | 'video' | 'audio' | 'file';
|
|
2
2
|
export type GuiFillMode = 'flat' | 'gradient' | 'image';
|
|
3
3
|
export type GuiSliderMode = 'normal' | 'range';
|
|
4
|
-
export type GuiTabsMode = '
|
|
4
|
+
export type GuiTabsMode = 'normal' | 'list';
|
|
5
5
|
export type GuiBasicValue = boolean | number | string;
|
|
6
|
-
export type GuiDefaultValue = boolean | number | string | any[] | Record<string, any
|
|
6
|
+
export type GuiDefaultValue = boolean | number | string | any[] | Record<string, any> | null;
|
|
7
|
+
export type GuiOperator = '$eq' | '$ne' | '$gt' | '$lt' | '$gte' | '$lte' | '$in' | '$nin';
|
|
8
|
+
export type GuiCondition = [string, GuiOperator, GuiDefaultValue];
|
|
9
|
+
export interface GuiFieldShowIf {
|
|
10
|
+
conditions: GuiCondition[];
|
|
11
|
+
logicalType?: '$and' | '$or';
|
|
12
|
+
}
|
|
7
13
|
export interface GuiField {
|
|
8
14
|
type: GuiFieldType;
|
|
9
15
|
name: string;
|
|
@@ -12,6 +18,8 @@ export interface GuiField {
|
|
|
12
18
|
placeholder?: string;
|
|
13
19
|
disabled?: boolean;
|
|
14
20
|
col?: number;
|
|
21
|
+
showIf?: GuiFieldShowIf;
|
|
22
|
+
show?: boolean;
|
|
15
23
|
children?: GuiFields | GuiField[];
|
|
16
24
|
expanded?: boolean;
|
|
17
25
|
min?: number;
|