qcobjects-sdk 2.4.57 → 2.4.60

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/VERSION CHANGED
@@ -1 +1 @@
1
- 2.4.57
1
+ 2.4.60
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qcobjects-sdk",
3
- "version": "2.4.57",
3
+ "version": "2.4.60",
4
4
  "description": "QCObjects SDK is a set of Controllers, Views and Components that are elementary and useful to assist developers to build applications under MVC patterns using QCObjects, Cross Browser Javascript Framework for MVC Patterns",
5
5
  "main": "src/index.cjs",
6
6
  "module": "src/index.mjs",
@@ -67,6 +67,8 @@
67
67
  return _ret_;
68
68
  };
69
69
  }
70
+ const __start__ = GlobalSettings.__start__.bind(_top);
71
+
70
72
  var _imports_;
71
73
  if (isBrowser && !isNodeCommonJS) {
72
74
  _imports_ = [
@@ -92,40 +94,36 @@
92
94
  Import("org.qcobjects.cloud.auth.session.usertoken", function () {}, external),
93
95
  Import("org.qcobjects.cloud.auth.session.data", function () {}, external)
94
96
  ];
95
- } else {
97
+ } else if (typeof require !== "undefined") {
96
98
  // non-browsers environment
97
- if (isNodeCommonJS){
98
- CONFIG.set("remoteImportsPath", CONFIG.get("basePath",""));
99
- }
100
-
101
- var _relative_path_ = "qcobjects-sdk/src/js/";
102
99
  _imports_ = [
103
- Import(_relative_path_ +"org.qcobjects.i18n_messages", function () {}, external),
104
- Import(_relative_path_ +"org.qcobjects.models", function () {}, external),
105
- Import(_relative_path_ +"org.qcobjects.components", function () {}, external),
106
- Import(_relative_path_ +"org.qcobjects.components.grid", function () {}, external),
107
- Import(_relative_path_ +"org.qcobjects.components.list", function () {}, external),
108
- Import(_relative_path_ +"org.qcobjects.components.slider", function () {}, external),
109
- Import(_relative_path_ +"org.qcobjects.components.notifications", function () {}, external),
110
- Import(_relative_path_ +"org.qcobjects.components.splashscreen", function () {}, external),
111
- Import(_relative_path_ +"org.qcobjects.controllers", function () {}, external),
112
- Import(_relative_path_ +"org.qcobjects.controllers.grid", function () {}, external),
113
- Import(_relative_path_ +"org.qcobjects.controllers.list", function () {}, external),
114
- Import(_relative_path_ +"org.qcobjects.controllers.slider", function () {}, external),
115
- Import(_relative_path_ +"org.qcobjects.controllers.form", function () {}, external),
116
- Import(_relative_path_ +"org.qcobjects.controllers.swagger", function () {}, external),
117
- Import(_relative_path_ +"org.qcobjects.effects", function () {}, external),
118
- Import(_relative_path_ +"org.qcobjects.modal.controllers", function () {}, external),
119
- Import(_relative_path_ +"org.qcobjects.views", function () {}, external),
120
- Import(_relative_path_ +"org.qcobjects.tools.canvas", function () {}, external),
121
- Import(_relative_path_ +"org.qcobjects.tools.layouts", function () {}, external),
122
- Import(_relative_path_ +"org.qcobjects.cloud.auth.session.usertoken", function () {}, external),
123
- Import(_relative_path_ +"org.qcobjects.cloud.auth.session.data", function () {}, external)
124
- ];
125
-
100
+ new Promise ((resolve, reject)=> {
101
+ require("qcobjects-sdk/js/org.qcobjects.i18n_messages");
102
+ require("qcobjects-sdk/js/org.qcobjects.models");
103
+ require("qcobjects-sdk/js/org.qcobjects.components");
104
+ require("qcobjects-sdk/js/org.qcobjects.components.grid");
105
+ require("qcobjects-sdk/js/org.qcobjects.components.list");
106
+ require("qcobjects-sdk/js/org.qcobjects.components.slider");
107
+ require("qcobjects-sdk/js/org.qcobjects.components.notifications");
108
+ require("qcobjects-sdk/js/org.qcobjects.components.splashscreen");
109
+ require("qcobjects-sdk/js/org.qcobjects.controllers");
110
+ require("qcobjects-sdk/js/org.qcobjects.controllers.grid");
111
+ require("qcobjects-sdk/js/org.qcobjects.controllers.list");
112
+ require("qcobjects-sdk/js/org.qcobjects.controllers.slider");
113
+ require("qcobjects-sdk/js/org.qcobjects.controllers.form");
114
+ require("qcobjects-sdk/js/org.qcobjects.controllers.swagger");
115
+ require("qcobjects-sdk/js/org.qcobjects.effects");
116
+ require("qcobjects-sdk/js/org.qcobjects.modal.controllers");
117
+ require("qcobjects-sdk/js/org.qcobjects.views");
118
+ require("qcobjects-sdk/js/org.qcobjects.tools.canvas");
119
+ require("qcobjects-sdk/js/org.qcobjects.tools.layouts");
120
+ require("qcobjects-sdk/js/org.qcobjects.cloud.auth.session.usertoken");
121
+ require("qcobjects-sdk/js/org.qcobjects.cloud.auth.session.data");
122
+ resolve()
123
+ })
124
+ ]
126
125
 
127
126
  }
128
- const __start__ = GlobalSettings.__start__.bind(_top);
129
127
  _top._sdk_ = Promise.all(_imports_).then(()=>{
130
128
  CONFIG.set("useSDK", true);
131
129
  CONFIG.set("remoteImportsPath", remoteImportsPath);
@@ -22,7 +22,7 @@
22
22
  * Everyone is permitted to copy and distribute verbatim copies of this
23
23
  * license document, but changing it is not allowed.
24
24
  */
25
- (function () {
25
+ (function (global) {
26
26
  "use strict";
27
27
 
28
28
  Package("org.qcobjects.cloud.auth.session.usertoken", [
@@ -30,8 +30,8 @@
30
30
  user = {};
31
31
  __cache__ = null;
32
32
 
33
- constructor(...o){
34
- super(o);
33
+ constructor(o){
34
+ super(o);
35
35
  var __instance__ = this;
36
36
  this.__cache__ = new ComplexStorageCache({
37
37
  index: __instance__.__instanceID.toString(),
@@ -101,4 +101,16 @@
101
101
  }
102
102
  ]);
103
103
 
104
- }).call(null);
104
+ }).call(null, (typeof module === "object" && typeof module.exports === "object") ? (
105
+ module.exports = (typeof globalThis !== "undefined"
106
+ ? globalThis
107
+ : typeof self !== "undefined"
108
+ ? self
109
+ : typeof window !== "undefined"
110
+ ? window
111
+ : typeof global !== "undefined"
112
+ ? global
113
+ : {})
114
+ ) : ((typeof global === "object") ? (global) : (
115
+ (typeof window === "object") ? (window) : ({})
116
+ )));
@@ -50,7 +50,7 @@
50
50
  tplsource= "inline";
51
51
  template= "<p>Loading...</p>";
52
52
 
53
- constructor (...o){
53
+ constructor (o){
54
54
  super(o);
55
55
  this.body.setAttribute("controllerClass", "DataGridController");
56
56
  var subcomponentClass = (this.body.getAttribute("subcomponentClass") !== null) ? (this.body.getAttribute("subcomponentClass")) : ("GridItemComponent");
@@ -22,15 +22,15 @@
22
22
  * Everyone is permitted to copy and distribute verbatim copies of this
23
23
  * license document, but changing it is not allowed.
24
24
  */
25
- (function() {
26
- "use strict";
25
+ (function __splash_screen__ (global) {
26
+ "use strict";
27
27
  Package("org.qcobjects.components.base", [
28
28
  class SplashScreenComponent extends Component {
29
29
  cached = false;
30
30
  shadowed= true;
31
31
 
32
32
  constructor (component) {
33
- component.name = "splashscreen";
33
+ component.name = (typeof component.name === "undefined")? ("splashscreen"):(component.name);
34
34
 
35
35
  var isBrowser = typeof window !== "undefined" && typeof window.self !== "undefined" && window === window.self;
36
36
  var isStartURL = (location.hash === ""
@@ -47,7 +47,9 @@ Package("org.qcobjects.components.base", [
47
47
  }
48
48
  component.data.basePath = component.basePath;
49
49
  } else {
50
- component.body.style.display="none";
50
+ if (typeof component !== "undefined"){
51
+ component.body.style.display="none";
52
+ }
51
53
  }
52
54
  super(component);
53
55
  this._enabled_ = _enabled_;
@@ -63,49 +65,54 @@ Package("org.qcobjects.components.base", [
63
65
  this._bgcolor = this.body.style.backgroundColor;
64
66
 
65
67
  var _helper_ = () => {
66
- if (!_helper_.executed){
67
- var _componentRoot = (this.shadowed)?(this.shadowRoot.host):(this.body);
68
- global.componentsStack.filter(c=>c.body.hasAttribute("splashscreen")).map(
69
- (mainComponent) => {
70
- logger.debug("Splash Screen of Main Component:",mainComponent.name);
71
- mainComponent.splashScreenComponent = this;
72
- function SplashScreenHandler (){
73
- if (!SplashScreenHandler.executed){
74
- var mainComponent = this; /* here this is bound to mainComponent */
75
- var component = mainComponent.splashScreenComponent;
76
- var mainElement = (mainComponent.shadowed)?(mainComponent.shadowRoot.host):(mainComponent.body);
77
- mainComponent._mainPosition = mainElement.style.position;
78
- mainElement.style.position = "fixed";
79
- mainComponent._mainOpacity = mainElement.style.opacity;
80
- _componentRoot.style.width = "100%";
81
- _componentRoot.style.height = "100%";
82
- document.body.style.backgroundColor = "#111111";
83
- mainElement.style.opacity = 0;
84
- setTimeout(function() {
85
- if (typeof _componentRoot !== "undefined"){
86
- document.body.style.backgroundColor = component._bgcolor;
87
- _componentRoot.subelements("#slot-logo").map(function (slotlogo){
88
- slotlogo.style.display = "block";
89
- slotlogo.style.transformOrigin = "center";
90
- (new Resize()).apply(slotlogo,1,0);
91
- });
92
- (new Fade()).apply(_componentRoot, 1, 0);
93
- }
94
- }, (duration-displayEffectDuration));
95
- setTimeout(function() {
96
- (new Fade()).apply(mainElement, 0, 1);
97
- mainElement.style.position = mainComponent._mainPosition;
98
- document.body.style.backgroundColor = component._bgcolor;
99
- _componentRoot.parentElement.remove();
100
- }, duration);
101
- }
102
- SplashScreenHandler.executed=true;
103
- }
104
- mainComponent.addComponentHelper(SplashScreenHandler.bind(mainComponent));
68
+ setTimeout(()=>{
69
+ if (!_helper_.executed){
70
+ var _componentRoot = (this.shadowed)?(this.shadowRoot.host):(this.body);
71
+ if (typeof global.componentsStack !== "undefined"){
72
+ global.componentsStack.filter(c=>c.body.hasAttribute("splashscreen")).map(
73
+ (mainComponent) => {
74
+ logger.debug("Splash Screen of Main Component:",mainComponent.name);
75
+ mainComponent.splashScreenComponent = this;
76
+ function SplashScreenHandler (){
77
+ if (!SplashScreenHandler.executed){
78
+ var mainComponent = this; /* here this is bound to mainComponent */
79
+ var component = mainComponent.splashScreenComponent;
80
+ var mainElement = (mainComponent.shadowed)?(mainComponent.shadowRoot.host):(mainComponent.body);
81
+ mainComponent._mainPosition = mainElement.style.position;
82
+ mainElement.style.position = "fixed";
83
+ mainComponent._mainOpacity = mainElement.style.opacity;
84
+ _componentRoot.style.width = "100%";
85
+ _componentRoot.style.height = "100%";
86
+ document.body.style.backgroundColor = "#111111";
87
+ mainElement.style.opacity = 0;
88
+ setTimeout(function() {
89
+ if (typeof _componentRoot !== "undefined"){
90
+ document.body.style.backgroundColor = component._bgcolor;
91
+ _componentRoot.subelements("#slot-logo").map(function (slotlogo){
92
+ slotlogo.style.display = "block";
93
+ slotlogo.style.transformOrigin = "center";
94
+ (new Resize()).apply(slotlogo,1,0);
95
+ });
96
+ (new Fade()).apply(_componentRoot, 1, 0);
97
+ }
98
+ }, (duration-displayEffectDuration));
99
+ setTimeout(function() {
100
+ (new Fade()).apply(mainElement, 0, 1);
101
+ mainElement.style.position = mainComponent._mainPosition;
102
+ document.body.style.backgroundColor = component._bgcolor;
103
+ _componentRoot.parentElement.remove();
104
+ }, duration);
105
+ }
106
+ SplashScreenHandler.executed=true;
107
+ }
108
+ mainComponent.addComponentHelper(SplashScreenHandler.bind(mainComponent));
109
+ }
110
+ );
105
111
  }
106
- );
107
- _helper_.executed=true;
108
- }
112
+ _helper_.executed=true;
113
+ }
114
+
115
+ });
109
116
  };
110
117
  _helper_.executed=false;
111
118
  this.addComponentHelper(_helper_.bind(component));
@@ -623,4 +630,16 @@ Package("org.qcobjects.components.splashscreen",[
623
630
  ]);
624
631
 
625
632
 
626
- }).call(null);
633
+ }).call(null, (typeof module === "object" && typeof module.exports === "object") ? (
634
+ module.exports = (typeof globalThis !== "undefined"
635
+ ? globalThis
636
+ : typeof self !== "undefined"
637
+ ? self
638
+ : typeof window !== "undefined"
639
+ ? window
640
+ : typeof global !== "undefined"
641
+ ? global
642
+ : {})
643
+ ) : ((typeof global === "object") ? (global) : (
644
+ (typeof window === "object") ? (window) : ({})
645
+ )));
@@ -26,7 +26,7 @@
26
26
  "use strict";
27
27
  Package("org.qcobjects.controllers.grid",[
28
28
 
29
- class GridComponent extends Controller {
29
+ class GridController extends Controller {
30
30
  dependencies=[];
31
31
  component=null;
32
32
 
@@ -22,7 +22,7 @@
22
22
  * Everyone is permitted to copy and distribute verbatim copies of this
23
23
  * license document, but changing it is not allowed.
24
24
  */
25
- (function () {
25
+ (function (global) {
26
26
  "use strict";
27
27
  Package("org.qcobjects.controllers.slider", [
28
28
 
@@ -40,7 +40,7 @@
40
40
  this._componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);
41
41
  //TODO: Implement
42
42
  this.sliderHandlerName = "slider_" + this.component.__instanceID.toString();
43
- global.set(controller.sliderHandlerName, this);
43
+ global.set(this.sliderHandlerName, this);
44
44
 
45
45
  }
46
46
 
@@ -139,4 +139,16 @@
139
139
 
140
140
  ]);
141
141
 
142
- }).call(null);
142
+ }).call(null, (typeof module === "object" && typeof module.exports === "object") ? (
143
+ module.exports = (typeof globalThis !== "undefined"
144
+ ? globalThis
145
+ : typeof self !== "undefined"
146
+ ? self
147
+ : typeof window !== "undefined"
148
+ ? window
149
+ : typeof global !== "undefined"
150
+ ? global
151
+ : {})
152
+ ) : ((typeof global === "object") ? (global) : (
153
+ (typeof window === "object") ? (window) : ({})
154
+ )));
@@ -22,7 +22,7 @@
22
22
  * Everyone is permitted to copy and distribute verbatim copies of this
23
23
  * license document, but changing it is not allowed.
24
24
  */
25
- (function () {
25
+ (function (global) {
26
26
  "use strict";
27
27
  Package("org.qcobjects.i18n_messages", [
28
28
 
@@ -58,4 +58,16 @@
58
58
  }
59
59
  ]);
60
60
  (new i18n_messages({}))._load_i18n_packages_();
61
- }).call(null);
61
+ }).call(null, (typeof module === "object" && typeof module.exports === "object") ? (
62
+ module.exports = (typeof globalThis !== "undefined"
63
+ ? globalThis
64
+ : typeof self !== "undefined"
65
+ ? self
66
+ : typeof window !== "undefined"
67
+ ? window
68
+ : typeof global !== "undefined"
69
+ ? global
70
+ : {})
71
+ ) : ((typeof global === "object") ? (global) : (
72
+ (typeof window === "object") ? (window) : ({})
73
+ )));