uicore-ts 1.0.538 → 1.0.551
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.
|
@@ -151,9 +151,9 @@ class UIViewController extends import_UIObject.UIObject {
|
|
|
151
151
|
controller.viewWillAppear();
|
|
152
152
|
this.addChildViewController(controller);
|
|
153
153
|
containerView.addSubview(controller.view);
|
|
154
|
+
controller.handleRouteRecursively(import_UIRoute.UIRoute.currentRoute);
|
|
154
155
|
controller.didMoveToParentViewController(this);
|
|
155
156
|
controller.viewDidAppear();
|
|
156
|
-
controller.handleRouteRecursively(import_UIRoute.UIRoute.currentRoute);
|
|
157
157
|
}
|
|
158
158
|
addChildViewControllerInDialogView(controller, dialogView) {
|
|
159
159
|
controller = (0, import_UIObject.FIRST_OR_NIL)(controller);
|
|
@@ -166,9 +166,9 @@ class UIViewController extends import_UIObject.UIObject {
|
|
|
166
166
|
originalDismissFunction(animated);
|
|
167
167
|
this.removeChildViewController(controller);
|
|
168
168
|
};
|
|
169
|
+
controller.handleRouteRecursively(import_UIRoute.UIRoute.currentRoute);
|
|
169
170
|
controller.didMoveToParentViewController(this);
|
|
170
171
|
controller.viewDidAppear();
|
|
171
|
-
controller.handleRouteRecursively(import_UIRoute.UIRoute.currentRoute);
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../scripts/UIViewController.ts"],
|
|
4
|
-
"sourcesContent": ["import { UIDialogView } from \"./UIDialogView\"\nimport { FIRST_OR_NIL, IS, nil, NO, UIObject, YES } from \"./UIObject\"\nimport { UIRoute } from \"./UIRoute\"\nimport { UIView, UIViewBroadcastEvent } from \"./UIView\"\n\n\nexport class UIViewController extends UIObject {\n \n \n parentViewController?: UIViewController\n childViewControllers: UIViewController[] = []\n static readonly routeComponentName: string\n static readonly ParameterIdentifierName: any\n \n constructor(public view: UIView) {\n \n super()\n \n this.view.viewController = this\n \n }\n \n \n handleRouteRecursively(route: UIRoute) {\n \n this.handleRoute(route)\n \n this.childViewControllers.forEach(controller => {\n \n controller.handleRouteRecursively(route)\n \n })\n \n }\n \n async handleRoute(route: UIRoute) {\n \n \n }\n \n \n async viewWillAppear() {\n \n \n }\n \n \n async viewDidAppear() {\n \n \n }\n \n \n async viewWillDisappear() {\n \n \n }\n \n async viewDidDisappear() {\n \n \n }\n \n \n updateViewConstraints() {\n \n \n }\n \n updateViewStyles() {\n \n \n }\n \n layoutViewSubviews() {\n \n \n }\n \n _triggerLayoutViewSubviews() {\n \n if (this.view.needsLayout) {\n \n this.view.layoutSubviews()\n \n this.viewDidLayoutSubviews()\n \n }\n \n }\n \n viewWillLayoutSubviews() {\n \n this.updateViewConstraints()\n this.updateViewStyles()\n \n }\n \n viewDidLayoutSubviews() {\n \n // this.childViewControllers.forEach(function (controller, index, controllers) {\n \n // controller._layoutViewSubviews();\n \n // })\n \n \n }\n \n \n viewDidReceiveBroadcastEvent(event: UIViewBroadcastEvent) {\n \n \n }\n \n \n get core() {\n return this.view.core\n }\n \n hasChildViewController(viewController: UIViewController) {\n \n // This is for performance reasons\n if (!IS(viewController)) {\n return NO\n }\n \n for (let i = 0; i < this.childViewControllers.length; i++) {\n \n const childViewController = this.childViewControllers[i]\n \n if (childViewController == viewController) {\n return YES\n }\n \n }\n \n return NO\n \n }\n \n addChildViewController(viewController: UIViewController) {\n if (!this.hasChildViewController(viewController)) {\n viewController.willMoveToParentViewController(this)\n this.childViewControllers.push(viewController)\n this.view.addSubview(viewController.view)\n viewController.didMoveToParentViewController(this)\n }\n }\n \n \n removeFromParentViewController() {\n \n this.parentViewController?.removeChildViewController(this)\n \n }\n \n willMoveToParentViewController(parentViewController: UIViewController) {\n \n }\n \n \n didMoveToParentViewController(parentViewController: UIViewController) {\n \n this.parentViewController = parentViewController\n \n }\n \n removeChildViewController(controller: UIViewController) {\n \n controller = FIRST_OR_NIL(controller)\n controller.viewWillDisappear()\n if (IS(controller.parentViewController)) {\n \n const index = this.parentViewController?.childViewControllers.indexOf(this) ?? -1\n if (index > -1) {\n this.parentViewController?.childViewControllers.splice(index, 1)\n this.view.removeFromSuperview()\n this.parentViewController = undefined\n }\n \n }\n if (IS(controller.view)) {\n controller.view.removeFromSuperview()\n }\n controller.viewDidDisappear()\n \n }\n \n \n addChildViewControllerInContainer(controller: UIViewController, containerView: UIView) {\n \n controller = FIRST_OR_NIL(controller)\n containerView = FIRST_OR_NIL(containerView)\n controller.viewWillAppear()\n this.addChildViewController(controller)\n containerView.addSubview(controller.view)\n controller.
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAAyD;AACzD,qBAAwB;AAIjB,MAAM,yBAAyB,yBAAS;AAAA,EAQ3C,YAAmB,MAAc;AAE7B,UAAM;AAFS;AAJnB,gCAA2C,CAAC;AAQxC,SAAK,KAAK,iBAAiB;AAAA,EAE/B;AAAA,EAGA,uBAAuB,OAAgB;AAEnC,SAAK,YAAY,KAAK;AAEtB,SAAK,qBAAqB,QAAQ,gBAAc;AAE5C,iBAAW,uBAAuB,KAAK;AAAA,IAE3C,CAAC;AAAA,EAEL;AAAA,EAEM,YAAY,OAAgB;AAAA;AAAA,IAGlC;AAAA;AAAA,EAGM,iBAAiB;AAAA;AAAA,IAGvB;AAAA;AAAA,EAGM,gBAAgB;AAAA;AAAA,IAGtB;AAAA;AAAA,EAGM,oBAAoB;AAAA;AAAA,IAG1B;AAAA;AAAA,EAEM,mBAAmB;AAAA;AAAA,IAGzB;AAAA;AAAA,EAGA,wBAAwB;AAAA,EAGxB;AAAA,EAEA,mBAAmB;AAAA,EAGnB;AAAA,EAEA,qBAAqB;AAAA,EAGrB;AAAA,EAEA,6BAA6B;AAEzB,QAAI,KAAK,KAAK,aAAa;AAEvB,WAAK,KAAK,eAAe;AAEz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AoB;AAC9B,aAAK,uBAAuB;AAAA,MAChC;AAAA,IAEJ;AACA,YAAI,oBAAG,WAAW,IAAI,GAAG;AACrB,iBAAW,KAAK,oBAAoB;AAAA,IACxC;AACA,eAAW,iBAAiB;AAAA,EAEhC;AAAA,EAGA,kCAAkC,YAA8B,eAAuB;AAEnF,qBAAa,8BAAa,UAAU;AACpC,wBAAgB,8BAAa,aAAa;AAC1C,eAAW,eAAe;AAC1B,SAAK,uBAAuB,UAAU;AACtC,kBAAc,WAAW,WAAW,IAAI;
|
|
4
|
+
"sourcesContent": ["import { UIDialogView } from \"./UIDialogView\"\nimport { FIRST_OR_NIL, IS, nil, NO, UIObject, YES } from \"./UIObject\"\nimport { UIRoute } from \"./UIRoute\"\nimport { UIView, UIViewBroadcastEvent } from \"./UIView\"\n\n\nexport class UIViewController extends UIObject {\n \n \n parentViewController?: UIViewController\n childViewControllers: UIViewController[] = []\n static readonly routeComponentName: string\n static readonly ParameterIdentifierName: any\n \n constructor(public view: UIView) {\n \n super()\n \n this.view.viewController = this\n \n }\n \n \n handleRouteRecursively(route: UIRoute) {\n \n this.handleRoute(route)\n \n this.childViewControllers.forEach(controller => {\n \n controller.handleRouteRecursively(route)\n \n })\n \n }\n \n async handleRoute(route: UIRoute) {\n \n \n }\n \n \n async viewWillAppear() {\n \n \n }\n \n \n async viewDidAppear() {\n \n \n }\n \n \n async viewWillDisappear() {\n \n \n }\n \n async viewDidDisappear() {\n \n \n }\n \n \n updateViewConstraints() {\n \n \n }\n \n updateViewStyles() {\n \n \n }\n \n layoutViewSubviews() {\n \n \n }\n \n _triggerLayoutViewSubviews() {\n \n if (this.view.needsLayout) {\n \n this.view.layoutSubviews()\n \n this.viewDidLayoutSubviews()\n \n }\n \n }\n \n viewWillLayoutSubviews() {\n \n this.updateViewConstraints()\n this.updateViewStyles()\n \n }\n \n viewDidLayoutSubviews() {\n \n // this.childViewControllers.forEach(function (controller, index, controllers) {\n \n // controller._layoutViewSubviews();\n \n // })\n \n \n }\n \n \n viewDidReceiveBroadcastEvent(event: UIViewBroadcastEvent) {\n \n \n }\n \n \n get core() {\n return this.view.core\n }\n \n hasChildViewController(viewController: UIViewController) {\n \n // This is for performance reasons\n if (!IS(viewController)) {\n return NO\n }\n \n for (let i = 0; i < this.childViewControllers.length; i++) {\n \n const childViewController = this.childViewControllers[i]\n \n if (childViewController == viewController) {\n return YES\n }\n \n }\n \n return NO\n \n }\n \n addChildViewController(viewController: UIViewController) {\n if (!this.hasChildViewController(viewController)) {\n viewController.willMoveToParentViewController(this)\n this.childViewControllers.push(viewController)\n this.view.addSubview(viewController.view)\n viewController.didMoveToParentViewController(this)\n }\n }\n \n \n removeFromParentViewController() {\n \n this.parentViewController?.removeChildViewController(this)\n \n }\n \n willMoveToParentViewController(parentViewController: UIViewController) {\n \n }\n \n \n didMoveToParentViewController(parentViewController: UIViewController) {\n \n this.parentViewController = parentViewController\n \n }\n \n removeChildViewController(controller: UIViewController) {\n \n controller = FIRST_OR_NIL(controller)\n controller.viewWillDisappear()\n if (IS(controller.parentViewController)) {\n \n const index = this.parentViewController?.childViewControllers.indexOf(this) ?? -1\n if (index > -1) {\n this.parentViewController?.childViewControllers.splice(index, 1)\n this.view.removeFromSuperview()\n this.parentViewController = undefined\n }\n \n }\n if (IS(controller.view)) {\n controller.view.removeFromSuperview()\n }\n controller.viewDidDisappear()\n \n }\n \n \n addChildViewControllerInContainer(controller: UIViewController, containerView: UIView) {\n \n controller = FIRST_OR_NIL(controller)\n containerView = FIRST_OR_NIL(containerView)\n controller.viewWillAppear()\n this.addChildViewController(controller)\n containerView.addSubview(controller.view)\n \n controller.handleRouteRecursively(UIRoute.currentRoute)\n \n controller.didMoveToParentViewController(this)\n controller.viewDidAppear()\n \n \n }\n \n addChildViewControllerInDialogView(controller: UIViewController, dialogView: UIDialogView) {\n \n controller = FIRST_OR_NIL(controller)\n dialogView = FIRST_OR_NIL(dialogView)\n controller.viewWillAppear()\n this.addChildViewController(controller)\n dialogView.view = controller.view\n \n const originalDismissFunction = dialogView.dismiss.bind(dialogView)\n \n dialogView.dismiss = animated => {\n \n originalDismissFunction(animated)\n \n this.removeChildViewController(controller)\n \n }\n \n controller.handleRouteRecursively(UIRoute.currentRoute)\n \n controller.didMoveToParentViewController(this)\n controller.viewDidAppear()\n \n }\n \n \n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAAyD;AACzD,qBAAwB;AAIjB,MAAM,yBAAyB,yBAAS;AAAA,EAQ3C,YAAmB,MAAc;AAE7B,UAAM;AAFS;AAJnB,gCAA2C,CAAC;AAQxC,SAAK,KAAK,iBAAiB;AAAA,EAE/B;AAAA,EAGA,uBAAuB,OAAgB;AAEnC,SAAK,YAAY,KAAK;AAEtB,SAAK,qBAAqB,QAAQ,gBAAc;AAE5C,iBAAW,uBAAuB,KAAK;AAAA,IAE3C,CAAC;AAAA,EAEL;AAAA,EAEM,YAAY,OAAgB;AAAA;AAAA,IAGlC;AAAA;AAAA,EAGM,iBAAiB;AAAA;AAAA,IAGvB;AAAA;AAAA,EAGM,gBAAgB;AAAA;AAAA,IAGtB;AAAA;AAAA,EAGM,oBAAoB;AAAA;AAAA,IAG1B;AAAA;AAAA,EAEM,mBAAmB;AAAA;AAAA,IAGzB;AAAA;AAAA,EAGA,wBAAwB;AAAA,EAGxB;AAAA,EAEA,mBAAmB;AAAA,EAGnB;AAAA,EAEA,qBAAqB;AAAA,EAGrB;AAAA,EAEA,6BAA6B;AAEzB,QAAI,KAAK,KAAK,aAAa;AAEvB,WAAK,KAAK,eAAe;AAEzB,WAAK,sBAAsB;AAAA,IAE/B;AAAA,EAEJ;AAAA,EAEA,yBAAyB;AAErB,SAAK,sBAAsB;AAC3B,SAAK,iBAAiB;AAAA,EAE1B;AAAA,EAEA,wBAAwB;AAAA,EASxB;AAAA,EAGA,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A,EAGA,kCAAkC,YAA8B,eAAuB;AAEnF,qBAAa,8BAAa,UAAU;AACpC,wBAAgB,8BAAa,aAAa;AAC1C,eAAW,eAAe;AAC1B,SAAK,uBAAuB,UAAU;AACtC,kBAAc,WAAW,WAAW,IAAI;AAExC,eAAW,uBAAuB,uBAAQ,YAAY;AAEtD,eAAW,8BAA8B,IAAI;AAC7C,eAAW,cAAc;AAAA,EAG7B;AAAA,EAEA,mCAAmC,YAA8B,YAA0B;AAEvF,qBAAa,8BAAa,UAAU;AACpC,qBAAa,8BAAa,UAAU;AACpC,eAAW,eAAe;AAC1B,SAAK,uBAAuB,UAAU;AACtC,eAAW,OAAO,WAAW;AAE7B,UAAM,0BAA0B,WAAW,QAAQ,KAAK,UAAU;AAElE,eAAW,UAAU,cAAY;AAE7B,8BAAwB,QAAQ;AAEhC,WAAK,0BAA0B,UAAU;AAAA,IAE7C;AAEA,eAAW,uBAAuB,uBAAQ,YAAY;AAEtD,eAAW,8BAA8B,IAAI;AAC7C,eAAW,cAAc;AAAA,EAE7B;AAGJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uicore-ts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.551",
|
|
4
4
|
"description": "UICore is a library to build native-like user interfaces using pure Typescript. No HTML is needed at all. Components are described as TS classes and all user interactions are handled explicitly. This library is strongly inspired by the UIKit framework that is used in IOS. In addition, UICore has tools to handle URL based routing, array sorting and filtering and adds a number of other utilities for convenience.",
|
|
5
5
|
"main": "compiledScripts/index.js",
|
|
6
6
|
"types": "compiledScripts/index.d.ts",
|
|
@@ -195,10 +195,12 @@ export class UIViewController extends UIObject {
|
|
|
195
195
|
controller.viewWillAppear()
|
|
196
196
|
this.addChildViewController(controller)
|
|
197
197
|
containerView.addSubview(controller.view)
|
|
198
|
+
|
|
199
|
+
controller.handleRouteRecursively(UIRoute.currentRoute)
|
|
200
|
+
|
|
198
201
|
controller.didMoveToParentViewController(this)
|
|
199
202
|
controller.viewDidAppear()
|
|
200
203
|
|
|
201
|
-
controller.handleRouteRecursively(UIRoute.currentRoute)
|
|
202
204
|
|
|
203
205
|
}
|
|
204
206
|
|
|
@@ -220,10 +222,10 @@ export class UIViewController extends UIObject {
|
|
|
220
222
|
|
|
221
223
|
}
|
|
222
224
|
|
|
225
|
+
controller.handleRouteRecursively(UIRoute.currentRoute)
|
|
226
|
+
|
|
223
227
|
controller.didMoveToParentViewController(this)
|
|
224
228
|
controller.viewDidAppear()
|
|
225
|
-
|
|
226
|
-
controller.handleRouteRecursively(UIRoute.currentRoute)
|
|
227
229
|
|
|
228
230
|
}
|
|
229
231
|
|