@singularsystems/neo-core 1.2.0 → 1.2.1
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.
|
@@ -13,7 +13,7 @@ export interface IButtonOptions {
|
|
|
13
13
|
/** Bootstrap outline */
|
|
14
14
|
isOutline?: boolean;
|
|
15
15
|
/** Causes the button to be rendered without a background or border. The variant will instead affect text color. */
|
|
16
|
-
|
|
16
|
+
inline?: boolean;
|
|
17
17
|
onClick?: (event: any, data?: any) => void;
|
|
18
18
|
/** Specify a string name if using font-awesome. No need to specify fa- */
|
|
19
19
|
icon?: any;
|
|
@@ -64,6 +64,7 @@ var Deserialiser = /** @class */ (function () {
|
|
|
64
64
|
});
|
|
65
65
|
};
|
|
66
66
|
Deserialiser.prototype.deserialiseArray = function (from, to, type, itemFactory) {
|
|
67
|
+
var _a;
|
|
67
68
|
if (!to) {
|
|
68
69
|
throw "Cannot deserialise array into a non initialised property.";
|
|
69
70
|
}
|
|
@@ -72,6 +73,7 @@ var Deserialiser = /** @class */ (function () {
|
|
|
72
73
|
}
|
|
73
74
|
//create an index of the to objects
|
|
74
75
|
var toIndex = {};
|
|
76
|
+
var deletedItems = [];
|
|
75
77
|
for (var i = 0; i < to.length; i++) {
|
|
76
78
|
toIndex[to[i].entityIdentifier] = to[i];
|
|
77
79
|
}
|
|
@@ -113,7 +115,12 @@ var Deserialiser = /** @class */ (function () {
|
|
|
113
115
|
if (deserialise)
|
|
114
116
|
this.deserialiseObject(fromItem, toItem, addToList);
|
|
115
117
|
if (addToList || this.options.removeOldItems) {
|
|
116
|
-
|
|
118
|
+
if (fromItem.trackingState === TrackingState.Deleted) {
|
|
119
|
+
deletedItems.push(toItem);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
to.push(toItem);
|
|
123
|
+
}
|
|
117
124
|
if (hasIdentifier) {
|
|
118
125
|
toIndex[fromItem.entityIdentifier] = toItem;
|
|
119
126
|
}
|
|
@@ -123,6 +130,9 @@ var Deserialiser = /** @class */ (function () {
|
|
|
123
130
|
if (list.deletedList) {
|
|
124
131
|
list.clearDeletedList();
|
|
125
132
|
}
|
|
133
|
+
if (deletedItems) {
|
|
134
|
+
(_a = list.deletedList).push.apply(_a, deletedItems);
|
|
135
|
+
}
|
|
126
136
|
};
|
|
127
137
|
Deserialiser.prototype.deserialiseDictionary = function (from, to, parentProperty) {
|
|
128
138
|
for (var key in from) {
|
|
@@ -237,7 +247,7 @@ var Deserialiser = /** @class */ (function () {
|
|
|
237
247
|
toModel.isNew = false;
|
|
238
248
|
}
|
|
239
249
|
else if (from.trackingState === TrackingState.Deleted) {
|
|
240
|
-
|
|
250
|
+
toModel.isNew = false;
|
|
241
251
|
}
|
|
242
252
|
else {
|
|
243
253
|
toModel.isSelfDirty = true;
|
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { IViewBase } from '../Views/IViewBase';
|
|
2
|
-
export declare enum NavigateLocation {
|
|
3
|
-
/** Navigating within the app. */
|
|
4
|
-
Internal = 0,
|
|
5
|
-
/** Navigating to another site / closing the browser. */
|
|
6
|
-
External = 1
|
|
7
|
-
}
|
|
8
|
-
export interface IPageLeaveHandler {
|
|
9
|
-
/**
|
|
10
|
-
* Called when the windows beforeunload event fires.
|
|
11
|
-
* @param view The currently active view.
|
|
12
|
-
* @param e beforeunload event.
|
|
13
|
-
*/
|
|
14
|
-
onWindowUnload(view: IViewBase | null, e: BeforeUnloadEvent): void;
|
|
15
|
-
/**
|
|
16
|
-
* Called when the user tries to leave the page, and viewbase has returned a message prompting the user if they want to leave.
|
|
17
|
-
* @param view The currently active view.
|
|
18
|
-
* @param prompt The prompt to display to the user.
|
|
19
|
-
* @param location If the user is nagivating within the app, or externally.
|
|
20
|
-
* @returns A boolean promise with a value indicating whether the user wants to leave the page.
|
|
21
|
-
*/
|
|
22
|
-
onLeavePage(view: IViewBase | null, prompt: string, location: NavigateLocation): Promise<boolean>;
|
|
23
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export var NavigateLocation;
|
|
2
|
-
(function (NavigateLocation) {
|
|
3
|
-
/** Navigating within the app. */
|
|
4
|
-
NavigateLocation[NavigateLocation["Internal"] = 0] = "Internal";
|
|
5
|
-
/** Navigating to another site / closing the browser. */
|
|
6
|
-
NavigateLocation[NavigateLocation["External"] = 1] = "External";
|
|
7
|
-
})(NavigateLocation || (NavigateLocation = {}));
|