@singularsystems/neo-core 0.10.74 → 0.10.76
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/dist/Components/ButtonOptions.d.ts +4 -0
- package/dist/Data/Paging/PageManager.d.ts +2 -2
- package/dist/Data/Paging/PageManager.js +1 -1
- package/dist/JsonSchema/ClassMetadata.d.ts +2 -1
- package/dist/JsonSchema/ClassMetadata.js +14 -9
- package/dist/JsonSchema/MetadataBase.d.ts +8 -0
- package/dist/JsonSchema/MetadataBase.js +12 -0
- package/dist/JsonSchema/PropertyMetadata.d.ts +7 -3
- package/dist/JsonSchema/PropertyMetadata.js +15 -4
- package/dist/JsonSchema/TypeCache.js +1 -0
- package/package.json +1 -1
|
@@ -46,6 +46,10 @@ export interface IButtonOptions {
|
|
|
46
46
|
* Adds a pulse animation to the button.
|
|
47
47
|
*/
|
|
48
48
|
pulse?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Set a custom variant for when a standard variant is not provided.
|
|
51
|
+
*/
|
|
52
|
+
customVariant?: string;
|
|
49
53
|
}
|
|
50
54
|
export interface IButtonDropDownItem {
|
|
51
55
|
/** Menu item text or component */
|
|
@@ -82,7 +82,7 @@ export interface IPageManager {
|
|
|
82
82
|
/**
|
|
83
83
|
* Refresh the data only if the page manager has initialised.
|
|
84
84
|
*/
|
|
85
|
-
|
|
85
|
+
invalidateData(taskRunner?: ITaskRunner): Promise<void>;
|
|
86
86
|
/**
|
|
87
87
|
* Refresh the data by calling the api endpoint with the current criteria.
|
|
88
88
|
* This will not reset the page index, and will not update the total record count, therefore should only be called if your criteria has not changed since the last full fetch using refreshData().
|
|
@@ -135,7 +135,7 @@ export declare class PageManager<TCriteria extends ValueObject, TModel extends I
|
|
|
135
135
|
/**
|
|
136
136
|
* Refresh the data only if the page manager has initialised.
|
|
137
137
|
*/
|
|
138
|
-
|
|
138
|
+
invalidateData(taskRunner?: ITaskRunner): Promise<void>;
|
|
139
139
|
/**
|
|
140
140
|
* Refresh the data by calling the api endpoint with the current criteria.
|
|
141
141
|
* This will not reset the page index, and will not update the total record count, therefore should only be called if your criteria has not changed since the last full fetch using refreshData().
|
|
@@ -169,7 +169,7 @@ var PageManager = /** @class */ (function (_super) {
|
|
|
169
169
|
/**
|
|
170
170
|
* Refresh the data only if the page manager has initialised.
|
|
171
171
|
*/
|
|
172
|
-
PageManager.prototype.
|
|
172
|
+
PageManager.prototype.invalidateData = function (taskRunner) {
|
|
173
173
|
return __awaiter(this, void 0, void 0, function () {
|
|
174
174
|
return __generator(this, function (_a) {
|
|
175
175
|
switch (_a.label) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PropertyMetadata } from './PropertyMetadata';
|
|
2
2
|
import { IJsonObjectType } from './JsonSchemaTypes';
|
|
3
3
|
import { ITypeCacheInternal } from './TypeCache';
|
|
4
|
-
|
|
4
|
+
import { MetadataBase } from './MetadataBase';
|
|
5
|
+
export declare class ClassMetadata extends MetadataBase {
|
|
5
6
|
name: string;
|
|
6
7
|
constructor(name: string);
|
|
7
8
|
/**
|
|
@@ -1,31 +1,36 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
1
2
|
import { TypeMetadata } from './TypeMetadata';
|
|
2
3
|
import { PropertyMetadata } from './PropertyMetadata';
|
|
3
|
-
|
|
4
|
+
import { MetadataBase } from './MetadataBase';
|
|
5
|
+
var ClassMetadata = /** @class */ (function (_super) {
|
|
6
|
+
__extends(ClassMetadata, _super);
|
|
4
7
|
function ClassMetadata(name) {
|
|
5
|
-
|
|
8
|
+
var _this = _super.call(this) || this;
|
|
9
|
+
_this.name = name;
|
|
6
10
|
/**
|
|
7
11
|
* All properties.
|
|
8
12
|
*/
|
|
9
|
-
|
|
13
|
+
_this.properties = [];
|
|
10
14
|
/**
|
|
11
15
|
* Properties excluding child objects and lists.
|
|
12
16
|
*/
|
|
13
|
-
|
|
17
|
+
_this.simpleProperties = [];
|
|
14
18
|
/**
|
|
15
19
|
* Properties containing child object types.
|
|
16
20
|
*/
|
|
17
|
-
|
|
21
|
+
_this.childObjectProperties = [];
|
|
18
22
|
/**
|
|
19
23
|
* Properties containing child list types.
|
|
20
24
|
*/
|
|
21
|
-
|
|
25
|
+
_this.childListProperties = [];
|
|
26
|
+
return _this;
|
|
22
27
|
}
|
|
23
28
|
ClassMetadata.prototype.loadMetaData = function (schema, cache) {
|
|
29
|
+
_super.prototype.loadFromSchema.call(this, schema);
|
|
24
30
|
for (var propertyKey in schema.properties) {
|
|
25
31
|
var propertySchema = schema.properties[propertyKey];
|
|
26
32
|
var propertyMetaData = new PropertyMetadata(propertyKey, TypeMetadata.create(propertySchema, cache));
|
|
27
|
-
propertyMetaData.
|
|
28
|
-
propertyMetaData.description = propertySchema.description;
|
|
33
|
+
propertyMetaData.loadFromSchema(propertySchema);
|
|
29
34
|
if (propertyMetaData.type.basicType !== "unknown") {
|
|
30
35
|
this.properties.push(propertyMetaData);
|
|
31
36
|
if (propertyMetaData.type.basicType === "array") {
|
|
@@ -49,5 +54,5 @@ var ClassMetadata = /** @class */ (function () {
|
|
|
49
54
|
return clone;
|
|
50
55
|
};
|
|
51
56
|
return ClassMetadata;
|
|
52
|
-
}());
|
|
57
|
+
}(MetadataBase));
|
|
53
58
|
export { ClassMetadata };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var MetadataBase = /** @class */ (function () {
|
|
2
|
+
function MetadataBase() {
|
|
3
|
+
}
|
|
4
|
+
MetadataBase.prototype.loadFromSchema = function (schema) {
|
|
5
|
+
this.title = schema.title;
|
|
6
|
+
this.description = schema.description;
|
|
7
|
+
this.ordinal = schema["x-ordinal"];
|
|
8
|
+
this.hidden = schema["x-hidden"];
|
|
9
|
+
};
|
|
10
|
+
return MetadataBase;
|
|
11
|
+
}());
|
|
12
|
+
export { MetadataBase };
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { IJsonSchemaDescriptorType } from './JsonSchemaTypes';
|
|
2
|
+
import { MetadataBase } from './MetadataBase';
|
|
1
3
|
import { TypeMetadata } from './TypeMetadata';
|
|
2
|
-
export declare class PropertyMetadata {
|
|
4
|
+
export declare class PropertyMetadata extends MetadataBase {
|
|
3
5
|
propertyName: string;
|
|
4
6
|
type: TypeMetadata;
|
|
5
7
|
constructor(propertyName: string, type: TypeMetadata);
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
formatString?: string;
|
|
9
|
+
width?: number;
|
|
10
|
+
hAlign?: "left" | "center" | "right";
|
|
11
|
+
loadFromSchema(schema: IJsonSchemaDescriptorType): void;
|
|
8
12
|
}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { MetadataBase } from './MetadataBase';
|
|
3
|
+
var PropertyMetadata = /** @class */ (function (_super) {
|
|
4
|
+
__extends(PropertyMetadata, _super);
|
|
2
5
|
function PropertyMetadata(propertyName, type) {
|
|
3
|
-
|
|
4
|
-
|
|
6
|
+
var _this = _super.call(this) || this;
|
|
7
|
+
_this.propertyName = propertyName;
|
|
8
|
+
_this.type = type;
|
|
9
|
+
return _this;
|
|
5
10
|
}
|
|
11
|
+
PropertyMetadata.prototype.loadFromSchema = function (schema) {
|
|
12
|
+
_super.prototype.loadFromSchema.call(this, schema);
|
|
13
|
+
this.formatString = schema["x-formatString"];
|
|
14
|
+
this.width = schema["x-width"];
|
|
15
|
+
this.hAlign = schema["x-hAlign"];
|
|
16
|
+
};
|
|
6
17
|
return PropertyMetadata;
|
|
7
|
-
}());
|
|
18
|
+
}(MetadataBase));
|
|
8
19
|
export { PropertyMetadata };
|
|
@@ -20,6 +20,7 @@ var TypeCache = /** @class */ (function () {
|
|
|
20
20
|
enumerable: false,
|
|
21
21
|
configurable: true
|
|
22
22
|
});
|
|
23
|
+
// This is an internal method used by TypeMetadata
|
|
23
24
|
TypeCache.prototype.getOrAddType = function (name) {
|
|
24
25
|
if (name.startsWith("#/definitions/")) {
|
|
25
26
|
name = name.replace("#/definitions/", "");
|