@nascentdigital/funnel-core 7.0.1 → 7.0.2
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.
|
@@ -9,7 +9,6 @@ export declare class Field<TSchema extends Schema.Field.Type = Schema.Field.Type
|
|
|
9
9
|
readonly id: string;
|
|
10
10
|
readonly name: string;
|
|
11
11
|
readonly required: boolean;
|
|
12
|
-
readonly tags: ReadonlySet<string>;
|
|
13
12
|
private readonly publishedValue;
|
|
14
13
|
private _initialValue;
|
|
15
14
|
private _value;
|
|
@@ -30,6 +29,7 @@ export declare class Field<TSchema extends Schema.Field.Type = Schema.Field.Type
|
|
|
30
29
|
get schemaOverride(): TSchema | undefined;
|
|
31
30
|
overrideSchema(schema: TSchema | undefined, coerce?: boolean): void;
|
|
32
31
|
get isComposite(): boolean;
|
|
32
|
+
get isConfig(): boolean;
|
|
33
33
|
get exists(): boolean;
|
|
34
34
|
get valid(): boolean;
|
|
35
35
|
get error(): FieldValidator.Error | undefined;
|
|
@@ -80,7 +80,6 @@ export declare namespace Field {
|
|
|
80
80
|
initialValue?: Value<TSchema>;
|
|
81
81
|
required: boolean;
|
|
82
82
|
customValidator?: FieldValidator;
|
|
83
|
-
tags?: string[] | string;
|
|
84
83
|
};
|
|
85
84
|
type Value<TSchema extends Schema.Field.Type = Schema.Field.Type> = Schema.Field.Data<TSchema>;
|
|
86
85
|
interface Event extends EventBus.Event<'Field', Event.Type> {
|
|
@@ -91,7 +90,4 @@ export declare namespace Field {
|
|
|
91
90
|
function filter(event: EventBus.Event): event is Event;
|
|
92
91
|
function create(event: EventBus.Args<Event>): Event;
|
|
93
92
|
}
|
|
94
|
-
const Tag: {
|
|
95
|
-
readonly config: "config";
|
|
96
|
-
};
|
|
97
93
|
}
|
package/dist/ui/fields/Field.js
CHANGED
|
@@ -51,7 +51,6 @@ class Field {
|
|
|
51
51
|
this.name = args.name;
|
|
52
52
|
this.required = args.required;
|
|
53
53
|
this.publishedValue = args.publishedValue;
|
|
54
|
-
this.tags = new Set(utils_1.ArrayUtils.coerce(args.tags));
|
|
55
54
|
this._initialValue = (_a = args.initialValue) !== null && _a !== void 0 ? _a : this.defaultValue;
|
|
56
55
|
this._value = this._initialValue;
|
|
57
56
|
this._editing = false;
|
|
@@ -93,6 +92,9 @@ class Field {
|
|
|
93
92
|
return false;
|
|
94
93
|
}
|
|
95
94
|
}
|
|
95
|
+
get isConfig() {
|
|
96
|
+
return Schema.Config.isConfig(this.schema);
|
|
97
|
+
}
|
|
96
98
|
get exists() {
|
|
97
99
|
const { initialValue, _optIn = false, _optOut = false, schema: { required } } = this;
|
|
98
100
|
return (initialValue !== undefined && !_optOut) || required || _optIn;
|
|
@@ -346,8 +348,7 @@ class Field {
|
|
|
346
348
|
publishedValue: this.publishedValue,
|
|
347
349
|
initialValue: this.initialValue,
|
|
348
350
|
required: required !== null && required !== void 0 ? required : this.required,
|
|
349
|
-
customValidator: this._customValidator
|
|
350
|
-
tags: this.tags.values().toArray()
|
|
351
|
+
customValidator: this._customValidator
|
|
351
352
|
});
|
|
352
353
|
}
|
|
353
354
|
raiseEvent(type) {
|
|
@@ -369,8 +370,4 @@ exports.Field = Field;
|
|
|
369
370
|
}
|
|
370
371
|
Event.create = create;
|
|
371
372
|
})(Event = Field.Event || (Field.Event = {}));
|
|
372
|
-
// tags
|
|
373
|
-
Field.Tag = {
|
|
374
|
-
config: 'config'
|
|
375
|
-
};
|
|
376
373
|
})(Field || (exports.Field = Field = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nascentdigital/funnel-core",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "git+https://github.com/nascentdigital/funnel.git",
|
|
6
6
|
"directory": "libs/core"
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"jest-tsd": "^0.2.2",
|
|
66
66
|
"ts-jest": "^29.3.2"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "015e14c2eb8b29467360f09aaafb5c87ffbacb07"
|
|
69
69
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|