@nickaux/form-configurator 1.1.216 → 1.1.218
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/FormConfigurator.esm.js +685 -672
- package/dist/FormConfigurator.esm.js.map +1 -1
- package/package.json +2 -1
|
@@ -36294,10 +36294,10 @@ function requireLib$1() {
|
|
|
36294
36294
|
ElementType2["CDATA"] = "cdata";
|
|
36295
36295
|
ElementType2["Doctype"] = "doctype";
|
|
36296
36296
|
})(ElementType = exports2.ElementType || (exports2.ElementType = {}));
|
|
36297
|
-
function
|
|
36297
|
+
function isTag(elem) {
|
|
36298
36298
|
return elem.type === ElementType.Tag || elem.type === ElementType.Script || elem.type === ElementType.Style;
|
|
36299
36299
|
}
|
|
36300
|
-
exports2.isTag =
|
|
36300
|
+
exports2.isTag = isTag;
|
|
36301
36301
|
exports2.Root = ElementType.Root;
|
|
36302
36302
|
exports2.Text = ElementType.Text;
|
|
36303
36303
|
exports2.Directive = ElementType.Directive;
|
|
@@ -36310,399 +36310,406 @@ function requireLib$1() {
|
|
|
36310
36310
|
})(lib$4);
|
|
36311
36311
|
return lib$4;
|
|
36312
36312
|
}
|
|
36313
|
-
var
|
|
36314
|
-
|
|
36315
|
-
|
|
36316
|
-
|
|
36317
|
-
|
|
36318
|
-
|
|
36319
|
-
|
|
36320
|
-
|
|
36313
|
+
var hasRequiredNode;
|
|
36314
|
+
function requireNode() {
|
|
36315
|
+
if (hasRequiredNode)
|
|
36316
|
+
return node$1;
|
|
36317
|
+
hasRequiredNode = 1;
|
|
36318
|
+
var __extends2 = commonjsGlobal && commonjsGlobal.__extends || function() {
|
|
36319
|
+
var extendStatics = function(d3, b2) {
|
|
36320
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d4, b3) {
|
|
36321
|
+
d4.__proto__ = b3;
|
|
36322
|
+
} || function(d4, b3) {
|
|
36323
|
+
for (var p2 in b3)
|
|
36324
|
+
if (Object.prototype.hasOwnProperty.call(b3, p2))
|
|
36325
|
+
d4[p2] = b3[p2];
|
|
36326
|
+
};
|
|
36327
|
+
return extendStatics(d3, b2);
|
|
36328
|
+
};
|
|
36329
|
+
return function(d3, b2) {
|
|
36330
|
+
if (typeof b2 !== "function" && b2 !== null)
|
|
36331
|
+
throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
|
|
36332
|
+
extendStatics(d3, b2);
|
|
36333
|
+
function __() {
|
|
36334
|
+
this.constructor = d3;
|
|
36335
|
+
}
|
|
36336
|
+
d3.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
|
|
36321
36337
|
};
|
|
36322
|
-
|
|
36323
|
-
|
|
36324
|
-
|
|
36325
|
-
|
|
36326
|
-
|
|
36327
|
-
|
|
36328
|
-
|
|
36329
|
-
|
|
36330
|
-
}
|
|
36331
|
-
d3.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
|
|
36332
|
-
};
|
|
36333
|
-
}();
|
|
36334
|
-
var __assign$4 = commonjsGlobal && commonjsGlobal.__assign || function() {
|
|
36335
|
-
__assign$4 = Object.assign || function(t2) {
|
|
36336
|
-
for (var s4, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
|
|
36337
|
-
s4 = arguments[i2];
|
|
36338
|
-
for (var p2 in s4)
|
|
36339
|
-
if (Object.prototype.hasOwnProperty.call(s4, p2))
|
|
36340
|
-
t2[p2] = s4[p2];
|
|
36341
|
-
}
|
|
36342
|
-
return t2;
|
|
36343
|
-
};
|
|
36344
|
-
return __assign$4.apply(this, arguments);
|
|
36345
|
-
};
|
|
36346
|
-
Object.defineProperty(node$1, "__esModule", { value: true });
|
|
36347
|
-
node$1.cloneNode = node$1.hasChildren = node$1.isDocument = node$1.isDirective = node$1.isComment = node$1.isText = node$1.isCDATA = node$1.isTag = node$1.Element = node$1.Document = node$1.NodeWithChildren = node$1.ProcessingInstruction = node$1.Comment = node$1.Text = node$1.DataNode = node$1.Node = void 0;
|
|
36348
|
-
var domelementtype_1 = requireLib$1();
|
|
36349
|
-
var nodeTypes = /* @__PURE__ */ new Map([
|
|
36350
|
-
[domelementtype_1.ElementType.Tag, 1],
|
|
36351
|
-
[domelementtype_1.ElementType.Script, 1],
|
|
36352
|
-
[domelementtype_1.ElementType.Style, 1],
|
|
36353
|
-
[domelementtype_1.ElementType.Directive, 1],
|
|
36354
|
-
[domelementtype_1.ElementType.Text, 3],
|
|
36355
|
-
[domelementtype_1.ElementType.CDATA, 4],
|
|
36356
|
-
[domelementtype_1.ElementType.Comment, 8],
|
|
36357
|
-
[domelementtype_1.ElementType.Root, 9]
|
|
36358
|
-
]);
|
|
36359
|
-
var Node$1 = (
|
|
36360
|
-
/** @class */
|
|
36361
|
-
function() {
|
|
36362
|
-
function Node2(type) {
|
|
36363
|
-
this.type = type;
|
|
36364
|
-
this.parent = null;
|
|
36365
|
-
this.prev = null;
|
|
36366
|
-
this.next = null;
|
|
36367
|
-
this.startIndex = null;
|
|
36368
|
-
this.endIndex = null;
|
|
36369
|
-
}
|
|
36370
|
-
Object.defineProperty(Node2.prototype, "nodeType", {
|
|
36371
|
-
// Read-only aliases
|
|
36372
|
-
/**
|
|
36373
|
-
* [DOM spec](https://dom.spec.whatwg.org/#dom-node-nodetype)-compatible
|
|
36374
|
-
* node {@link type}.
|
|
36375
|
-
*/
|
|
36376
|
-
get: function() {
|
|
36377
|
-
var _a;
|
|
36378
|
-
return (_a = nodeTypes.get(this.type)) !== null && _a !== void 0 ? _a : 1;
|
|
36379
|
-
},
|
|
36380
|
-
enumerable: false,
|
|
36381
|
-
configurable: true
|
|
36382
|
-
});
|
|
36383
|
-
Object.defineProperty(Node2.prototype, "parentNode", {
|
|
36384
|
-
// Read-write aliases for properties
|
|
36385
|
-
/**
|
|
36386
|
-
* Same as {@link parent}.
|
|
36387
|
-
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
36388
|
-
*/
|
|
36389
|
-
get: function() {
|
|
36390
|
-
return this.parent;
|
|
36391
|
-
},
|
|
36392
|
-
set: function(parent) {
|
|
36393
|
-
this.parent = parent;
|
|
36394
|
-
},
|
|
36395
|
-
enumerable: false,
|
|
36396
|
-
configurable: true
|
|
36397
|
-
});
|
|
36398
|
-
Object.defineProperty(Node2.prototype, "previousSibling", {
|
|
36399
|
-
/**
|
|
36400
|
-
* Same as {@link prev}.
|
|
36401
|
-
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
36402
|
-
*/
|
|
36403
|
-
get: function() {
|
|
36404
|
-
return this.prev;
|
|
36405
|
-
},
|
|
36406
|
-
set: function(prev2) {
|
|
36407
|
-
this.prev = prev2;
|
|
36408
|
-
},
|
|
36409
|
-
enumerable: false,
|
|
36410
|
-
configurable: true
|
|
36411
|
-
});
|
|
36412
|
-
Object.defineProperty(Node2.prototype, "nextSibling", {
|
|
36413
|
-
/**
|
|
36414
|
-
* Same as {@link next}.
|
|
36415
|
-
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
36416
|
-
*/
|
|
36417
|
-
get: function() {
|
|
36418
|
-
return this.next;
|
|
36419
|
-
},
|
|
36420
|
-
set: function(next2) {
|
|
36421
|
-
this.next = next2;
|
|
36422
|
-
},
|
|
36423
|
-
enumerable: false,
|
|
36424
|
-
configurable: true
|
|
36425
|
-
});
|
|
36426
|
-
Node2.prototype.cloneNode = function(recursive) {
|
|
36427
|
-
if (recursive === void 0) {
|
|
36428
|
-
recursive = false;
|
|
36338
|
+
}();
|
|
36339
|
+
var __assign2 = commonjsGlobal && commonjsGlobal.__assign || function() {
|
|
36340
|
+
__assign2 = Object.assign || function(t2) {
|
|
36341
|
+
for (var s4, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
|
|
36342
|
+
s4 = arguments[i2];
|
|
36343
|
+
for (var p2 in s4)
|
|
36344
|
+
if (Object.prototype.hasOwnProperty.call(s4, p2))
|
|
36345
|
+
t2[p2] = s4[p2];
|
|
36429
36346
|
}
|
|
36430
|
-
return
|
|
36347
|
+
return t2;
|
|
36431
36348
|
};
|
|
36432
|
-
return
|
|
36433
|
-
}
|
|
36434
|
-
);
|
|
36435
|
-
node$1.
|
|
36436
|
-
var
|
|
36437
|
-
|
|
36438
|
-
|
|
36439
|
-
|
|
36440
|
-
|
|
36441
|
-
|
|
36442
|
-
|
|
36443
|
-
|
|
36444
|
-
|
|
36445
|
-
|
|
36446
|
-
|
|
36447
|
-
|
|
36448
|
-
|
|
36449
|
-
|
|
36450
|
-
|
|
36451
|
-
|
|
36452
|
-
|
|
36453
|
-
|
|
36454
|
-
this.
|
|
36455
|
-
|
|
36456
|
-
|
|
36457
|
-
|
|
36458
|
-
|
|
36459
|
-
|
|
36460
|
-
|
|
36461
|
-
)
|
|
36462
|
-
node
|
|
36463
|
-
|
|
36464
|
-
|
|
36465
|
-
|
|
36466
|
-
|
|
36467
|
-
|
|
36468
|
-
|
|
36469
|
-
|
|
36470
|
-
|
|
36471
|
-
|
|
36472
|
-
|
|
36473
|
-
|
|
36474
|
-
|
|
36475
|
-
|
|
36476
|
-
|
|
36477
|
-
|
|
36478
|
-
|
|
36479
|
-
|
|
36480
|
-
|
|
36481
|
-
|
|
36482
|
-
|
|
36483
|
-
|
|
36484
|
-
|
|
36485
|
-
|
|
36486
|
-
|
|
36487
|
-
|
|
36488
|
-
|
|
36489
|
-
|
|
36490
|
-
|
|
36491
|
-
|
|
36492
|
-
|
|
36493
|
-
|
|
36494
|
-
|
|
36495
|
-
|
|
36496
|
-
|
|
36497
|
-
|
|
36498
|
-
|
|
36499
|
-
|
|
36500
|
-
|
|
36501
|
-
|
|
36502
|
-
|
|
36503
|
-
|
|
36504
|
-
|
|
36505
|
-
|
|
36506
|
-
|
|
36507
|
-
|
|
36508
|
-
|
|
36509
|
-
|
|
36510
|
-
|
|
36511
|
-
|
|
36512
|
-
|
|
36513
|
-
}
|
|
36514
|
-
|
|
36515
|
-
|
|
36516
|
-
|
|
36517
|
-
|
|
36518
|
-
|
|
36519
|
-
|
|
36520
|
-
|
|
36521
|
-
|
|
36522
|
-
|
|
36523
|
-
|
|
36524
|
-
|
|
36525
|
-
|
|
36526
|
-
|
|
36527
|
-
|
|
36528
|
-
|
|
36529
|
-
|
|
36530
|
-
|
|
36531
|
-
return
|
|
36532
|
-
},
|
|
36533
|
-
set: function(children) {
|
|
36534
|
-
this.children = children;
|
|
36535
|
-
},
|
|
36536
|
-
enumerable: false,
|
|
36537
|
-
configurable: true
|
|
36538
|
-
});
|
|
36539
|
-
return NodeWithChildren2;
|
|
36540
|
-
}(Node$1)
|
|
36541
|
-
);
|
|
36542
|
-
node$1.NodeWithChildren = NodeWithChildren;
|
|
36543
|
-
var Document = (
|
|
36544
|
-
/** @class */
|
|
36545
|
-
function(_super) {
|
|
36546
|
-
__extends$5(Document2, _super);
|
|
36547
|
-
function Document2(children) {
|
|
36548
|
-
return _super.call(this, domelementtype_1.ElementType.Root, children) || this;
|
|
36549
|
-
}
|
|
36550
|
-
return Document2;
|
|
36551
|
-
}(NodeWithChildren)
|
|
36552
|
-
);
|
|
36553
|
-
node$1.Document = Document;
|
|
36554
|
-
var Element$2 = (
|
|
36555
|
-
/** @class */
|
|
36556
|
-
function(_super) {
|
|
36557
|
-
__extends$5(Element2, _super);
|
|
36558
|
-
function Element2(name, attribs, children, type) {
|
|
36559
|
-
if (children === void 0) {
|
|
36560
|
-
children = [];
|
|
36349
|
+
return __assign2.apply(this, arguments);
|
|
36350
|
+
};
|
|
36351
|
+
Object.defineProperty(node$1, "__esModule", { value: true });
|
|
36352
|
+
node$1.cloneNode = node$1.hasChildren = node$1.isDocument = node$1.isDirective = node$1.isComment = node$1.isText = node$1.isCDATA = node$1.isTag = node$1.Element = node$1.Document = node$1.NodeWithChildren = node$1.ProcessingInstruction = node$1.Comment = node$1.Text = node$1.DataNode = node$1.Node = void 0;
|
|
36353
|
+
var domelementtype_1 = requireLib$1();
|
|
36354
|
+
var nodeTypes = /* @__PURE__ */ new Map([
|
|
36355
|
+
[domelementtype_1.ElementType.Tag, 1],
|
|
36356
|
+
[domelementtype_1.ElementType.Script, 1],
|
|
36357
|
+
[domelementtype_1.ElementType.Style, 1],
|
|
36358
|
+
[domelementtype_1.ElementType.Directive, 1],
|
|
36359
|
+
[domelementtype_1.ElementType.Text, 3],
|
|
36360
|
+
[domelementtype_1.ElementType.CDATA, 4],
|
|
36361
|
+
[domelementtype_1.ElementType.Comment, 8],
|
|
36362
|
+
[domelementtype_1.ElementType.Root, 9]
|
|
36363
|
+
]);
|
|
36364
|
+
var Node2 = (
|
|
36365
|
+
/** @class */
|
|
36366
|
+
function() {
|
|
36367
|
+
function Node3(type) {
|
|
36368
|
+
this.type = type;
|
|
36369
|
+
this.parent = null;
|
|
36370
|
+
this.prev = null;
|
|
36371
|
+
this.next = null;
|
|
36372
|
+
this.startIndex = null;
|
|
36373
|
+
this.endIndex = null;
|
|
36374
|
+
}
|
|
36375
|
+
Object.defineProperty(Node3.prototype, "nodeType", {
|
|
36376
|
+
// Read-only aliases
|
|
36377
|
+
/**
|
|
36378
|
+
* [DOM spec](https://dom.spec.whatwg.org/#dom-node-nodetype)-compatible
|
|
36379
|
+
* node {@link type}.
|
|
36380
|
+
*/
|
|
36381
|
+
get: function() {
|
|
36382
|
+
var _a;
|
|
36383
|
+
return (_a = nodeTypes.get(this.type)) !== null && _a !== void 0 ? _a : 1;
|
|
36384
|
+
},
|
|
36385
|
+
enumerable: false,
|
|
36386
|
+
configurable: true
|
|
36387
|
+
});
|
|
36388
|
+
Object.defineProperty(Node3.prototype, "parentNode", {
|
|
36389
|
+
// Read-write aliases for properties
|
|
36390
|
+
/**
|
|
36391
|
+
* Same as {@link parent}.
|
|
36392
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
36393
|
+
*/
|
|
36394
|
+
get: function() {
|
|
36395
|
+
return this.parent;
|
|
36396
|
+
},
|
|
36397
|
+
set: function(parent) {
|
|
36398
|
+
this.parent = parent;
|
|
36399
|
+
},
|
|
36400
|
+
enumerable: false,
|
|
36401
|
+
configurable: true
|
|
36402
|
+
});
|
|
36403
|
+
Object.defineProperty(Node3.prototype, "previousSibling", {
|
|
36404
|
+
/**
|
|
36405
|
+
* Same as {@link prev}.
|
|
36406
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
36407
|
+
*/
|
|
36408
|
+
get: function() {
|
|
36409
|
+
return this.prev;
|
|
36410
|
+
},
|
|
36411
|
+
set: function(prev2) {
|
|
36412
|
+
this.prev = prev2;
|
|
36413
|
+
},
|
|
36414
|
+
enumerable: false,
|
|
36415
|
+
configurable: true
|
|
36416
|
+
});
|
|
36417
|
+
Object.defineProperty(Node3.prototype, "nextSibling", {
|
|
36418
|
+
/**
|
|
36419
|
+
* Same as {@link next}.
|
|
36420
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
36421
|
+
*/
|
|
36422
|
+
get: function() {
|
|
36423
|
+
return this.next;
|
|
36424
|
+
},
|
|
36425
|
+
set: function(next2) {
|
|
36426
|
+
this.next = next2;
|
|
36427
|
+
},
|
|
36428
|
+
enumerable: false,
|
|
36429
|
+
configurable: true
|
|
36430
|
+
});
|
|
36431
|
+
Node3.prototype.cloneNode = function(recursive) {
|
|
36432
|
+
if (recursive === void 0) {
|
|
36433
|
+
recursive = false;
|
|
36434
|
+
}
|
|
36435
|
+
return cloneNode(this, recursive);
|
|
36436
|
+
};
|
|
36437
|
+
return Node3;
|
|
36438
|
+
}()
|
|
36439
|
+
);
|
|
36440
|
+
node$1.Node = Node2;
|
|
36441
|
+
var DataNode = (
|
|
36442
|
+
/** @class */
|
|
36443
|
+
function(_super) {
|
|
36444
|
+
__extends2(DataNode2, _super);
|
|
36445
|
+
function DataNode2(type, data2) {
|
|
36446
|
+
var _this = _super.call(this, type) || this;
|
|
36447
|
+
_this.data = data2;
|
|
36448
|
+
return _this;
|
|
36561
36449
|
}
|
|
36562
|
-
|
|
36563
|
-
|
|
36450
|
+
Object.defineProperty(DataNode2.prototype, "nodeValue", {
|
|
36451
|
+
/**
|
|
36452
|
+
* Same as {@link data}.
|
|
36453
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
36454
|
+
*/
|
|
36455
|
+
get: function() {
|
|
36456
|
+
return this.data;
|
|
36457
|
+
},
|
|
36458
|
+
set: function(data2) {
|
|
36459
|
+
this.data = data2;
|
|
36460
|
+
},
|
|
36461
|
+
enumerable: false,
|
|
36462
|
+
configurable: true
|
|
36463
|
+
});
|
|
36464
|
+
return DataNode2;
|
|
36465
|
+
}(Node2)
|
|
36466
|
+
);
|
|
36467
|
+
node$1.DataNode = DataNode;
|
|
36468
|
+
var Text2 = (
|
|
36469
|
+
/** @class */
|
|
36470
|
+
function(_super) {
|
|
36471
|
+
__extends2(Text3, _super);
|
|
36472
|
+
function Text3(data2) {
|
|
36473
|
+
return _super.call(this, domelementtype_1.ElementType.Text, data2) || this;
|
|
36564
36474
|
}
|
|
36565
|
-
|
|
36566
|
-
|
|
36567
|
-
|
|
36568
|
-
|
|
36569
|
-
|
|
36570
|
-
|
|
36571
|
-
|
|
36572
|
-
|
|
36573
|
-
|
|
36574
|
-
|
|
36575
|
-
|
|
36576
|
-
|
|
36577
|
-
|
|
36578
|
-
|
|
36579
|
-
|
|
36580
|
-
|
|
36581
|
-
|
|
36582
|
-
|
|
36583
|
-
|
|
36584
|
-
|
|
36585
|
-
|
|
36586
|
-
|
|
36587
|
-
|
|
36588
|
-
|
|
36589
|
-
|
|
36590
|
-
|
|
36591
|
-
|
|
36592
|
-
|
|
36593
|
-
|
|
36594
|
-
|
|
36595
|
-
|
|
36596
|
-
|
|
36597
|
-
|
|
36598
|
-
|
|
36599
|
-
|
|
36600
|
-
|
|
36601
|
-
|
|
36602
|
-
|
|
36603
|
-
|
|
36604
|
-
node
|
|
36605
|
-
function
|
|
36606
|
-
|
|
36607
|
-
|
|
36608
|
-
|
|
36609
|
-
|
|
36610
|
-
|
|
36611
|
-
}
|
|
36612
|
-
|
|
36613
|
-
|
|
36614
|
-
|
|
36615
|
-
|
|
36616
|
-
|
|
36617
|
-
|
|
36618
|
-
|
|
36619
|
-
}
|
|
36620
|
-
|
|
36621
|
-
|
|
36622
|
-
|
|
36623
|
-
|
|
36624
|
-
|
|
36625
|
-
function
|
|
36626
|
-
|
|
36627
|
-
}
|
|
36628
|
-
|
|
36629
|
-
|
|
36630
|
-
|
|
36631
|
-
|
|
36632
|
-
|
|
36633
|
-
|
|
36634
|
-
|
|
36635
|
-
|
|
36475
|
+
return Text3;
|
|
36476
|
+
}(DataNode)
|
|
36477
|
+
);
|
|
36478
|
+
node$1.Text = Text2;
|
|
36479
|
+
var Comment2 = (
|
|
36480
|
+
/** @class */
|
|
36481
|
+
function(_super) {
|
|
36482
|
+
__extends2(Comment3, _super);
|
|
36483
|
+
function Comment3(data2) {
|
|
36484
|
+
return _super.call(this, domelementtype_1.ElementType.Comment, data2) || this;
|
|
36485
|
+
}
|
|
36486
|
+
return Comment3;
|
|
36487
|
+
}(DataNode)
|
|
36488
|
+
);
|
|
36489
|
+
node$1.Comment = Comment2;
|
|
36490
|
+
var ProcessingInstruction2 = (
|
|
36491
|
+
/** @class */
|
|
36492
|
+
function(_super) {
|
|
36493
|
+
__extends2(ProcessingInstruction3, _super);
|
|
36494
|
+
function ProcessingInstruction3(name, data2) {
|
|
36495
|
+
var _this = _super.call(this, domelementtype_1.ElementType.Directive, data2) || this;
|
|
36496
|
+
_this.name = name;
|
|
36497
|
+
return _this;
|
|
36498
|
+
}
|
|
36499
|
+
return ProcessingInstruction3;
|
|
36500
|
+
}(DataNode)
|
|
36501
|
+
);
|
|
36502
|
+
node$1.ProcessingInstruction = ProcessingInstruction2;
|
|
36503
|
+
var NodeWithChildren = (
|
|
36504
|
+
/** @class */
|
|
36505
|
+
function(_super) {
|
|
36506
|
+
__extends2(NodeWithChildren2, _super);
|
|
36507
|
+
function NodeWithChildren2(type, children) {
|
|
36508
|
+
var _this = _super.call(this, type) || this;
|
|
36509
|
+
_this.children = children;
|
|
36510
|
+
return _this;
|
|
36511
|
+
}
|
|
36512
|
+
Object.defineProperty(NodeWithChildren2.prototype, "firstChild", {
|
|
36513
|
+
// Aliases
|
|
36514
|
+
/** First child of the node. */
|
|
36515
|
+
get: function() {
|
|
36516
|
+
var _a;
|
|
36517
|
+
return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;
|
|
36518
|
+
},
|
|
36519
|
+
enumerable: false,
|
|
36520
|
+
configurable: true
|
|
36521
|
+
});
|
|
36522
|
+
Object.defineProperty(NodeWithChildren2.prototype, "lastChild", {
|
|
36523
|
+
/** Last child of the node. */
|
|
36524
|
+
get: function() {
|
|
36525
|
+
return this.children.length > 0 ? this.children[this.children.length - 1] : null;
|
|
36526
|
+
},
|
|
36527
|
+
enumerable: false,
|
|
36528
|
+
configurable: true
|
|
36529
|
+
});
|
|
36530
|
+
Object.defineProperty(NodeWithChildren2.prototype, "childNodes", {
|
|
36531
|
+
/**
|
|
36532
|
+
* Same as {@link children}.
|
|
36533
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
36534
|
+
*/
|
|
36535
|
+
get: function() {
|
|
36536
|
+
return this.children;
|
|
36537
|
+
},
|
|
36538
|
+
set: function(children) {
|
|
36539
|
+
this.children = children;
|
|
36540
|
+
},
|
|
36541
|
+
enumerable: false,
|
|
36542
|
+
configurable: true
|
|
36543
|
+
});
|
|
36544
|
+
return NodeWithChildren2;
|
|
36545
|
+
}(Node2)
|
|
36546
|
+
);
|
|
36547
|
+
node$1.NodeWithChildren = NodeWithChildren;
|
|
36548
|
+
var Document = (
|
|
36549
|
+
/** @class */
|
|
36550
|
+
function(_super) {
|
|
36551
|
+
__extends2(Document2, _super);
|
|
36552
|
+
function Document2(children) {
|
|
36553
|
+
return _super.call(this, domelementtype_1.ElementType.Root, children) || this;
|
|
36554
|
+
}
|
|
36555
|
+
return Document2;
|
|
36556
|
+
}(NodeWithChildren)
|
|
36557
|
+
);
|
|
36558
|
+
node$1.Document = Document;
|
|
36559
|
+
var Element2 = (
|
|
36560
|
+
/** @class */
|
|
36561
|
+
function(_super) {
|
|
36562
|
+
__extends2(Element3, _super);
|
|
36563
|
+
function Element3(name, attribs, children, type) {
|
|
36564
|
+
if (children === void 0) {
|
|
36565
|
+
children = [];
|
|
36566
|
+
}
|
|
36567
|
+
if (type === void 0) {
|
|
36568
|
+
type = name === "script" ? domelementtype_1.ElementType.Script : name === "style" ? domelementtype_1.ElementType.Style : domelementtype_1.ElementType.Tag;
|
|
36569
|
+
}
|
|
36570
|
+
var _this = _super.call(this, type, children) || this;
|
|
36571
|
+
_this.name = name;
|
|
36572
|
+
_this.attribs = attribs;
|
|
36573
|
+
return _this;
|
|
36574
|
+
}
|
|
36575
|
+
Object.defineProperty(Element3.prototype, "tagName", {
|
|
36576
|
+
// DOM Level 1 aliases
|
|
36577
|
+
/**
|
|
36578
|
+
* Same as {@link name}.
|
|
36579
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
36580
|
+
*/
|
|
36581
|
+
get: function() {
|
|
36582
|
+
return this.name;
|
|
36583
|
+
},
|
|
36584
|
+
set: function(name) {
|
|
36585
|
+
this.name = name;
|
|
36586
|
+
},
|
|
36587
|
+
enumerable: false,
|
|
36588
|
+
configurable: true
|
|
36589
|
+
});
|
|
36590
|
+
Object.defineProperty(Element3.prototype, "attributes", {
|
|
36591
|
+
get: function() {
|
|
36592
|
+
var _this = this;
|
|
36593
|
+
return Object.keys(this.attribs).map(function(name) {
|
|
36594
|
+
var _a, _b;
|
|
36595
|
+
return {
|
|
36596
|
+
name,
|
|
36597
|
+
value: _this.attribs[name],
|
|
36598
|
+
namespace: (_a = _this["x-attribsNamespace"]) === null || _a === void 0 ? void 0 : _a[name],
|
|
36599
|
+
prefix: (_b = _this["x-attribsPrefix"]) === null || _b === void 0 ? void 0 : _b[name]
|
|
36600
|
+
};
|
|
36601
|
+
});
|
|
36602
|
+
},
|
|
36603
|
+
enumerable: false,
|
|
36604
|
+
configurable: true
|
|
36605
|
+
});
|
|
36606
|
+
return Element3;
|
|
36607
|
+
}(NodeWithChildren)
|
|
36608
|
+
);
|
|
36609
|
+
node$1.Element = Element2;
|
|
36610
|
+
function isTag(node2) {
|
|
36611
|
+
return (0, domelementtype_1.isTag)(node2);
|
|
36636
36612
|
}
|
|
36637
|
-
|
|
36638
|
-
|
|
36639
|
-
|
|
36640
|
-
}
|
|
36641
|
-
|
|
36642
|
-
|
|
36643
|
-
|
|
36644
|
-
|
|
36645
|
-
|
|
36646
|
-
|
|
36647
|
-
|
|
36648
|
-
|
|
36649
|
-
|
|
36613
|
+
node$1.isTag = isTag;
|
|
36614
|
+
function isCDATA(node2) {
|
|
36615
|
+
return node2.type === domelementtype_1.ElementType.CDATA;
|
|
36616
|
+
}
|
|
36617
|
+
node$1.isCDATA = isCDATA;
|
|
36618
|
+
function isText(node2) {
|
|
36619
|
+
return node2.type === domelementtype_1.ElementType.Text;
|
|
36620
|
+
}
|
|
36621
|
+
node$1.isText = isText;
|
|
36622
|
+
function isComment(node2) {
|
|
36623
|
+
return node2.type === domelementtype_1.ElementType.Comment;
|
|
36624
|
+
}
|
|
36625
|
+
node$1.isComment = isComment;
|
|
36626
|
+
function isDirective(node2) {
|
|
36627
|
+
return node2.type === domelementtype_1.ElementType.Directive;
|
|
36628
|
+
}
|
|
36629
|
+
node$1.isDirective = isDirective;
|
|
36630
|
+
function isDocument(node2) {
|
|
36631
|
+
return node2.type === domelementtype_1.ElementType.Root;
|
|
36632
|
+
}
|
|
36633
|
+
node$1.isDocument = isDocument;
|
|
36634
|
+
function hasChildren(node2) {
|
|
36635
|
+
return Object.prototype.hasOwnProperty.call(node2, "children");
|
|
36636
|
+
}
|
|
36637
|
+
node$1.hasChildren = hasChildren;
|
|
36638
|
+
function cloneNode(node2, recursive) {
|
|
36639
|
+
if (recursive === void 0) {
|
|
36640
|
+
recursive = false;
|
|
36650
36641
|
}
|
|
36651
|
-
|
|
36652
|
-
|
|
36642
|
+
var result;
|
|
36643
|
+
if (isText(node2)) {
|
|
36644
|
+
result = new Text2(node2.data);
|
|
36645
|
+
} else if (isComment(node2)) {
|
|
36646
|
+
result = new Comment2(node2.data);
|
|
36647
|
+
} else if (isTag(node2)) {
|
|
36648
|
+
var children = recursive ? cloneChildren(node2.children) : [];
|
|
36649
|
+
var clone_1 = new Element2(node2.name, __assign2({}, node2.attribs), children);
|
|
36650
|
+
children.forEach(function(child) {
|
|
36651
|
+
return child.parent = clone_1;
|
|
36652
|
+
});
|
|
36653
|
+
if (node2.namespace != null) {
|
|
36654
|
+
clone_1.namespace = node2.namespace;
|
|
36655
|
+
}
|
|
36656
|
+
if (node2["x-attribsNamespace"]) {
|
|
36657
|
+
clone_1["x-attribsNamespace"] = __assign2({}, node2["x-attribsNamespace"]);
|
|
36658
|
+
}
|
|
36659
|
+
if (node2["x-attribsPrefix"]) {
|
|
36660
|
+
clone_1["x-attribsPrefix"] = __assign2({}, node2["x-attribsPrefix"]);
|
|
36661
|
+
}
|
|
36662
|
+
result = clone_1;
|
|
36663
|
+
} else if (isCDATA(node2)) {
|
|
36664
|
+
var children = recursive ? cloneChildren(node2.children) : [];
|
|
36665
|
+
var clone_2 = new NodeWithChildren(domelementtype_1.ElementType.CDATA, children);
|
|
36666
|
+
children.forEach(function(child) {
|
|
36667
|
+
return child.parent = clone_2;
|
|
36668
|
+
});
|
|
36669
|
+
result = clone_2;
|
|
36670
|
+
} else if (isDocument(node2)) {
|
|
36671
|
+
var children = recursive ? cloneChildren(node2.children) : [];
|
|
36672
|
+
var clone_3 = new Document(children);
|
|
36673
|
+
children.forEach(function(child) {
|
|
36674
|
+
return child.parent = clone_3;
|
|
36675
|
+
});
|
|
36676
|
+
if (node2["x-mode"]) {
|
|
36677
|
+
clone_3["x-mode"] = node2["x-mode"];
|
|
36678
|
+
}
|
|
36679
|
+
result = clone_3;
|
|
36680
|
+
} else if (isDirective(node2)) {
|
|
36681
|
+
var instruction = new ProcessingInstruction2(node2.name, node2.data);
|
|
36682
|
+
if (node2["x-name"] != null) {
|
|
36683
|
+
instruction["x-name"] = node2["x-name"];
|
|
36684
|
+
instruction["x-publicId"] = node2["x-publicId"];
|
|
36685
|
+
instruction["x-systemId"] = node2["x-systemId"];
|
|
36686
|
+
}
|
|
36687
|
+
result = instruction;
|
|
36688
|
+
} else {
|
|
36689
|
+
throw new Error("Not implemented yet: ".concat(node2.type));
|
|
36653
36690
|
}
|
|
36654
|
-
|
|
36655
|
-
|
|
36691
|
+
result.startIndex = node2.startIndex;
|
|
36692
|
+
result.endIndex = node2.endIndex;
|
|
36693
|
+
if (node2.sourceCodeLocation != null) {
|
|
36694
|
+
result.sourceCodeLocation = node2.sourceCodeLocation;
|
|
36656
36695
|
}
|
|
36657
|
-
result
|
|
36658
|
-
} else if (isCDATA(node2)) {
|
|
36659
|
-
var children = recursive ? cloneChildren(node2.children) : [];
|
|
36660
|
-
var clone_2 = new NodeWithChildren(domelementtype_1.ElementType.CDATA, children);
|
|
36661
|
-
children.forEach(function(child) {
|
|
36662
|
-
return child.parent = clone_2;
|
|
36663
|
-
});
|
|
36664
|
-
result = clone_2;
|
|
36665
|
-
} else if (isDocument(node2)) {
|
|
36666
|
-
var children = recursive ? cloneChildren(node2.children) : [];
|
|
36667
|
-
var clone_3 = new Document(children);
|
|
36668
|
-
children.forEach(function(child) {
|
|
36669
|
-
return child.parent = clone_3;
|
|
36670
|
-
});
|
|
36671
|
-
if (node2["x-mode"]) {
|
|
36672
|
-
clone_3["x-mode"] = node2["x-mode"];
|
|
36673
|
-
}
|
|
36674
|
-
result = clone_3;
|
|
36675
|
-
} else if (isDirective(node2)) {
|
|
36676
|
-
var instruction = new ProcessingInstruction$1(node2.name, node2.data);
|
|
36677
|
-
if (node2["x-name"] != null) {
|
|
36678
|
-
instruction["x-name"] = node2["x-name"];
|
|
36679
|
-
instruction["x-publicId"] = node2["x-publicId"];
|
|
36680
|
-
instruction["x-systemId"] = node2["x-systemId"];
|
|
36681
|
-
}
|
|
36682
|
-
result = instruction;
|
|
36683
|
-
} else {
|
|
36684
|
-
throw new Error("Not implemented yet: ".concat(node2.type));
|
|
36685
|
-
}
|
|
36686
|
-
result.startIndex = node2.startIndex;
|
|
36687
|
-
result.endIndex = node2.endIndex;
|
|
36688
|
-
if (node2.sourceCodeLocation != null) {
|
|
36689
|
-
result.sourceCodeLocation = node2.sourceCodeLocation;
|
|
36696
|
+
return result;
|
|
36690
36697
|
}
|
|
36691
|
-
|
|
36692
|
-
|
|
36693
|
-
|
|
36694
|
-
|
|
36695
|
-
|
|
36696
|
-
|
|
36697
|
-
|
|
36698
|
-
|
|
36699
|
-
|
|
36700
|
-
|
|
36698
|
+
node$1.cloneNode = cloneNode;
|
|
36699
|
+
function cloneChildren(childs) {
|
|
36700
|
+
var children = childs.map(function(child) {
|
|
36701
|
+
return cloneNode(child, true);
|
|
36702
|
+
});
|
|
36703
|
+
for (var i2 = 1; i2 < children.length; i2++) {
|
|
36704
|
+
children[i2].prev = children[i2 - 1];
|
|
36705
|
+
children[i2 - 1].next = children[i2];
|
|
36706
|
+
}
|
|
36707
|
+
return children;
|
|
36701
36708
|
}
|
|
36702
|
-
return
|
|
36709
|
+
return node$1;
|
|
36703
36710
|
}
|
|
36704
36711
|
var constants$1 = constants$2;
|
|
36705
|
-
var domhandler =
|
|
36712
|
+
var domhandler = requireNode();
|
|
36706
36713
|
var CASE_SENSITIVE_TAG_NAMES = constants$1.CASE_SENSITIVE_TAG_NAMES;
|
|
36707
36714
|
var Comment = domhandler.Comment;
|
|
36708
36715
|
var Element$1 = domhandler.Element;
|
|
@@ -36924,9 +36931,9 @@ function requireLib() {
|
|
|
36924
36931
|
};
|
|
36925
36932
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
36926
36933
|
exports2.DomHandler = void 0;
|
|
36927
|
-
var
|
|
36928
|
-
var node_1 =
|
|
36929
|
-
__exportStar(
|
|
36934
|
+
var domelementtype_1 = requireLib$1();
|
|
36935
|
+
var node_1 = requireNode();
|
|
36936
|
+
__exportStar(requireNode(), exports2);
|
|
36930
36937
|
var reWhitespace2 = /\s+/g;
|
|
36931
36938
|
var defaultOpts = {
|
|
36932
36939
|
normalizeWhitespace: false,
|
|
@@ -36987,7 +36994,7 @@ function requireLib() {
|
|
|
36987
36994
|
this.elementCB(elem);
|
|
36988
36995
|
};
|
|
36989
36996
|
DomHandler2.prototype.onopentag = function(name, attribs) {
|
|
36990
|
-
var type = this.options.xmlMode ?
|
|
36997
|
+
var type = this.options.xmlMode ? domelementtype_1.ElementType.Tag : void 0;
|
|
36991
36998
|
var element = new node_1.Element(name, attribs, void 0, type);
|
|
36992
36999
|
this.addNode(element);
|
|
36993
37000
|
this.tagStack.push(element);
|
|
@@ -36995,7 +37002,7 @@ function requireLib() {
|
|
|
36995
37002
|
DomHandler2.prototype.ontext = function(data2) {
|
|
36996
37003
|
var normalizeWhitespace = this.options.normalizeWhitespace;
|
|
36997
37004
|
var lastNode = this.lastNode;
|
|
36998
|
-
if (lastNode && lastNode.type ===
|
|
37005
|
+
if (lastNode && lastNode.type === domelementtype_1.ElementType.Text) {
|
|
36999
37006
|
if (normalizeWhitespace) {
|
|
37000
37007
|
lastNode.data = (lastNode.data + data2).replace(reWhitespace2, " ");
|
|
37001
37008
|
} else {
|
|
@@ -37014,7 +37021,7 @@ function requireLib() {
|
|
|
37014
37021
|
}
|
|
37015
37022
|
};
|
|
37016
37023
|
DomHandler2.prototype.oncomment = function(data2) {
|
|
37017
|
-
if (this.lastNode && this.lastNode.type ===
|
|
37024
|
+
if (this.lastNode && this.lastNode.type === domelementtype_1.ElementType.Comment) {
|
|
37018
37025
|
this.lastNode.data += data2;
|
|
37019
37026
|
return;
|
|
37020
37027
|
}
|
|
@@ -37027,7 +37034,7 @@ function requireLib() {
|
|
|
37027
37034
|
};
|
|
37028
37035
|
DomHandler2.prototype.oncdatastart = function() {
|
|
37029
37036
|
var text2 = new node_1.Text("");
|
|
37030
|
-
var node2 = new node_1.NodeWithChildren(
|
|
37037
|
+
var node2 = new node_1.NodeWithChildren(domelementtype_1.ElementType.CDATA, [text2]);
|
|
37031
37038
|
this.addNode(node2);
|
|
37032
37039
|
text2.parent = node2;
|
|
37033
37040
|
this.lastNode = text2;
|
|
@@ -39035,16 +39042,15 @@ License: MIT
|
|
|
39035
39042
|
})(papaparse_min);
|
|
39036
39043
|
var papaparse_minExports = papaparse_min.exports;
|
|
39037
39044
|
const Papa = /* @__PURE__ */ getDefaultExportFromCjs(papaparse_minExports);
|
|
39045
|
+
var m$1 = ReactDOM__default;
|
|
39046
|
+
if (process.env.NODE_ENV === "production") {
|
|
39047
|
+
m$1.createRoot;
|
|
39048
|
+
m$1.hydrateRoot;
|
|
39049
|
+
} else {
|
|
39050
|
+
m$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
39051
|
+
}
|
|
39038
39052
|
const checkUserRole = (p_user, p_role) => {
|
|
39039
|
-
|
|
39040
|
-
if (p_user === null) {
|
|
39041
|
-
return false;
|
|
39042
|
-
}
|
|
39043
|
-
const userRole = ((_b = (_a = p_user == null ? void 0 : p_user.appUser) == null ? void 0 : _a.roles) == null ? void 0 : _b.length) ? p_user.appUser.roles : ["user"];
|
|
39044
|
-
if (userRole) {
|
|
39045
|
-
return userRole.includes(p_role);
|
|
39046
|
-
}
|
|
39047
|
-
return false;
|
|
39053
|
+
return true;
|
|
39048
39054
|
};
|
|
39049
39055
|
const autoFormatValue = (p_value) => {
|
|
39050
39056
|
let r_value = p_value;
|
|
@@ -39135,15 +39141,18 @@ const updateObjectByPath = (data2, path, value) => {
|
|
|
39135
39141
|
const convertHandlebarsTemplate = (template2, fullPath, data2) => {
|
|
39136
39142
|
function removeSpecificBackPaths(str, number) {
|
|
39137
39143
|
let count2 = 0;
|
|
39138
|
-
str = str.replace(
|
|
39139
|
-
|
|
39140
|
-
|
|
39141
|
-
|
|
39142
|
-
|
|
39144
|
+
str = str.replace(
|
|
39145
|
+
/\{\{\s*(?:\.\/)*((?:\.\.\/)+)[^}]*\}\}/g,
|
|
39146
|
+
(match2, backPaths) => {
|
|
39147
|
+
if (backPaths.match(/\.\.\//g).length === number) {
|
|
39148
|
+
if (count2 < 1) {
|
|
39149
|
+
count2++;
|
|
39150
|
+
return "";
|
|
39151
|
+
}
|
|
39143
39152
|
}
|
|
39153
|
+
return match2;
|
|
39144
39154
|
}
|
|
39145
|
-
|
|
39146
|
-
});
|
|
39155
|
+
);
|
|
39147
39156
|
return str;
|
|
39148
39157
|
}
|
|
39149
39158
|
const pathSegments = fullPath.split(".");
|
|
@@ -39161,19 +39170,27 @@ const convertHandlebarsTemplate = (template2, fullPath, data2) => {
|
|
|
39161
39170
|
aliasMap[`../`.repeat(pathSegments.length - 1 - i2)] = `${alias}.`;
|
|
39162
39171
|
}
|
|
39163
39172
|
} else {
|
|
39164
|
-
convertedTemplate = removeSpecificBackPaths(
|
|
39173
|
+
convertedTemplate = removeSpecificBackPaths(
|
|
39174
|
+
convertedTemplate,
|
|
39175
|
+
i2 - validPathSegments.length
|
|
39176
|
+
);
|
|
39165
39177
|
}
|
|
39166
39178
|
}
|
|
39167
|
-
convertedTemplate = convertedTemplate.replace(
|
|
39168
|
-
|
|
39169
|
-
|
|
39170
|
-
|
|
39171
|
-
|
|
39179
|
+
convertedTemplate = convertedTemplate.replace(
|
|
39180
|
+
/{{+[^{}]+}}+/g,
|
|
39181
|
+
function(match2) {
|
|
39182
|
+
return match2.replace(/(\.\.\/)+/g, function(contextPath) {
|
|
39183
|
+
for (const [key3, value] of Object.entries(aliasMap).sort(
|
|
39184
|
+
(a4, b2) => b2[0].length - a4[0].length
|
|
39185
|
+
)) {
|
|
39186
|
+
if (contextPath === key3) {
|
|
39187
|
+
return value;
|
|
39188
|
+
}
|
|
39172
39189
|
}
|
|
39173
|
-
|
|
39174
|
-
|
|
39175
|
-
}
|
|
39176
|
-
|
|
39190
|
+
return contextPath;
|
|
39191
|
+
});
|
|
39192
|
+
}
|
|
39193
|
+
);
|
|
39177
39194
|
let withBlocks = "";
|
|
39178
39195
|
currentPath = "";
|
|
39179
39196
|
for (let i2 = 0; i2 < validPathSegments.length; i2++) {
|
|
@@ -39298,16 +39315,22 @@ const testValue = (operator, testFieldValue, expectedValue) => {
|
|
|
39298
39315
|
return (Array.isArray(formatedTestFieldValue) ? formatedTestFieldValue : [formatedTestFieldValue]).some((value) => formatedExpectedValue == null ? void 0 : formatedExpectedValue.includes(value));
|
|
39299
39316
|
case "ncontains":
|
|
39300
39317
|
if (Array.isArray(formatedTestFieldValue) && Array.isArray(formatedExpectedValue)) {
|
|
39301
|
-
if (formatedTestFieldValue.some(
|
|
39318
|
+
if (formatedTestFieldValue.some(
|
|
39319
|
+
(value) => formatedExpectedValue.includes(value)
|
|
39320
|
+
)) {
|
|
39302
39321
|
return false;
|
|
39303
39322
|
}
|
|
39304
39323
|
} else if (Array.isArray(formatedExpectedValue)) {
|
|
39305
|
-
if (formatedExpectedValue.every(
|
|
39324
|
+
if (formatedExpectedValue.every(
|
|
39325
|
+
(value) => !formatedTestFieldValue.includes(value)
|
|
39326
|
+
)) {
|
|
39306
39327
|
return false;
|
|
39307
39328
|
}
|
|
39308
39329
|
} else {
|
|
39309
39330
|
if (Array.isArray(formatedTestFieldValue)) {
|
|
39310
|
-
if (formatedTestFieldValue.every(
|
|
39331
|
+
if (formatedTestFieldValue.every(
|
|
39332
|
+
(value) => !value.includes(formatedExpectedValue)
|
|
39333
|
+
)) {
|
|
39311
39334
|
return false;
|
|
39312
39335
|
}
|
|
39313
39336
|
} else {
|
|
@@ -39319,11 +39342,15 @@ const testValue = (operator, testFieldValue, expectedValue) => {
|
|
|
39319
39342
|
return true;
|
|
39320
39343
|
case "containsAll":
|
|
39321
39344
|
if (Array.isArray(formatedTestFieldValue) && Array.isArray(formatedExpectedValue)) {
|
|
39322
|
-
if (!formatedExpectedValue.every(
|
|
39345
|
+
if (!formatedExpectedValue.every(
|
|
39346
|
+
(value) => formatedTestFieldValue.includes(value)
|
|
39347
|
+
)) {
|
|
39323
39348
|
return false;
|
|
39324
39349
|
}
|
|
39325
39350
|
} else if (Array.isArray(formatedExpectedValue)) {
|
|
39326
|
-
if (!formatedExpectedValue.every(
|
|
39351
|
+
if (!formatedExpectedValue.every(
|
|
39352
|
+
(value) => formatedTestFieldValue.includes(value)
|
|
39353
|
+
)) {
|
|
39327
39354
|
return false;
|
|
39328
39355
|
}
|
|
39329
39356
|
} else {
|
|
@@ -39335,7 +39362,11 @@ const testValue = (operator, testFieldValue, expectedValue) => {
|
|
|
39335
39362
|
}
|
|
39336
39363
|
return true;
|
|
39337
39364
|
default:
|
|
39338
|
-
console.log(
|
|
39365
|
+
console.log(
|
|
39366
|
+
`Operator ${operator} is not recognized.`,
|
|
39367
|
+
testFieldValue,
|
|
39368
|
+
expectedValue
|
|
39369
|
+
);
|
|
39339
39370
|
return false;
|
|
39340
39371
|
}
|
|
39341
39372
|
};
|
|
@@ -39442,24 +39473,17 @@ const getHandlebars = (formManager = {}, history2, currentData = {}) => {
|
|
|
39442
39473
|
Handlebars$1.registerHelper("Link", function(val1, val2) {
|
|
39443
39474
|
const tagId = "link_" + v4();
|
|
39444
39475
|
setTimeout(() => {
|
|
39445
|
-
|
|
39446
|
-
|
|
39447
|
-
|
|
39448
|
-
|
|
39449
|
-
|
|
39450
|
-
|
|
39451
|
-
|
|
39452
|
-
|
|
39453
|
-
children: val2
|
|
39454
|
-
}
|
|
39455
|
-
),
|
|
39456
|
-
document.getElementById(tagId)
|
|
39457
|
-
);
|
|
39476
|
+
const element = document.getElementById(tagId);
|
|
39477
|
+
if (element) {
|
|
39478
|
+
element.innerHTML = `<a href="${val1}">${val2}</a>`;
|
|
39479
|
+
element.querySelector("a").addEventListener("click", (e2) => {
|
|
39480
|
+
e2.preventDefault();
|
|
39481
|
+
window.history.pushState({}, "", val1);
|
|
39482
|
+
window.dispatchEvent(new PopStateEvent("popstate"));
|
|
39483
|
+
});
|
|
39458
39484
|
}
|
|
39459
39485
|
}, 500);
|
|
39460
|
-
return new Handlebars$1.SafeString(
|
|
39461
|
-
"<span id='" + tagId + "'>" + val2 + "</span>"
|
|
39462
|
-
);
|
|
39486
|
+
return new Handlebars$1.SafeString(`<span id="${tagId}">${val2}</span>`);
|
|
39463
39487
|
});
|
|
39464
39488
|
return Handlebars$1;
|
|
39465
39489
|
};
|
|
@@ -39748,7 +39772,7 @@ const Field = forwardRef(({ field, children }, ref2) => {
|
|
|
39748
39772
|
var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
39749
39773
|
const [renderCounter, setRenderCounter] = useState(0);
|
|
39750
39774
|
let previousFocusedElement = null;
|
|
39751
|
-
const isUserAdmin = checkUserRole(field.formManager.options.user
|
|
39775
|
+
const isUserAdmin = checkUserRole(field.formManager.options.user);
|
|
39752
39776
|
useImperativeHandle(ref2, () => ({
|
|
39753
39777
|
updateField: () => {
|
|
39754
39778
|
previousFocusedElement = document.activeElement;
|
|
@@ -39824,14 +39848,13 @@ class TypeDefault {
|
|
|
39824
39848
|
this.formManager.onFocus(this, e2);
|
|
39825
39849
|
});
|
|
39826
39850
|
__publicField(this, "onChange", (value) => {
|
|
39827
|
-
console.log(this, "change");
|
|
39828
39851
|
this.formManager.onChange(this, value);
|
|
39829
39852
|
this.change(value);
|
|
39830
39853
|
});
|
|
39831
39854
|
/**
|
|
39832
39855
|
* Executes actions on form fields based on a JSON configuration.
|
|
39833
39856
|
* Currently supports clearing values of specified fields.
|
|
39834
|
-
*
|
|
39857
|
+
*
|
|
39835
39858
|
* @param {any} value - Currently unused. Intended for future use to pass additional data for actions.
|
|
39836
39859
|
*/
|
|
39837
39860
|
__publicField(this, "executeActions", (new_value) => {
|
|
@@ -39855,9 +39878,15 @@ class TypeDefault {
|
|
|
39855
39878
|
const fieldIdentifier = pathSegments.shift();
|
|
39856
39879
|
const specificPathInField = pathSegments.join("/");
|
|
39857
39880
|
if (targetPath && ((_b = (_a2 = this.formManager) == null ? void 0 : _a2.fieldsByPath) == null ? void 0 : _b[fieldIdentifier])) {
|
|
39858
|
-
const fieldValue2 = {
|
|
39881
|
+
const fieldValue2 = {
|
|
39882
|
+
...this.formManager.fieldsByPath[fieldIdentifier].getValue()
|
|
39883
|
+
};
|
|
39859
39884
|
if (fieldValue2) {
|
|
39860
|
-
const newValue = setValueFromPath(
|
|
39885
|
+
const newValue = setValueFromPath(
|
|
39886
|
+
fieldValue2,
|
|
39887
|
+
specificPathInField,
|
|
39888
|
+
null
|
|
39889
|
+
);
|
|
39861
39890
|
this.formManager.fieldsByPath[fieldIdentifier].updateField();
|
|
39862
39891
|
this.formManager.fieldsByPath[fieldIdentifier].change(newValue);
|
|
39863
39892
|
}
|
|
@@ -39963,10 +39992,18 @@ class TypeDefault {
|
|
|
39963
39992
|
};
|
|
39964
39993
|
});
|
|
39965
39994
|
const Handlebars2 = getHandlebars();
|
|
39966
|
-
return /* @__PURE__ */ jsx$2(React__default.Fragment, { children: /* @__PURE__ */ jsxs(
|
|
39967
|
-
|
|
39968
|
-
|
|
39969
|
-
|
|
39995
|
+
return /* @__PURE__ */ jsx$2(React__default.Fragment, { children: /* @__PURE__ */ jsxs(
|
|
39996
|
+
Field,
|
|
39997
|
+
{
|
|
39998
|
+
ref: childRef,
|
|
39999
|
+
field: this,
|
|
40000
|
+
children: [
|
|
40001
|
+
/* @__PURE__ */ jsx$2(Component2, { ...this }),
|
|
40002
|
+
this.param.info && /* @__PURE__ */ jsx$2("p", { className: "field-info", children: formatText(Handlebars2.compile(this.param.info)()) })
|
|
40003
|
+
]
|
|
40004
|
+
},
|
|
40005
|
+
this.uniqueId + "__" + this.param.format
|
|
40006
|
+
) });
|
|
39970
40007
|
});
|
|
39971
40008
|
const uniqueId = v4();
|
|
39972
40009
|
this.refreshData = Date.now();
|
|
@@ -75633,7 +75670,7 @@ const defaultColumn = {
|
|
|
75633
75670
|
getCellComponent: (formManager, item, colName, column2, i2) => () => {
|
|
75634
75671
|
const columnPath = column2.path.replaceAll("/", "__");
|
|
75635
75672
|
const value = deepFind(item, column2.path.replaceAll("/", "__"));
|
|
75636
|
-
const handlebars2 = getHandlebars(formManager
|
|
75673
|
+
const handlebars2 = getHandlebars(formManager);
|
|
75637
75674
|
const pathArray = columnPath.split("__");
|
|
75638
75675
|
const othersValue = pathArray.length > 1 ? deepFind(item, columnPath.split("__")[0]) : item;
|
|
75639
75676
|
let displayCol = "";
|
|
@@ -100370,10 +100407,10 @@ var ace$3 = { exports: {} };
|
|
|
100370
100407
|
var EventEmitter = require2("./lib/event_emitter").EventEmitter;
|
|
100371
100408
|
var Range = require2("./range").Range;
|
|
100372
100409
|
var Anchor = require2("./anchor").Anchor;
|
|
100373
|
-
var
|
|
100410
|
+
var Document = (
|
|
100374
100411
|
/** @class */
|
|
100375
100412
|
function() {
|
|
100376
|
-
function
|
|
100413
|
+
function Document2(textOrLines) {
|
|
100377
100414
|
this.$lines = [""];
|
|
100378
100415
|
if (textOrLines.length === 0) {
|
|
100379
100416
|
this.$lines = [""];
|
|
@@ -100383,23 +100420,23 @@ var ace$3 = { exports: {} };
|
|
|
100383
100420
|
this.insert({ row: 0, column: 0 }, textOrLines);
|
|
100384
100421
|
}
|
|
100385
100422
|
}
|
|
100386
|
-
|
|
100423
|
+
Document2.prototype.setValue = function(text2) {
|
|
100387
100424
|
var len = this.getLength() - 1;
|
|
100388
100425
|
this.remove(new Range(0, 0, len, this.getLine(len).length));
|
|
100389
100426
|
this.insert({ row: 0, column: 0 }, text2 || "");
|
|
100390
100427
|
};
|
|
100391
|
-
|
|
100428
|
+
Document2.prototype.getValue = function() {
|
|
100392
100429
|
return this.getAllLines().join(this.getNewLineCharacter());
|
|
100393
100430
|
};
|
|
100394
|
-
|
|
100431
|
+
Document2.prototype.createAnchor = function(row, column2) {
|
|
100395
100432
|
return new Anchor(this, row, column2);
|
|
100396
100433
|
};
|
|
100397
|
-
|
|
100434
|
+
Document2.prototype.$detectNewLine = function(text2) {
|
|
100398
100435
|
var match2 = text2.match(/^.*?(\r\n|\r|\n)/m);
|
|
100399
100436
|
this.$autoNewLine = match2 ? match2[1] : "\n";
|
|
100400
100437
|
this._signal("changeNewLineMode");
|
|
100401
100438
|
};
|
|
100402
|
-
|
|
100439
|
+
Document2.prototype.getNewLineCharacter = function() {
|
|
100403
100440
|
switch (this.$newLineMode) {
|
|
100404
100441
|
case "windows":
|
|
100405
100442
|
return "\r\n";
|
|
@@ -100409,34 +100446,34 @@ var ace$3 = { exports: {} };
|
|
|
100409
100446
|
return this.$autoNewLine || "\n";
|
|
100410
100447
|
}
|
|
100411
100448
|
};
|
|
100412
|
-
|
|
100449
|
+
Document2.prototype.setNewLineMode = function(newLineMode) {
|
|
100413
100450
|
if (this.$newLineMode === newLineMode)
|
|
100414
100451
|
return;
|
|
100415
100452
|
this.$newLineMode = newLineMode;
|
|
100416
100453
|
this._signal("changeNewLineMode");
|
|
100417
100454
|
};
|
|
100418
|
-
|
|
100455
|
+
Document2.prototype.getNewLineMode = function() {
|
|
100419
100456
|
return this.$newLineMode;
|
|
100420
100457
|
};
|
|
100421
|
-
|
|
100458
|
+
Document2.prototype.isNewLine = function(text2) {
|
|
100422
100459
|
return text2 == "\r\n" || text2 == "\r" || text2 == "\n";
|
|
100423
100460
|
};
|
|
100424
|
-
|
|
100461
|
+
Document2.prototype.getLine = function(row) {
|
|
100425
100462
|
return this.$lines[row] || "";
|
|
100426
100463
|
};
|
|
100427
|
-
|
|
100464
|
+
Document2.prototype.getLines = function(firstRow, lastRow) {
|
|
100428
100465
|
return this.$lines.slice(firstRow, lastRow + 1);
|
|
100429
100466
|
};
|
|
100430
|
-
|
|
100467
|
+
Document2.prototype.getAllLines = function() {
|
|
100431
100468
|
return this.getLines(0, this.getLength());
|
|
100432
100469
|
};
|
|
100433
|
-
|
|
100470
|
+
Document2.prototype.getLength = function() {
|
|
100434
100471
|
return this.$lines.length;
|
|
100435
100472
|
};
|
|
100436
|
-
|
|
100473
|
+
Document2.prototype.getTextRange = function(range) {
|
|
100437
100474
|
return this.getLinesForRange(range).join(this.getNewLineCharacter());
|
|
100438
100475
|
};
|
|
100439
|
-
|
|
100476
|
+
Document2.prototype.getLinesForRange = function(range) {
|
|
100440
100477
|
var lines;
|
|
100441
100478
|
if (range.start.row === range.end.row) {
|
|
100442
100479
|
lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
|
|
@@ -100449,24 +100486,24 @@ var ace$3 = { exports: {} };
|
|
|
100449
100486
|
}
|
|
100450
100487
|
return lines;
|
|
100451
100488
|
};
|
|
100452
|
-
|
|
100489
|
+
Document2.prototype.insertLines = function(row, lines) {
|
|
100453
100490
|
console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
|
|
100454
100491
|
return this.insertFullLines(row, lines);
|
|
100455
100492
|
};
|
|
100456
|
-
|
|
100493
|
+
Document2.prototype.removeLines = function(firstRow, lastRow) {
|
|
100457
100494
|
console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
|
|
100458
100495
|
return this.removeFullLines(firstRow, lastRow);
|
|
100459
100496
|
};
|
|
100460
|
-
|
|
100497
|
+
Document2.prototype.insertNewLine = function(position3) {
|
|
100461
100498
|
console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
|
|
100462
100499
|
return this.insertMergedLines(position3, ["", ""]);
|
|
100463
100500
|
};
|
|
100464
|
-
|
|
100501
|
+
Document2.prototype.insert = function(position3, text2) {
|
|
100465
100502
|
if (this.getLength() <= 1)
|
|
100466
100503
|
this.$detectNewLine(text2);
|
|
100467
100504
|
return this.insertMergedLines(position3, this.$split(text2));
|
|
100468
100505
|
};
|
|
100469
|
-
|
|
100506
|
+
Document2.prototype.insertInLine = function(position3, text2) {
|
|
100470
100507
|
var start3 = this.clippedPos(position3.row, position3.column);
|
|
100471
100508
|
var end2 = this.pos(position3.row, position3.column + text2.length);
|
|
100472
100509
|
this.applyDelta({
|
|
@@ -100477,7 +100514,7 @@ var ace$3 = { exports: {} };
|
|
|
100477
100514
|
}, true);
|
|
100478
100515
|
return this.clonePos(end2);
|
|
100479
100516
|
};
|
|
100480
|
-
|
|
100517
|
+
Document2.prototype.clippedPos = function(row, column2) {
|
|
100481
100518
|
var length2 = this.getLength();
|
|
100482
100519
|
if (row === void 0) {
|
|
100483
100520
|
row = length2;
|
|
@@ -100493,13 +100530,13 @@ var ace$3 = { exports: {} };
|
|
|
100493
100530
|
column2 = Math.min(Math.max(column2, 0), line2.length);
|
|
100494
100531
|
return { row, column: column2 };
|
|
100495
100532
|
};
|
|
100496
|
-
|
|
100533
|
+
Document2.prototype.clonePos = function(pos) {
|
|
100497
100534
|
return { row: pos.row, column: pos.column };
|
|
100498
100535
|
};
|
|
100499
|
-
|
|
100536
|
+
Document2.prototype.pos = function(row, column2) {
|
|
100500
100537
|
return { row, column: column2 };
|
|
100501
100538
|
};
|
|
100502
|
-
|
|
100539
|
+
Document2.prototype.$clipPosition = function(position3) {
|
|
100503
100540
|
var length2 = this.getLength();
|
|
100504
100541
|
if (position3.row >= length2) {
|
|
100505
100542
|
position3.row = Math.max(0, length2 - 1);
|
|
@@ -100510,7 +100547,7 @@ var ace$3 = { exports: {} };
|
|
|
100510
100547
|
}
|
|
100511
100548
|
return position3;
|
|
100512
100549
|
};
|
|
100513
|
-
|
|
100550
|
+
Document2.prototype.insertFullLines = function(row, lines) {
|
|
100514
100551
|
row = Math.min(Math.max(row, 0), this.getLength());
|
|
100515
100552
|
var column2 = 0;
|
|
100516
100553
|
if (row < this.getLength()) {
|
|
@@ -100523,7 +100560,7 @@ var ace$3 = { exports: {} };
|
|
|
100523
100560
|
}
|
|
100524
100561
|
this.insertMergedLines({ row, column: column2 }, lines);
|
|
100525
100562
|
};
|
|
100526
|
-
|
|
100563
|
+
Document2.prototype.insertMergedLines = function(position3, lines) {
|
|
100527
100564
|
var start3 = this.clippedPos(position3.row, position3.column);
|
|
100528
100565
|
var end2 = {
|
|
100529
100566
|
row: start3.row + lines.length - 1,
|
|
@@ -100537,7 +100574,7 @@ var ace$3 = { exports: {} };
|
|
|
100537
100574
|
});
|
|
100538
100575
|
return this.clonePos(end2);
|
|
100539
100576
|
};
|
|
100540
|
-
|
|
100577
|
+
Document2.prototype.remove = function(range) {
|
|
100541
100578
|
var start3 = this.clippedPos(range.start.row, range.start.column);
|
|
100542
100579
|
var end2 = this.clippedPos(range.end.row, range.end.column);
|
|
100543
100580
|
this.applyDelta({
|
|
@@ -100548,7 +100585,7 @@ var ace$3 = { exports: {} };
|
|
|
100548
100585
|
});
|
|
100549
100586
|
return this.clonePos(start3);
|
|
100550
100587
|
};
|
|
100551
|
-
|
|
100588
|
+
Document2.prototype.removeInLine = function(row, startColumn, endColumn) {
|
|
100552
100589
|
var start3 = this.clippedPos(row, startColumn);
|
|
100553
100590
|
var end2 = this.clippedPos(row, endColumn);
|
|
100554
100591
|
this.applyDelta({
|
|
@@ -100559,7 +100596,7 @@ var ace$3 = { exports: {} };
|
|
|
100559
100596
|
}, true);
|
|
100560
100597
|
return this.clonePos(start3);
|
|
100561
100598
|
};
|
|
100562
|
-
|
|
100599
|
+
Document2.prototype.removeFullLines = function(firstRow, lastRow) {
|
|
100563
100600
|
firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
|
|
100564
100601
|
lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1);
|
|
100565
100602
|
var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
|
|
@@ -100578,7 +100615,7 @@ var ace$3 = { exports: {} };
|
|
|
100578
100615
|
});
|
|
100579
100616
|
return deletedLines;
|
|
100580
100617
|
};
|
|
100581
|
-
|
|
100618
|
+
Document2.prototype.removeNewLine = function(row) {
|
|
100582
100619
|
if (row < this.getLength() - 1 && row >= 0) {
|
|
100583
100620
|
this.applyDelta({
|
|
100584
100621
|
start: this.pos(row, this.getLine(row).length),
|
|
@@ -100588,7 +100625,7 @@ var ace$3 = { exports: {} };
|
|
|
100588
100625
|
});
|
|
100589
100626
|
}
|
|
100590
100627
|
};
|
|
100591
|
-
|
|
100628
|
+
Document2.prototype.replace = function(range, text2) {
|
|
100592
100629
|
if (!(range instanceof Range))
|
|
100593
100630
|
range = Range.fromPoints(range.start, range.end);
|
|
100594
100631
|
if (text2.length === 0 && range.isEmpty())
|
|
@@ -100604,17 +100641,17 @@ var ace$3 = { exports: {} };
|
|
|
100604
100641
|
}
|
|
100605
100642
|
return end2;
|
|
100606
100643
|
};
|
|
100607
|
-
|
|
100644
|
+
Document2.prototype.applyDeltas = function(deltas) {
|
|
100608
100645
|
for (var i2 = 0; i2 < deltas.length; i2++) {
|
|
100609
100646
|
this.applyDelta(deltas[i2]);
|
|
100610
100647
|
}
|
|
100611
100648
|
};
|
|
100612
|
-
|
|
100649
|
+
Document2.prototype.revertDeltas = function(deltas) {
|
|
100613
100650
|
for (var i2 = deltas.length - 1; i2 >= 0; i2--) {
|
|
100614
100651
|
this.revertDelta(deltas[i2]);
|
|
100615
100652
|
}
|
|
100616
100653
|
};
|
|
100617
|
-
|
|
100654
|
+
Document2.prototype.applyDelta = function(delta, doNotValidate) {
|
|
100618
100655
|
var isInsert = delta.action == "insert";
|
|
100619
100656
|
if (isInsert ? delta.lines.length <= 1 && !delta.lines[0] : !Range.comparePoints(delta.start, delta.end)) {
|
|
100620
100657
|
return;
|
|
@@ -100626,13 +100663,13 @@ var ace$3 = { exports: {} };
|
|
|
100626
100663
|
this._signal("change", delta);
|
|
100627
100664
|
}
|
|
100628
100665
|
};
|
|
100629
|
-
|
|
100666
|
+
Document2.prototype.$safeApplyDelta = function(delta) {
|
|
100630
100667
|
var docLength = this.$lines.length;
|
|
100631
100668
|
if (delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength || delta.action == "insert" && delta.start.row <= docLength) {
|
|
100632
100669
|
this.applyDelta(delta);
|
|
100633
100670
|
}
|
|
100634
100671
|
};
|
|
100635
|
-
|
|
100672
|
+
Document2.prototype.$splitAndapplyLargeDelta = function(delta, MAX) {
|
|
100636
100673
|
var lines = delta.lines;
|
|
100637
100674
|
var l2 = lines.length - MAX + 1;
|
|
100638
100675
|
var row = delta.start.row;
|
|
@@ -100653,7 +100690,7 @@ var ace$3 = { exports: {} };
|
|
|
100653
100690
|
delta.start.column = column2;
|
|
100654
100691
|
this.applyDelta(delta, true);
|
|
100655
100692
|
};
|
|
100656
|
-
|
|
100693
|
+
Document2.prototype.revertDelta = function(delta) {
|
|
100657
100694
|
this.$safeApplyDelta({
|
|
100658
100695
|
start: this.clonePos(delta.start),
|
|
100659
100696
|
end: this.clonePos(delta.end),
|
|
@@ -100661,7 +100698,7 @@ var ace$3 = { exports: {} };
|
|
|
100661
100698
|
lines: delta.lines.slice()
|
|
100662
100699
|
});
|
|
100663
100700
|
};
|
|
100664
|
-
|
|
100701
|
+
Document2.prototype.indexToPosition = function(index2, startRow) {
|
|
100665
100702
|
var lines = this.$lines || this.getAllLines();
|
|
100666
100703
|
var newlineLength = this.getNewLineCharacter().length;
|
|
100667
100704
|
for (var i2 = startRow || 0, l2 = lines.length; i2 < l2; i2++) {
|
|
@@ -100671,7 +100708,7 @@ var ace$3 = { exports: {} };
|
|
|
100671
100708
|
}
|
|
100672
100709
|
return { row: l2 - 1, column: index2 + lines[l2 - 1].length + newlineLength };
|
|
100673
100710
|
};
|
|
100674
|
-
|
|
100711
|
+
Document2.prototype.positionToIndex = function(pos, startRow) {
|
|
100675
100712
|
var lines = this.$lines || this.getAllLines();
|
|
100676
100713
|
var newlineLength = this.getNewLineCharacter().length;
|
|
100677
100714
|
var index2 = 0;
|
|
@@ -100680,16 +100717,16 @@ var ace$3 = { exports: {} };
|
|
|
100680
100717
|
index2 += lines[i2].length + newlineLength;
|
|
100681
100718
|
return index2 + pos.column;
|
|
100682
100719
|
};
|
|
100683
|
-
|
|
100720
|
+
Document2.prototype.$split = function(text2) {
|
|
100684
100721
|
return text2.split(/\r\n|\r|\n/);
|
|
100685
100722
|
};
|
|
100686
|
-
return
|
|
100723
|
+
return Document2;
|
|
100687
100724
|
}()
|
|
100688
100725
|
);
|
|
100689
|
-
|
|
100690
|
-
|
|
100691
|
-
oop.implement(
|
|
100692
|
-
exports3.Document =
|
|
100726
|
+
Document.prototype.$autoNewLine = "";
|
|
100727
|
+
Document.prototype.$newLineMode = "auto";
|
|
100728
|
+
oop.implement(Document.prototype, EventEmitter);
|
|
100729
|
+
exports3.Document = Document;
|
|
100693
100730
|
});
|
|
100694
100731
|
ace.define("ace/background_tokenizer", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter"], function(require2, exports3, module3) {
|
|
100695
100732
|
var oop = require2("./lib/oop");
|
|
@@ -102815,7 +102852,7 @@ var ace$3 = { exports: {} };
|
|
|
102815
102852
|
var Selection = require2("./selection").Selection;
|
|
102816
102853
|
var TextMode = require2("./mode/text").Mode;
|
|
102817
102854
|
var Range = require2("./range").Range;
|
|
102818
|
-
var
|
|
102855
|
+
var Document = require2("./document").Document;
|
|
102819
102856
|
var BackgroundTokenizer = require2("./background_tokenizer").BackgroundTokenizer;
|
|
102820
102857
|
var SearchHighlight = require2("./search_highlight").SearchHighlight;
|
|
102821
102858
|
var UndoManager = require2("./undomanager").UndoManager;
|
|
@@ -102842,7 +102879,7 @@ var ace$3 = { exports: {} };
|
|
|
102842
102879
|
this.on("changeFold", this.onChangeFold.bind(this));
|
|
102843
102880
|
this.$onChange = this.onChange.bind(this);
|
|
102844
102881
|
if (typeof text2 != "object" || !text2.getLine)
|
|
102845
|
-
text2 = new
|
|
102882
|
+
text2 = new Document(text2);
|
|
102846
102883
|
this.setDocument(text2);
|
|
102847
102884
|
this.selection = new Selection(this);
|
|
102848
102885
|
this.$bidiHandler = new BidiHandler(this);
|
|
@@ -118515,10 +118552,10 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118515
118552
|
var EventEmitter = require2("./lib/event_emitter").EventEmitter;
|
|
118516
118553
|
var Range = require2("./range").Range;
|
|
118517
118554
|
var Anchor = require2("./anchor").Anchor;
|
|
118518
|
-
var
|
|
118555
|
+
var Document = (
|
|
118519
118556
|
/** @class */
|
|
118520
118557
|
function() {
|
|
118521
|
-
function
|
|
118558
|
+
function Document2(textOrLines) {
|
|
118522
118559
|
this.$lines = [""];
|
|
118523
118560
|
if (textOrLines.length === 0) {
|
|
118524
118561
|
this.$lines = [""];
|
|
@@ -118528,23 +118565,23 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118528
118565
|
this.insert({ row: 0, column: 0 }, textOrLines);
|
|
118529
118566
|
}
|
|
118530
118567
|
}
|
|
118531
|
-
|
|
118568
|
+
Document2.prototype.setValue = function(text2) {
|
|
118532
118569
|
var len = this.getLength() - 1;
|
|
118533
118570
|
this.remove(new Range(0, 0, len, this.getLine(len).length));
|
|
118534
118571
|
this.insert({ row: 0, column: 0 }, text2 || "");
|
|
118535
118572
|
};
|
|
118536
|
-
|
|
118573
|
+
Document2.prototype.getValue = function() {
|
|
118537
118574
|
return this.getAllLines().join(this.getNewLineCharacter());
|
|
118538
118575
|
};
|
|
118539
|
-
|
|
118576
|
+
Document2.prototype.createAnchor = function(row, column2) {
|
|
118540
118577
|
return new Anchor(this, row, column2);
|
|
118541
118578
|
};
|
|
118542
|
-
|
|
118579
|
+
Document2.prototype.$detectNewLine = function(text2) {
|
|
118543
118580
|
var match2 = text2.match(/^.*?(\r\n|\r|\n)/m);
|
|
118544
118581
|
this.$autoNewLine = match2 ? match2[1] : "\n";
|
|
118545
118582
|
this._signal("changeNewLineMode");
|
|
118546
118583
|
};
|
|
118547
|
-
|
|
118584
|
+
Document2.prototype.getNewLineCharacter = function() {
|
|
118548
118585
|
switch (this.$newLineMode) {
|
|
118549
118586
|
case "windows":
|
|
118550
118587
|
return "\r\n";
|
|
@@ -118554,34 +118591,34 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118554
118591
|
return this.$autoNewLine || "\n";
|
|
118555
118592
|
}
|
|
118556
118593
|
};
|
|
118557
|
-
|
|
118594
|
+
Document2.prototype.setNewLineMode = function(newLineMode) {
|
|
118558
118595
|
if (this.$newLineMode === newLineMode)
|
|
118559
118596
|
return;
|
|
118560
118597
|
this.$newLineMode = newLineMode;
|
|
118561
118598
|
this._signal("changeNewLineMode");
|
|
118562
118599
|
};
|
|
118563
|
-
|
|
118600
|
+
Document2.prototype.getNewLineMode = function() {
|
|
118564
118601
|
return this.$newLineMode;
|
|
118565
118602
|
};
|
|
118566
|
-
|
|
118603
|
+
Document2.prototype.isNewLine = function(text2) {
|
|
118567
118604
|
return text2 == "\r\n" || text2 == "\r" || text2 == "\n";
|
|
118568
118605
|
};
|
|
118569
|
-
|
|
118606
|
+
Document2.prototype.getLine = function(row) {
|
|
118570
118607
|
return this.$lines[row] || "";
|
|
118571
118608
|
};
|
|
118572
|
-
|
|
118609
|
+
Document2.prototype.getLines = function(firstRow, lastRow) {
|
|
118573
118610
|
return this.$lines.slice(firstRow, lastRow + 1);
|
|
118574
118611
|
};
|
|
118575
|
-
|
|
118612
|
+
Document2.prototype.getAllLines = function() {
|
|
118576
118613
|
return this.getLines(0, this.getLength());
|
|
118577
118614
|
};
|
|
118578
|
-
|
|
118615
|
+
Document2.prototype.getLength = function() {
|
|
118579
118616
|
return this.$lines.length;
|
|
118580
118617
|
};
|
|
118581
|
-
|
|
118618
|
+
Document2.prototype.getTextRange = function(range) {
|
|
118582
118619
|
return this.getLinesForRange(range).join(this.getNewLineCharacter());
|
|
118583
118620
|
};
|
|
118584
|
-
|
|
118621
|
+
Document2.prototype.getLinesForRange = function(range) {
|
|
118585
118622
|
var lines;
|
|
118586
118623
|
if (range.start.row === range.end.row) {
|
|
118587
118624
|
lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
|
|
@@ -118594,24 +118631,24 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118594
118631
|
}
|
|
118595
118632
|
return lines;
|
|
118596
118633
|
};
|
|
118597
|
-
|
|
118634
|
+
Document2.prototype.insertLines = function(row, lines) {
|
|
118598
118635
|
console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
|
|
118599
118636
|
return this.insertFullLines(row, lines);
|
|
118600
118637
|
};
|
|
118601
|
-
|
|
118638
|
+
Document2.prototype.removeLines = function(firstRow, lastRow) {
|
|
118602
118639
|
console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
|
|
118603
118640
|
return this.removeFullLines(firstRow, lastRow);
|
|
118604
118641
|
};
|
|
118605
|
-
|
|
118642
|
+
Document2.prototype.insertNewLine = function(position3) {
|
|
118606
118643
|
console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
|
|
118607
118644
|
return this.insertMergedLines(position3, ["", ""]);
|
|
118608
118645
|
};
|
|
118609
|
-
|
|
118646
|
+
Document2.prototype.insert = function(position3, text2) {
|
|
118610
118647
|
if (this.getLength() <= 1)
|
|
118611
118648
|
this.$detectNewLine(text2);
|
|
118612
118649
|
return this.insertMergedLines(position3, this.$split(text2));
|
|
118613
118650
|
};
|
|
118614
|
-
|
|
118651
|
+
Document2.prototype.insertInLine = function(position3, text2) {
|
|
118615
118652
|
var start3 = this.clippedPos(position3.row, position3.column);
|
|
118616
118653
|
var end2 = this.pos(position3.row, position3.column + text2.length);
|
|
118617
118654
|
this.applyDelta({
|
|
@@ -118622,7 +118659,7 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118622
118659
|
}, true);
|
|
118623
118660
|
return this.clonePos(end2);
|
|
118624
118661
|
};
|
|
118625
|
-
|
|
118662
|
+
Document2.prototype.clippedPos = function(row, column2) {
|
|
118626
118663
|
var length2 = this.getLength();
|
|
118627
118664
|
if (row === void 0) {
|
|
118628
118665
|
row = length2;
|
|
@@ -118638,13 +118675,13 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118638
118675
|
column2 = Math.min(Math.max(column2, 0), line2.length);
|
|
118639
118676
|
return { row, column: column2 };
|
|
118640
118677
|
};
|
|
118641
|
-
|
|
118678
|
+
Document2.prototype.clonePos = function(pos) {
|
|
118642
118679
|
return { row: pos.row, column: pos.column };
|
|
118643
118680
|
};
|
|
118644
|
-
|
|
118681
|
+
Document2.prototype.pos = function(row, column2) {
|
|
118645
118682
|
return { row, column: column2 };
|
|
118646
118683
|
};
|
|
118647
|
-
|
|
118684
|
+
Document2.prototype.$clipPosition = function(position3) {
|
|
118648
118685
|
var length2 = this.getLength();
|
|
118649
118686
|
if (position3.row >= length2) {
|
|
118650
118687
|
position3.row = Math.max(0, length2 - 1);
|
|
@@ -118655,7 +118692,7 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118655
118692
|
}
|
|
118656
118693
|
return position3;
|
|
118657
118694
|
};
|
|
118658
|
-
|
|
118695
|
+
Document2.prototype.insertFullLines = function(row, lines) {
|
|
118659
118696
|
row = Math.min(Math.max(row, 0), this.getLength());
|
|
118660
118697
|
var column2 = 0;
|
|
118661
118698
|
if (row < this.getLength()) {
|
|
@@ -118668,7 +118705,7 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118668
118705
|
}
|
|
118669
118706
|
this.insertMergedLines({ row, column: column2 }, lines);
|
|
118670
118707
|
};
|
|
118671
|
-
|
|
118708
|
+
Document2.prototype.insertMergedLines = function(position3, lines) {
|
|
118672
118709
|
var start3 = this.clippedPos(position3.row, position3.column);
|
|
118673
118710
|
var end2 = {
|
|
118674
118711
|
row: start3.row + lines.length - 1,
|
|
@@ -118682,7 +118719,7 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118682
118719
|
});
|
|
118683
118720
|
return this.clonePos(end2);
|
|
118684
118721
|
};
|
|
118685
|
-
|
|
118722
|
+
Document2.prototype.remove = function(range) {
|
|
118686
118723
|
var start3 = this.clippedPos(range.start.row, range.start.column);
|
|
118687
118724
|
var end2 = this.clippedPos(range.end.row, range.end.column);
|
|
118688
118725
|
this.applyDelta({
|
|
@@ -118693,7 +118730,7 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118693
118730
|
});
|
|
118694
118731
|
return this.clonePos(start3);
|
|
118695
118732
|
};
|
|
118696
|
-
|
|
118733
|
+
Document2.prototype.removeInLine = function(row, startColumn, endColumn) {
|
|
118697
118734
|
var start3 = this.clippedPos(row, startColumn);
|
|
118698
118735
|
var end2 = this.clippedPos(row, endColumn);
|
|
118699
118736
|
this.applyDelta({
|
|
@@ -118704,7 +118741,7 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118704
118741
|
}, true);
|
|
118705
118742
|
return this.clonePos(start3);
|
|
118706
118743
|
};
|
|
118707
|
-
|
|
118744
|
+
Document2.prototype.removeFullLines = function(firstRow, lastRow) {
|
|
118708
118745
|
firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
|
|
118709
118746
|
lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1);
|
|
118710
118747
|
var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
|
|
@@ -118723,7 +118760,7 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118723
118760
|
});
|
|
118724
118761
|
return deletedLines;
|
|
118725
118762
|
};
|
|
118726
|
-
|
|
118763
|
+
Document2.prototype.removeNewLine = function(row) {
|
|
118727
118764
|
if (row < this.getLength() - 1 && row >= 0) {
|
|
118728
118765
|
this.applyDelta({
|
|
118729
118766
|
start: this.pos(row, this.getLine(row).length),
|
|
@@ -118733,7 +118770,7 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118733
118770
|
});
|
|
118734
118771
|
}
|
|
118735
118772
|
};
|
|
118736
|
-
|
|
118773
|
+
Document2.prototype.replace = function(range, text2) {
|
|
118737
118774
|
if (!(range instanceof Range))
|
|
118738
118775
|
range = Range.fromPoints(range.start, range.end);
|
|
118739
118776
|
if (text2.length === 0 && range.isEmpty())
|
|
@@ -118749,17 +118786,17 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118749
118786
|
}
|
|
118750
118787
|
return end2;
|
|
118751
118788
|
};
|
|
118752
|
-
|
|
118789
|
+
Document2.prototype.applyDeltas = function(deltas) {
|
|
118753
118790
|
for (var i2 = 0; i2 < deltas.length; i2++) {
|
|
118754
118791
|
this.applyDelta(deltas[i2]);
|
|
118755
118792
|
}
|
|
118756
118793
|
};
|
|
118757
|
-
|
|
118794
|
+
Document2.prototype.revertDeltas = function(deltas) {
|
|
118758
118795
|
for (var i2 = deltas.length - 1; i2 >= 0; i2--) {
|
|
118759
118796
|
this.revertDelta(deltas[i2]);
|
|
118760
118797
|
}
|
|
118761
118798
|
};
|
|
118762
|
-
|
|
118799
|
+
Document2.prototype.applyDelta = function(delta, doNotValidate) {
|
|
118763
118800
|
var isInsert = delta.action == "insert";
|
|
118764
118801
|
if (isInsert ? delta.lines.length <= 1 && !delta.lines[0] : !Range.comparePoints(delta.start, delta.end)) {
|
|
118765
118802
|
return;
|
|
@@ -118771,13 +118808,13 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118771
118808
|
this._signal("change", delta);
|
|
118772
118809
|
}
|
|
118773
118810
|
};
|
|
118774
|
-
|
|
118811
|
+
Document2.prototype.$safeApplyDelta = function(delta) {
|
|
118775
118812
|
var docLength = this.$lines.length;
|
|
118776
118813
|
if (delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength || delta.action == "insert" && delta.start.row <= docLength) {
|
|
118777
118814
|
this.applyDelta(delta);
|
|
118778
118815
|
}
|
|
118779
118816
|
};
|
|
118780
|
-
|
|
118817
|
+
Document2.prototype.$splitAndapplyLargeDelta = function(delta, MAX) {
|
|
118781
118818
|
var lines = delta.lines;
|
|
118782
118819
|
var l2 = lines.length - MAX + 1;
|
|
118783
118820
|
var row = delta.start.row;
|
|
@@ -118798,7 +118835,7 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118798
118835
|
delta.start.column = column2;
|
|
118799
118836
|
this.applyDelta(delta, true);
|
|
118800
118837
|
};
|
|
118801
|
-
|
|
118838
|
+
Document2.prototype.revertDelta = function(delta) {
|
|
118802
118839
|
this.$safeApplyDelta({
|
|
118803
118840
|
start: this.clonePos(delta.start),
|
|
118804
118841
|
end: this.clonePos(delta.end),
|
|
@@ -118806,7 +118843,7 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118806
118843
|
lines: delta.lines.slice()
|
|
118807
118844
|
});
|
|
118808
118845
|
};
|
|
118809
|
-
|
|
118846
|
+
Document2.prototype.indexToPosition = function(index2, startRow) {
|
|
118810
118847
|
var lines = this.$lines || this.getAllLines();
|
|
118811
118848
|
var newlineLength = this.getNewLineCharacter().length;
|
|
118812
118849
|
for (var i2 = startRow || 0, l2 = lines.length; i2 < l2; i2++) {
|
|
@@ -118816,7 +118853,7 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118816
118853
|
}
|
|
118817
118854
|
return { row: l2 - 1, column: index2 + lines[l2 - 1].length + newlineLength };
|
|
118818
118855
|
};
|
|
118819
|
-
|
|
118856
|
+
Document2.prototype.positionToIndex = function(pos, startRow) {
|
|
118820
118857
|
var lines = this.$lines || this.getAllLines();
|
|
118821
118858
|
var newlineLength = this.getNewLineCharacter().length;
|
|
118822
118859
|
var index2 = 0;
|
|
@@ -118825,16 +118862,16 @@ ace.define("ace/document", [], function(require2, exports2, module2) {
|
|
|
118825
118862
|
index2 += lines[i2].length + newlineLength;
|
|
118826
118863
|
return index2 + pos.column;
|
|
118827
118864
|
};
|
|
118828
|
-
|
|
118865
|
+
Document2.prototype.$split = function(text2) {
|
|
118829
118866
|
return text2.split(/\r\n|\r|\n/);
|
|
118830
118867
|
};
|
|
118831
|
-
return
|
|
118868
|
+
return Document2;
|
|
118832
118869
|
}()
|
|
118833
118870
|
);
|
|
118834
|
-
|
|
118835
|
-
|
|
118836
|
-
oop.implement(
|
|
118837
|
-
exports2.Document =
|
|
118871
|
+
Document.prototype.$autoNewLine = "";
|
|
118872
|
+
Document.prototype.$newLineMode = "auto";
|
|
118873
|
+
oop.implement(Document.prototype, EventEmitter);
|
|
118874
|
+
exports2.Document = Document;
|
|
118838
118875
|
});
|
|
118839
118876
|
ace.define("ace/lib/deep_copy", [], function(require2, exports2, module2) {
|
|
118840
118877
|
exports2.deepCopy = function deepCopy(obj) {
|
|
@@ -119009,11 +119046,11 @@ ace.define("ace/lib/lang", [], function(require2, exports2, module2) {
|
|
|
119009
119046
|
};
|
|
119010
119047
|
});
|
|
119011
119048
|
ace.define("ace/worker/mirror", [], function(require2, exports2, module2) {
|
|
119012
|
-
var
|
|
119049
|
+
var Document = require2("../document").Document;
|
|
119013
119050
|
var lang = require2("../lib/lang");
|
|
119014
119051
|
var Mirror = exports2.Mirror = function(sender) {
|
|
119015
119052
|
this.sender = sender;
|
|
119016
|
-
var doc = this.doc = new
|
|
119053
|
+
var doc = this.doc = new Document("");
|
|
119017
119054
|
var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
|
|
119018
119055
|
var _self = this;
|
|
119019
119056
|
sender.on("change", function(e2) {
|
|
@@ -148801,7 +148838,9 @@ class FormManager {
|
|
|
148801
148838
|
if (typeof f2 === "function") {
|
|
148802
148839
|
f2(value);
|
|
148803
148840
|
} else {
|
|
148804
|
-
console.log(
|
|
148841
|
+
console.log(
|
|
148842
|
+
`not a function on this valueListenerHandler on this id ${field == null ? void 0 : field.id} with this value ${value}`
|
|
148843
|
+
);
|
|
148805
148844
|
}
|
|
148806
148845
|
});
|
|
148807
148846
|
}
|
|
@@ -148819,7 +148858,6 @@ class FormManager {
|
|
|
148819
148858
|
});
|
|
148820
148859
|
}
|
|
148821
148860
|
});
|
|
148822
|
-
// loop on all fields in fieldsByNode and get value if visible ( recursive )
|
|
148823
148861
|
__publicField(this, "getVisibleValue", (field = {
|
|
148824
148862
|
id: "__result__",
|
|
148825
148863
|
children: this.formElements.map((o2) => this.fieldsByPath[o2.id]),
|
|
@@ -148875,7 +148913,8 @@ class FormManager {
|
|
|
148875
148913
|
this.formElements = this.loadJsonForm(_.cloneDeep(p_form));
|
|
148876
148914
|
this.formData = p_data;
|
|
148877
148915
|
this.displayOnChange = false;
|
|
148878
|
-
this.events = {}
|
|
148916
|
+
this.events = {};
|
|
148917
|
+
this.options = options2;
|
|
148879
148918
|
this.conditionListener = {};
|
|
148880
148919
|
this.validityListener = {};
|
|
148881
148920
|
this.changeValueListener = {};
|
|
@@ -148919,7 +148958,6 @@ class FormManager {
|
|
|
148919
148958
|
});
|
|
148920
148959
|
}
|
|
148921
148960
|
}
|
|
148922
|
-
// use for repeater
|
|
148923
148961
|
createDynamicField(field, p_position, p_data = null) {
|
|
148924
148962
|
const uniqueId = v4();
|
|
148925
148963
|
this.dynamicPathPart[uniqueId] = p_position;
|
|
@@ -148980,11 +149018,6 @@ class FormManager {
|
|
|
148980
149018
|
delete this.dynamicPathPart[p_itemId];
|
|
148981
149019
|
delete this.fields[p_itemId];
|
|
148982
149020
|
}
|
|
148983
|
-
//
|
|
148984
|
-
// removeDynamicField(p_uniqueId){
|
|
148985
|
-
// this.dynamicPathPart[p_uniqueId] =false;
|
|
148986
|
-
// }
|
|
148987
|
-
//
|
|
148988
149021
|
getField(p_item, v_item, custom_id, parentUid) {
|
|
148989
149022
|
if (typeField[v_item.format]) {
|
|
148990
149023
|
const currentTypeField = new typeField[v_item.format](
|
|
@@ -149009,7 +149042,6 @@ class FormManager {
|
|
|
149009
149042
|
return false;
|
|
149010
149043
|
}
|
|
149011
149044
|
}
|
|
149012
|
-
// get field path like path for data
|
|
149013
149045
|
getNormalizedFieldPath(path) {
|
|
149014
149046
|
const normalizedFieldPath = [];
|
|
149015
149047
|
var paths = ("" + path).split("__");
|
|
@@ -149126,24 +149158,27 @@ class FormManager {
|
|
|
149126
149158
|
return newField;
|
|
149127
149159
|
}) : [];
|
|
149128
149160
|
}
|
|
149129
|
-
initValueForm() {
|
|
149130
|
-
}
|
|
149131
149161
|
resolveFieldRefs(formJson, fieldsRefJson) {
|
|
149132
149162
|
const resolveRefsInForm = (formItem) => {
|
|
149133
149163
|
if (formItem.fieldRef && fieldsRefJson[formItem.fieldRef]) {
|
|
149134
|
-
return
|
|
149164
|
+
return fieldsRefJson[formItem.fieldRef] ? _.merge(fieldsRefJson[formItem.fieldRef], _.cloneDeep(formItem)) : formItem;
|
|
149135
149165
|
}
|
|
149136
149166
|
if (formItem.content && Array.isArray(formItem.content)) {
|
|
149137
|
-
formItem.content = formItem.content.map(
|
|
149167
|
+
formItem.content = formItem.content.map(
|
|
149168
|
+
(childItem) => resolveRefsInForm(childItem)
|
|
149169
|
+
);
|
|
149138
149170
|
}
|
|
149139
149171
|
if (formItem.forms && Array.isArray(formItem.forms.content)) {
|
|
149140
|
-
formItem.forms.content = formItem.forms.content.map(
|
|
149172
|
+
formItem.forms.content = formItem.forms.content.map(
|
|
149173
|
+
(childItem) => resolveRefsInForm(childItem)
|
|
149174
|
+
);
|
|
149141
149175
|
}
|
|
149142
149176
|
return formItem;
|
|
149143
149177
|
};
|
|
149144
149178
|
return formJson.map((item) => resolveRefsInForm(item));
|
|
149145
149179
|
}
|
|
149146
149180
|
loadJsonForm(p_data) {
|
|
149181
|
+
console.log(p_data);
|
|
149147
149182
|
if (!p_data) {
|
|
149148
149183
|
return {};
|
|
149149
149184
|
}
|
|
@@ -149153,51 +149188,16 @@ class FormManager {
|
|
|
149153
149188
|
this.loadJsonFormNode(p_data.fieldsRef[key3]);
|
|
149154
149189
|
});
|
|
149155
149190
|
}
|
|
149191
|
+
console.log(p_data);
|
|
149192
|
+
console.log(Array.isArray(p_data == null ? void 0 : p_data.form));
|
|
149156
149193
|
const formData = Array.isArray(p_data == null ? void 0 : p_data.form) ? p_data.form : Array.isArray(p_data == null ? void 0 : p_data.content) ? p_data.content : Array.isArray(p_data) ? p_data : [];
|
|
149194
|
+
console.log(formData);
|
|
149157
149195
|
for (let i2 = 0; i2 < formData.length; i2++) {
|
|
149158
149196
|
formData[i2] = this.loadJsonFormNode(formData[i2], true);
|
|
149159
149197
|
}
|
|
149198
|
+
console.log(formData);
|
|
149160
149199
|
return formData;
|
|
149161
149200
|
}
|
|
149162
|
-
// getMaxContentLevel(p_item) {
|
|
149163
|
-
// let maxContentLevel = 0;
|
|
149164
|
-
// let rootItem = p_item;
|
|
149165
|
-
// // Vérifier si l'élément est un tableau
|
|
149166
|
-
// if (p_item && Array.isArray(p_item)) {
|
|
149167
|
-
// p_item.forEach((item) => {
|
|
149168
|
-
// if (item?.content) {
|
|
149169
|
-
// // Appeler récursivement pour trouver le niveau maximum
|
|
149170
|
-
// const currentContent = this.getMaxContentLevel(item.content);
|
|
149171
|
-
// if (currentContent.lvl > maxContentLevel) {
|
|
149172
|
-
// maxContentLevel = currentContent.lvl;
|
|
149173
|
-
// rootItem = item;
|
|
149174
|
-
// }
|
|
149175
|
-
// }
|
|
149176
|
-
// });
|
|
149177
|
-
// }
|
|
149178
|
-
// // Retourner le niveau de contenu maximum et l'élément racine associé
|
|
149179
|
-
// return { lvl: maxContentLevel + 1, rootItem: rootItem };
|
|
149180
|
-
// }
|
|
149181
|
-
// getMaxDepthOfContent(content) {
|
|
149182
|
-
// let maxDepth = 0;
|
|
149183
|
-
// const traverse = (items, depth = 1) => {
|
|
149184
|
-
// if (Array.isArray(items)) {
|
|
149185
|
-
// items.forEach((item) => {
|
|
149186
|
-
// if (item?.content && Array.isArray(item.content)) {
|
|
149187
|
-
// traverse(item.content, depth + 1);
|
|
149188
|
-
// }
|
|
149189
|
-
// if (item?.forms?.content && Array.isArray(item.forms.content)) {
|
|
149190
|
-
// traverse(item.forms.content, depth + 1);
|
|
149191
|
-
// }
|
|
149192
|
-
// });
|
|
149193
|
-
// }
|
|
149194
|
-
// if (depth > maxDepth) {
|
|
149195
|
-
// maxDepth = depth;
|
|
149196
|
-
// }
|
|
149197
|
-
// };
|
|
149198
|
-
// traverse(content);
|
|
149199
|
-
// return maxDepth;
|
|
149200
|
-
// }
|
|
149201
149201
|
/**
|
|
149202
149202
|
* Charge et fusionne un nœud JSON représentant un formulaire ou une structure de données.
|
|
149203
149203
|
*
|
|
@@ -149208,41 +149208,58 @@ class FormManager {
|
|
|
149208
149208
|
* @returns {Object} - L'objet `p_item` potentiellement modifié après traitement.
|
|
149209
149209
|
*/
|
|
149210
149210
|
loadJsonFormNode(p_item, test = false) {
|
|
149211
|
-
var _a, _b, _c;
|
|
149211
|
+
var _a, _b, _c, _d;
|
|
149212
149212
|
if (p_item == null ? void 0 : p_item._fieldRefLinked) {
|
|
149213
149213
|
return p_item;
|
|
149214
149214
|
}
|
|
149215
149215
|
if (p_item.fieldRef) {
|
|
149216
|
+
console.log("fieldRef", p_item.fieldRef);
|
|
149216
149217
|
if ((_a = this.fieldsRef) == null ? void 0 : _a[p_item.fieldRef]) {
|
|
149217
|
-
p_item.id
|
|
149218
|
-
p_item = _.merge(
|
|
149219
|
-
|
|
149220
|
-
|
|
149218
|
+
p_item.id = (p_item == null ? void 0 : p_item.id) ?? p_item.fieldRef;
|
|
149219
|
+
p_item = _.merge(
|
|
149220
|
+
p_item,
|
|
149221
|
+
this.fieldsRef[p_item.fieldRef],
|
|
149222
|
+
_.cloneDeep(p_item)
|
|
149223
|
+
);
|
|
149224
|
+
const refContent = console.log("********", p_item.id, "********");
|
|
149225
|
+
if (refContent) {
|
|
149226
|
+
if (((_b = p_item.content) == null ? void 0 : _b.length) && Array.isArray(p_item.content)) {
|
|
149227
|
+
refContent.forEach((refItem, index2) => {
|
|
149228
|
+
const item = p_item.content.find((item2) => item2.id === refItem.id);
|
|
149229
|
+
const itemIndex = p_item.content.findIndex(
|
|
149230
|
+
(item2) => item2.id === refItem.id
|
|
149231
|
+
);
|
|
149232
|
+
if (item) {
|
|
149233
|
+
p_item.content[itemIndex] = _.merge(
|
|
149234
|
+
item,
|
|
149235
|
+
refItem,
|
|
149236
|
+
_.cloneDeep(item)
|
|
149237
|
+
);
|
|
149238
|
+
} else {
|
|
149239
|
+
p_item.content.push(refItem);
|
|
149240
|
+
}
|
|
149241
|
+
});
|
|
149242
|
+
} else {
|
|
149243
|
+
p_item.content = this.fieldsRef[p_item.fieldRef].content;
|
|
149244
|
+
}
|
|
149245
|
+
}
|
|
149221
149246
|
} else {
|
|
149222
149247
|
console.log("error fieldRef " + p_item.fieldRef + " not found");
|
|
149223
149248
|
}
|
|
149224
|
-
|
|
149225
|
-
}
|
|
149226
|
-
if (p_item.fieldRef) {
|
|
149227
|
-
return p_item;
|
|
149249
|
+
p_item._fieldRefLinked = true;
|
|
149228
149250
|
}
|
|
149229
149251
|
if ((p_item == null ? void 0 : p_item.content) && Array.isArray(p_item.content)) {
|
|
149230
149252
|
p_item.content = p_item.content.map((item) => {
|
|
149231
|
-
return this.loadJsonFormNode(
|
|
149232
|
-
|
|
149233
|
-
|
|
149253
|
+
return this.loadJsonFormNode(item);
|
|
149254
|
+
});
|
|
149255
|
+
}
|
|
149256
|
+
if (((_c = p_item == null ? void 0 : p_item.forms) == null ? void 0 : _c.content) && Array.isArray((_d = p_item == null ? void 0 : p_item.forms) == null ? void 0 : _d.content)) {
|
|
149257
|
+
p_item.forms.content = p_item.forms.content.map((item) => {
|
|
149258
|
+
return this.loadJsonFormNode(item);
|
|
149234
149259
|
});
|
|
149235
|
-
} else {
|
|
149236
|
-
if (((_b = p_item == null ? void 0 : p_item.forms) == null ? void 0 : _b.content) && Array.isArray((_c = p_item == null ? void 0 : p_item.forms) == null ? void 0 : _c.content)) {
|
|
149237
|
-
p_item.forms.content = p_item.forms.content.map((item) => {
|
|
149238
|
-
return this.loadJsonFormNode(item);
|
|
149239
|
-
});
|
|
149240
|
-
}
|
|
149241
149260
|
}
|
|
149242
149261
|
return p_item;
|
|
149243
149262
|
}
|
|
149244
|
-
//initNodevValue: (p_node) => {},
|
|
149245
|
-
// check value of current field from validity param
|
|
149246
149263
|
checkValidity(item, p_TreeId = null, p_data = null) {
|
|
149247
149264
|
let resultCheckValidity = { type: "success", message: "" };
|
|
149248
149265
|
if (item["validity"] && Array.isArray(item["validity"]) && item["validity"].length) {
|
|
@@ -149292,8 +149309,7 @@ class FormManager {
|
|
|
149292
149309
|
resultCheckValidity = regex.test(testFieldValue) ? { type: "success", message: "" } : { type: "error", message: condition["message"] };
|
|
149293
149310
|
break;
|
|
149294
149311
|
case "mandatory":
|
|
149295
|
-
resultCheckValidity = testFieldValue !== "" && testFieldValue !== null && testFieldValue !== void 0 && testFieldValue !== false &&
|
|
149296
|
-
(typeof testFieldValue !== "object" || typeof testFieldValue === "object" && Object.keys(testFieldValue).length !== 0) ? { type: "success", message: "" } : { type: "error", message: condition["message"] };
|
|
149312
|
+
resultCheckValidity = testFieldValue !== "" && testFieldValue !== null && testFieldValue !== void 0 && testFieldValue !== false && (typeof testFieldValue !== "object" || typeof testFieldValue === "object" && Object.keys(testFieldValue).length !== 0) ? { type: "success", message: "" } : { type: "error", message: condition["message"] };
|
|
149297
149313
|
break;
|
|
149298
149314
|
case "compare":
|
|
149299
149315
|
resultCheckValidity = testValue(
|
|
@@ -149321,65 +149337,62 @@ class FormManager {
|
|
|
149321
149337
|
this.validityResult[item.id] = resultCheckValidity;
|
|
149322
149338
|
return resultCheckValidity;
|
|
149323
149339
|
}
|
|
149324
|
-
// check only first condition
|
|
149325
149340
|
checkCondition(item, p_TreeId = null, p_data = null) {
|
|
149326
|
-
|
|
149327
|
-
|
|
149328
|
-
|
|
149329
|
-
|
|
149330
|
-
|
|
149331
|
-
|
|
149332
|
-
|
|
149333
|
-
|
|
149334
|
-
|
|
149341
|
+
const evaluateCondition = (condition, treeId) => {
|
|
149342
|
+
const operator = condition["operator"];
|
|
149343
|
+
const fieldPath = getFormatedPath(treeId, condition["field"]);
|
|
149344
|
+
const fieldValue2 = this.getFieldValueByPath(fieldPath);
|
|
149345
|
+
let testFieldValue = fieldValue2 != null ? fieldValue2 : "";
|
|
149346
|
+
testFieldValue = autoFormatValue(testFieldValue);
|
|
149347
|
+
const expectedValue = condition["value"];
|
|
149348
|
+
return testValue(operator, testFieldValue, expectedValue);
|
|
149349
|
+
};
|
|
149350
|
+
const evaluateGroup = (group, treeId) => {
|
|
149351
|
+
var _a;
|
|
149352
|
+
let result = true;
|
|
149353
|
+
console.log("group length", group.conditions.length);
|
|
149354
|
+
(_a = group == null ? void 0 : group.conditions) == null ? void 0 : _a.forEach((subCondition, subConditionIndex) => {
|
|
149355
|
+
let subResult = false;
|
|
149356
|
+
console.log("subCondition", subCondition);
|
|
149357
|
+
if (subCondition.conditions) {
|
|
149358
|
+
subResult = evaluateGroup(subCondition, treeId);
|
|
149359
|
+
console.log("subResult evaluate group", subResult);
|
|
149360
|
+
} else {
|
|
149361
|
+
subResult = evaluateCondition(subCondition, treeId);
|
|
149362
|
+
console.log("subResult evaluate conditions", subResult);
|
|
149335
149363
|
}
|
|
149336
|
-
|
|
149337
|
-
|
|
149338
|
-
const item_parent_value_treeId = item_parent_value_treeId_array.join("__");
|
|
149339
|
-
let fieldValue2 = null;
|
|
149340
|
-
fieldValue2 = this.getFieldValueByPath(
|
|
149341
|
-
getFormatedPath(item_parent_value_treeId, condition["field"])
|
|
149342
|
-
);
|
|
149343
|
-
const expectedValue = condition["value"];
|
|
149344
|
-
let testFieldValue = fieldValue2 != null && fieldValue2 !== void 0 ? fieldValue2 : "";
|
|
149345
|
-
testFieldValue = autoFormatValue(testFieldValue);
|
|
149346
|
-
if (resultCheckCondition === true) {
|
|
149347
|
-
switch (condition["type"]) {
|
|
149348
|
-
case "current_index":
|
|
149349
|
-
[
|
|
149350
|
-
...item_parent_value_treeId_array
|
|
149351
|
-
];
|
|
149352
|
-
const normalizedFieldPathArray = this.getNormalizedFieldPath(
|
|
149353
|
-
getFormatedPath(
|
|
149354
|
-
item_parent_value_treeId,
|
|
149355
|
-
(condition == null ? void 0 : condition["field"]) ?? ""
|
|
149356
|
-
)
|
|
149357
|
-
);
|
|
149358
|
-
const lastNumber = normalizedFieldPathArray.match(/\d+/g).pop();
|
|
149359
|
-
resultCheckCondition = testValue(
|
|
149360
|
-
operator,
|
|
149361
|
-
lastNumber,
|
|
149362
|
-
expectedValue
|
|
149363
|
-
);
|
|
149364
|
-
break;
|
|
149365
|
-
case "field_path":
|
|
149366
|
-
default:
|
|
149367
|
-
if (typeof fieldValue2 !== "undefined" && testFieldValue !== "") {
|
|
149368
|
-
resultCheckCondition = testValue(
|
|
149369
|
-
operator,
|
|
149370
|
-
testFieldValue,
|
|
149371
|
-
expectedValue
|
|
149372
|
-
);
|
|
149373
|
-
} else {
|
|
149374
|
-
resultCheckCondition = false;
|
|
149375
|
-
}
|
|
149376
|
-
}
|
|
149364
|
+
if (subConditionIndex === 0) {
|
|
149365
|
+
result = subResult;
|
|
149377
149366
|
} else {
|
|
149378
|
-
|
|
149367
|
+
console.log("-----" + group.subCondition);
|
|
149368
|
+
if (subCondition.logical_operator === "and") {
|
|
149369
|
+
console.log("and", result, subResult);
|
|
149370
|
+
result = result && subResult;
|
|
149371
|
+
console.log("for", result);
|
|
149372
|
+
} else if (subCondition.logical_operator === "or") {
|
|
149373
|
+
console.log("or", result, subResult);
|
|
149374
|
+
result = result || subResult;
|
|
149375
|
+
console.log("for", result);
|
|
149376
|
+
}
|
|
149379
149377
|
}
|
|
149380
149378
|
});
|
|
149379
|
+
console.log("group evaluate result", result);
|
|
149380
|
+
return result;
|
|
149381
|
+
};
|
|
149382
|
+
let item_parent_value_treeId_array = (p_TreeId === null ? item.id : p_TreeId).split("__");
|
|
149383
|
+
item_parent_value_treeId_array.pop();
|
|
149384
|
+
const item_parent_value_treeId = item_parent_value_treeId_array.join("__");
|
|
149385
|
+
console.log("item", item);
|
|
149386
|
+
const mainGroup = item.conditions && item.conditions.length > 0 ? { conditions: item.conditions } : null;
|
|
149387
|
+
if (mainGroup) {
|
|
149388
|
+
console.log("-------------------------------Start");
|
|
149389
|
+
const evaluateResult = evaluateGroup(mainGroup, item_parent_value_treeId);
|
|
149390
|
+
console.log(evaluateResult);
|
|
149391
|
+
console.log("-------------------------------End");
|
|
149392
|
+
return evaluateResult;
|
|
149393
|
+
} else {
|
|
149394
|
+
return true;
|
|
149381
149395
|
}
|
|
149382
|
-
return resultCheckCondition;
|
|
149383
149396
|
}
|
|
149384
149397
|
getValue() {
|
|
149385
149398
|
return this.formData;
|