backend-plus 1.14.8 → 1.14.12

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.
@@ -286,15 +286,6 @@ myOwn.showPage = function showPage(pageDef){
286
286
  }
287
287
  };
288
288
 
289
- myOwn.menuName = 'menu';
290
- myOwn.menuSeparator = '#';
291
- Object.defineProperty(myOwn, 'menup', {
292
- get:function(){
293
- var menuName = my.offline.mode?'ext':this.menuName;
294
- return menuName+this.menuSeparator;
295
- }
296
- });
297
-
298
289
  myOwn.getHRef = function getHRef(menu){
299
290
  var href;
300
291
  if(!menu.w && menu.menuType){
@@ -363,33 +354,6 @@ myOwn.createForkeableButton = function createForkeableButton(menu, opts){
363
354
  return button;
364
355
  };
365
356
 
366
- function encodeMinimalURIComponent(text){
367
- return (text+'')
368
- .replace(/\=/g, '%3D')
369
- .replace(/\?/g, '%3F')
370
- .replace(/\#/g, '%23')
371
- .replace(/&/g, '%26')
372
- .replace(/%/g, '%25');
373
- }
374
-
375
- myOwn.paramsToUriPart = function paramsToUriPart(params, inMenu){
376
- var paramStr=likeAr(params).map(function(value, name){
377
- var paramDef=myOwn.UriSearchToObjectParams[name] || { encode:function(x){return x}, varName:name };
378
- if((paramDef.showInMenu || !inMenu) && !paramDef.hide || (params.showParams && params.showParams.includes(name))){
379
- if(value!=null){
380
- value=paramDef.encode(value, params);
381
- return (paramDef.varName||name)+'='+encodeMinimalURIComponent(value);
382
- }
383
- }
384
- }).filter(function(expr){return expr;}).join('&');
385
- return paramStr;
386
- }
387
-
388
- myOwn.replaceAddrParams = function replaceAddrParams(params){
389
- var my=this;
390
- history.replaceState(null, null, my.menup+my.paramsToUriPart(params));
391
- }
392
-
393
357
  myOwn.light = function light(name, onclick, opts){
394
358
  var skin=((this.config||{}).config||{}).skin;
395
359
  var skinUrl=(skin?skin+'/':'');
@@ -804,16 +804,6 @@ myOwn.captureKeys = function captureKeys() {
804
804
  });
805
805
  };
806
806
 
807
- myOwn.getRect = function getRect(element){
808
- var rect = {top:0, left:0, width:element.offsetWidth, height:element.offsetHeight};
809
- while( element != null ) {
810
- rect.top += element.offsetTop;
811
- rect.left += element.offsetLeft;
812
- element = element.offsetParent;
813
- }
814
- return rect;
815
- }
816
-
817
807
  // myOwn.quitarLupa = function quitarLupa(){
818
808
  // if(document.buttonLupa){
819
809
  // document.body.removeChild(document.buttonLupa);
@@ -161,7 +161,7 @@ export type SequenceDefinition = {
161
161
  export type ExportMetadataDefinition={ /* TODO: define */ }
162
162
  export type FieldDefinition = EditableDbDefinition & {
163
163
  name:string
164
- typeName:PgKnownTypes
164
+ typeName:PgKnownTypes|'ARRAY:text'
165
165
  label?:string
166
166
  title?:string
167
167
  nullable?:boolean
@@ -228,6 +228,7 @@ export type ForeignKey = {
228
228
  consName?:string,
229
229
  initiallyDeferred?:boolean
230
230
  displayAfterFieldName?:string|boolean
231
+ forceDeferrable?:boolean
231
232
  }
232
233
  export type Constraint = {constraintType:'check'|'unique'|'not null', expr?:string, fields?:string[], consName?:string}
233
234
  export type TableDefinition = EditableDbDefinition & {
@@ -270,6 +271,7 @@ export type TableDefinition = EditableDbDefinition & {
270
271
  delete?:{using?:string}
271
272
  }
272
273
  join?:string
274
+ constraintsDeferred?:boolean
273
275
  }
274
276
  foreignKeys?:ForeignKey[]
275
277
  softForeignKeys?:ForeignKey[]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "backend-plus",
3
3
  "description": "Backend for typed controls",
4
- "version": "1.14.8",
4
+ "version": "1.14.12",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "repository": "codenautas/backend-plus",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "ajax-best-promise": "^0.3.7",
32
32
  "backend-skins": "^0.1.15",
33
- "best-globals": "^1.0.2",
33
+ "best-globals": "^1.0.3",
34
34
  "big.js": "^6.1.1",
35
35
  "body-parser": "^1.19.1",
36
36
  "cast-error": "^0.1.0",
@@ -97,7 +97,7 @@
97
97
  "karma-ie-launcher": "^1.0.0",
98
98
  "karma-mocha": "^2.0.1",
99
99
  "kill-9": "~0.4.3",
100
- "mocha": "^9.1.3",
100
+ "mocha": "^9.1.4",
101
101
  "nyc": "^15.1.0",
102
102
  "puppeteer": "^13.0.1",
103
103
  "sinon": "^12.0.1",
@@ -609,6 +609,52 @@ myAjax.UriSearchToObject = function UriSearchToObject(locationSearch){
609
609
  return addrParams;
610
610
  }
611
611
 
612
+ myAjax.replaceAddrParams = function replaceAddrParams(params){
613
+ var my=this;
614
+ history.replaceState(null, null, my.menup+my.paramsToUriPart(params));
615
+ }
616
+
617
+ function encodeMinimalURIComponent(text){
618
+ return (text+'')
619
+ .replace(/\=/g, '%3D')
620
+ .replace(/\?/g, '%3F')
621
+ .replace(/\#/g, '%23')
622
+ .replace(/&/g, '%26')
623
+ .replace(/%/g, '%25');
624
+ }
625
+
626
+ myAjax.paramsToUriPart = function paramsToUriPart(params, inMenu){
627
+ var paramStr=likeAr(params).map(function(value, name){
628
+ var paramDef=myOwn.UriSearchToObjectParams[name] || { encode:function(x){return x}, varName:name };
629
+ if((paramDef.showInMenu || !inMenu) && !paramDef.hide || (params.showParams && params.showParams.includes(name))){
630
+ if(value!=null){
631
+ value=paramDef.encode(value, params);
632
+ return (paramDef.varName||name)+'='+encodeMinimalURIComponent(value);
633
+ }
634
+ }
635
+ }).filter(function(expr){return expr;}).join('&');
636
+ return paramStr;
637
+ }
638
+
639
+ myAjax.getRect = function getRect(element){
640
+ var rect = {top:0, left:0, width:element.offsetWidth, height:element.offsetHeight};
641
+ while( element != null ) {
642
+ rect.top += element.offsetTop;
643
+ rect.left += element.offsetLeft;
644
+ element = element.offsetParent;
645
+ }
646
+ return rect;
647
+ }
648
+
649
+ myAjax.menuName = 'menu';
650
+ myAjax.menuSeparator = '#';
651
+ Object.defineProperty(myAjax, 'menup', {
652
+ get:function(){
653
+ var menuName = my.offline.mode?'ext':this.menuName;
654
+ return menuName+this.menuSeparator;
655
+ }
656
+ });
657
+
612
658
  return myAjax;
613
659
 
614
660
  });