mftsccs-browser 1.1.31-beta → 1.1.33-beta

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.
@@ -18145,6 +18145,56 @@ class BaseWidget extends _BaseObserver__WEBPACK_IMPORTED_MODULE_0__.BaseObserver
18145
18145
  }
18146
18146
 
18147
18147
 
18148
+ /***/ }),
18149
+
18150
+ /***/ "./src/Widgets/BuilderSpeceficFunctions.ts":
18151
+ /*!*************************************************!*\
18152
+ !*** ./src/Widgets/BuilderSpeceficFunctions.ts ***!
18153
+ \*************************************************/
18154
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
18155
+
18156
+ __webpack_require__.r(__webpack_exports__);
18157
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18158
+ /* harmony export */ TypeEditor: () => (/* binding */ TypeEditor)
18159
+ /* harmony export */ });
18160
+ function TypeEditor(event, that) {
18161
+ if (event) {
18162
+ const inputVal = document.querySelector("#widget-properties .flex-column");
18163
+ console.log("This is the input val container", inputVal, that, event);
18164
+ const existedInputEl = inputVal === null || inputVal === void 0 ? void 0 : inputVal.querySelectorAll("input");
18165
+ existedInputEl === null || existedInputEl === void 0 ? void 0 : existedInputEl.forEach((inputItem) => {
18166
+ inputItem === null || inputItem === void 0 ? void 0 : inputItem.remove();
18167
+ });
18168
+ const inputEl = document.createElement("input");
18169
+ inputEl.setAttribute("type", "text");
18170
+ inputEl.setAttribute("name", "input-widgetTypeValue");
18171
+ inputEl.setAttribute("of", that.elementIdentifier.toString());
18172
+ inputEl.setAttribute("class", "form-control");
18173
+ inputEl.setAttribute("id", "widgetType");
18174
+ if (that.widgetType) {
18175
+ inputEl.value = that.widgetType;
18176
+ }
18177
+ else {
18178
+ inputEl.setAttribute("placeholder", "e.g. the_entity");
18179
+ }
18180
+ let newThat = that;
18181
+ inputEl.onchange = function (event) {
18182
+ var _a;
18183
+ event.preventDefault();
18184
+ event.stopPropagation();
18185
+ //console.log("THAT ->", that);
18186
+ const inputValue = (_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value;
18187
+ newThat.widgetType = inputValue;
18188
+ //console.log("inputValue", inputValue);
18189
+ //that.setProperty(inputValue);
18190
+ newThat.componentDidMount();
18191
+ newThat.mountChildWidgets();
18192
+ };
18193
+ inputVal === null || inputVal === void 0 ? void 0 : inputVal.appendChild(inputEl);
18194
+ }
18195
+ }
18196
+
18197
+
18148
18198
  /***/ }),
18149
18199
 
18150
18200
  /***/ "./src/Widgets/BuilderStatefulWidget.ts":
@@ -18160,6 +18210,7 @@ __webpack_require__.r(__webpack_exports__);
18160
18210
  /* harmony import */ var _StatefulWidget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./StatefulWidget */ "./src/Widgets/StatefulWidget.ts");
18161
18211
  /* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../app */ "./src/app.ts");
18162
18212
  /* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ "./src/Services/Common/ErrorPosting.ts");
18213
+ /* harmony import */ var _BuilderSpeceficFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BuilderSpeceficFunctions */ "./src/Widgets/BuilderSpeceficFunctions.ts");
18163
18214
  var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
18164
18215
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18165
18216
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -18173,6 +18224,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
18173
18224
 
18174
18225
 
18175
18226
 
18227
+
18176
18228
  class BuilderStatefulWidget extends _StatefulWidget__WEBPACK_IMPORTED_MODULE_0__.StatefulWidget {
18177
18229
  constructor() {
18178
18230
  super(...arguments);
@@ -18264,51 +18316,6 @@ class BuilderStatefulWidget extends _StatefulWidget__WEBPACK_IMPORTED_MODULE_0__
18264
18316
  // Output: "the_element"
18265
18317
  const nextMatch = typeName === null || typeName === void 0 ? void 0 : typeName.match(/^([a-z0-9]+).*_([a-z0-9]+)$/i);
18266
18318
  const typevalueKey = nextMatch ? `${nextMatch[1]}_${nextMatch[2]}` : "";
18267
- // Output: "the_name"
18268
- // const profileData: any = await getLocalStorageProfileData();
18269
- // const token = profileData?.token;
18270
- // const userId = profileData?.userId;
18271
- // const compositionSerach: tsccs.SearchStructure = {
18272
- // type: "",
18273
- // search: "",
18274
- // // composition: "the_element",
18275
- // composition: mainComposition,
18276
- // internalComposition: "",
18277
- // userId: userId,
18278
- // inpage: 100,
18279
- // page: 1,
18280
- // auth: true,
18281
- // };
18282
- // let searchFirst = new tsccs.SearchQuery();
18283
- // // searchFirst.type = "the_element_name";
18284
- // // searchFirst.fullLinkers = ["the_element_name"];
18285
- // searchFirst.type = typeName;
18286
- // searchFirst.fullLinkers = [typeName];
18287
- // searchFirst.inpage = 100;
18288
- // const queryParams = [searchFirst];
18289
- // tsccs
18290
- // .GetLinkListListener(
18291
- // compositionSerach,
18292
- // queryParams,
18293
- // token,
18294
- // tsccs.NORMAL
18295
- // )
18296
- // .subscribe((output: any) => {
18297
- // if (output?.length) {
18298
- // const result = output?.map((item: any, index: number) => {
18299
- // const itemName =
18300
- // item[mainComposition][typeName]?.[0]?.[typevalueKey];
18301
- // return {
18302
- // id: index,
18303
- // name: itemName,
18304
- // text: itemName,
18305
- // };
18306
- // });
18307
- // this.typeValueList = result;
18308
- // resolve(this.typeValueList);
18309
- // return result;
18310
- // }
18311
- // });
18312
18319
  // NEW SEARCH WITH FILTER
18313
18320
  // filters
18314
18321
  let filters = [];
@@ -18336,8 +18343,6 @@ class BuilderStatefulWidget extends _StatefulWidget__WEBPACK_IMPORTED_MODULE_0__
18336
18343
  freeschemaQuery.outputFormat = _app__WEBPACK_IMPORTED_MODULE_1__.DATAID;
18337
18344
  (0,_app__WEBPACK_IMPORTED_MODULE_1__.SchemaQueryListener)(freeschemaQuery, "")
18338
18345
  .subscribe((output) => {
18339
- console.log("thgis is the output", output);
18340
- console.log("this is the typeValuekey", typevalueKey, typeName, mainComposition);
18341
18346
  if (output === null || output === void 0 ? void 0 : output.length) {
18342
18347
  const result = output === null || output === void 0 ? void 0 : output.map((item) => {
18343
18348
  var _a, _b, _c, _d, _e, _f, _g;
@@ -18370,11 +18375,12 @@ class BuilderStatefulWidget extends _StatefulWidget__WEBPACK_IMPORTED_MODULE_0__
18370
18375
  }
18371
18376
  mountChildWidgets() {
18372
18377
  return __awaiter(this, void 0, void 0, function* () {
18373
- const AsyncFunction = Object.getPrototypeOf(function () {
18374
- return __awaiter(this, void 0, void 0, function* () { });
18375
- }).constructor;
18376
- const renderOnmount = AsyncFunction("tsccs", this.mountChildWidgetsFunction);
18377
- renderOnmount.call(this, _app__WEBPACK_IMPORTED_MODULE_1__);
18378
+ const dynamicAsyncFunction = new Function("tsccs", `
18379
+ return (async function() {
18380
+ ${this.mountChildWidgetsFunction}
18381
+ }).call(this);
18382
+ `).bind(this);
18383
+ dynamicAsyncFunction(_app__WEBPACK_IMPORTED_MODULE_1__);
18378
18384
  });
18379
18385
  }
18380
18386
  setProperty(widgetTypeName) {
@@ -18390,49 +18396,7 @@ class BuilderStatefulWidget extends _StatefulWidget__WEBPACK_IMPORTED_MODULE_0__
18390
18396
  });
18391
18397
  }
18392
18398
  createTypeEditor(event) {
18393
- if (event) {
18394
- const inputVal = document.querySelector("#widget-properties .flex-column");
18395
- console.log("This is the input val container", inputVal);
18396
- const existedInputEl = inputVal === null || inputVal === void 0 ? void 0 : inputVal.querySelectorAll("input");
18397
- existedInputEl === null || existedInputEl === void 0 ? void 0 : existedInputEl.forEach((inputItem) => {
18398
- inputItem === null || inputItem === void 0 ? void 0 : inputItem.remove();
18399
- });
18400
- // const elementParent = event.target?.closest(".added-widget-container");
18401
- // const elementDivParent = event.target?.closest("div");
18402
- let typeValue = this.widgetType;
18403
- // if (elementParent) {
18404
- // typeValue = elementParent?.getAttribute("data-type-value");
18405
- // } else if (elementDivParent) {
18406
- // typeValue = elementDivParent?.getAttribute("data-type-value");
18407
- // }
18408
- const inputEl = document.createElement("input");
18409
- inputEl.setAttribute("type", "text");
18410
- inputEl.setAttribute("name", "input-widgetTypeValue");
18411
- inputEl.setAttribute("of", this.elementIdentifier.toString());
18412
- inputEl.setAttribute("class", "form-control");
18413
- inputEl.setAttribute("id", "widgetTypeValue");
18414
- if (typeValue) {
18415
- inputEl.value = this.widgetType;
18416
- }
18417
- else {
18418
- inputEl.setAttribute("placeholder", "e.g. the_entity_type");
18419
- }
18420
- let that = this;
18421
- inputEl.onchange = function (event) {
18422
- var _a;
18423
- event.preventDefault();
18424
- event.stopPropagation();
18425
- //console.log("THAT ->", that);
18426
- const inputValue = (_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value;
18427
- console.log("this is the input change", inputValue);
18428
- that.widgetType = inputValue;
18429
- //console.log("inputValue", inputValue);
18430
- //that.setProperty(inputValue);
18431
- that.componentDidMount();
18432
- that.mountChildWidgets();
18433
- };
18434
- inputVal === null || inputVal === void 0 ? void 0 : inputVal.appendChild(inputEl);
18435
- }
18399
+ (0,_BuilderSpeceficFunctions__WEBPACK_IMPORTED_MODULE_3__.TypeEditor)(event, this);
18436
18400
  }
18437
18401
  /**
18438
18402
  *
@@ -18450,7 +18414,7 @@ class BuilderStatefulWidget extends _StatefulWidget__WEBPACK_IMPORTED_MODULE_0__
18450
18414
  that.createTypeEditor(event);
18451
18415
  };
18452
18416
  this.element.id = this.createWidgetWrapperIdentifier();
18453
- this.element.className = "p-2";
18417
+ this.element.className = "p-2 mftsccs-marking-element";
18454
18418
  this.element.innerHTML = this.getHtml();
18455
18419
  parent.appendChild(this.element);
18456
18420
  this.childWidgetElement = this.getElementByClassName("added-widget-container");
@@ -18472,40 +18436,35 @@ class BuilderStatefulWidget extends _StatefulWidget__WEBPACK_IMPORTED_MODULE_0__
18472
18436
  * This function will be called after the component mounts.
18473
18437
  */
18474
18438
  componentDidMount() {
18475
- return __awaiter(this, void 0, void 0, function* () {
18476
- //console.log("onmountVal", onmountVal);
18477
- const dynamicAsyncFunction = new Function("tsccs", `
18439
+ //console.log("onmountVal", onmountVal);
18440
+ const dynamicAsyncFunction = new Function("tsccs", `
18478
18441
  return (async function() {
18479
- ${this.addEventFunction}
18442
+ ${this.componentDidMountFunction}
18480
18443
  }).call(this);
18481
18444
  `).bind(this);
18482
- dynamicAsyncFunction(_app__WEBPACK_IMPORTED_MODULE_1__);
18483
- // dynamicAsyncFunction(tsccs);
18484
- // const AsyncFunction = Object.getPrototypeOf(
18485
- // async function () {}
18486
- // ).constructor;
18487
- // const renderOnmount = AsyncFunction(
18488
- // "tsccs",
18489
- // this.componentDidMountFunction
18490
- // );
18491
- // renderOnmount.call(this, tsccs);
18492
- });
18445
+ dynamicAsyncFunction(_app__WEBPACK_IMPORTED_MODULE_1__);
18446
+ // dynamicAsyncFunction(tsccs);
18447
+ // const AsyncFunction = Object.getPrototypeOf(
18448
+ // async function () {}
18449
+ // ).constructor;
18450
+ // const renderOnmount = AsyncFunction(
18451
+ // "tsccs",
18452
+ // this.componentDidMountFunction
18453
+ // );
18454
+ // renderOnmount.call(this, tsccs);
18493
18455
  }
18494
18456
  addEvents() {
18495
- return __awaiter(this, void 0, void 0, function* () {
18496
- // const AsyncFunction = Object.getPrototypeOf(
18497
- // async function () {}
18498
- // ).constructor;
18499
- const dynamicAsyncFunction = new Function("tsccs", `
18457
+ // const AsyncFunction = Object.getPrototypeOf(
18458
+ // async function () {}
18459
+ // ).constructor;
18460
+ const dynamicAsyncFunction = new Function("tsccs", `
18500
18461
  return (async function() {
18501
18462
  ${this.addEventFunction}
18502
18463
  }).call(this);
18503
18464
  `).bind(this);
18504
- console.log("This is the async function", dynamicAsyncFunction);
18505
- dynamicAsyncFunction(_app__WEBPACK_IMPORTED_MODULE_1__);
18506
- // const renderOnmount = AsyncFunction("tsccs", this.addEventFunction);
18507
- // renderOnmount.call(this, tsccs);
18508
- });
18465
+ dynamicAsyncFunction(_app__WEBPACK_IMPORTED_MODULE_1__);
18466
+ // const renderOnmount = AsyncFunction("tsccs", this.addEventFunction);
18467
+ // renderOnmount.call(this, tsccs);
18509
18468
  }
18510
18469
  getWidgetClassFunction(widgetId) {
18511
18470
  return __awaiter(this, void 0, void 0, function* () {