@wavemaker/app-ng-runtime 12.0.0-next.45078 → 12.0.0-next.45081

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. app-ng-runtime/build-task/bundles/index.umd.js +8 -1
  2. app-ng-runtime/build-task/esm2022/data/form/form-field/form-field.build.mjs +9 -2
  3. app-ng-runtime/build-task/fesm2022/index.mjs +8 -1
  4. app-ng-runtime/build-task/fesm2022/index.mjs.map +1 -1
  5. app-ng-runtime/components/advanced/custom/bundles/index.umd.js +49 -12
  6. app-ng-runtime/components/advanced/custom/custom-widget-container/custom-widget-container.directive.d.ts +11 -4
  7. app-ng-runtime/components/advanced/custom/esm2022/custom-widget-container/custom-widget-container.directive.mjs +51 -11
  8. app-ng-runtime/components/advanced/custom/fesm2022/index.mjs +50 -10
  9. app-ng-runtime/components/advanced/custom/fesm2022/index.mjs.map +1 -1
  10. app-ng-runtime/components/base/bundles/index.umd.js +13 -3
  11. app-ng-runtime/components/base/esm2022/widgets/common/base/base.component.mjs +14 -4
  12. app-ng-runtime/components/base/esm2022/widgets/framework/property-change-handler.mjs +2 -2
  13. app-ng-runtime/components/base/fesm2022/index.mjs +14 -4
  14. app-ng-runtime/components/base/fesm2022/index.mjs.map +1 -1
  15. app-ng-runtime/components/base/widgets/common/base/base.component.d.ts +1 -0
  16. app-ng-runtime/components/basic/search/bundles/index.umd.js +36 -24
  17. app-ng-runtime/components/basic/search/esm2022/search.component.mjs +33 -24
  18. app-ng-runtime/components/basic/search/esm2022/search.props.mjs +5 -2
  19. app-ng-runtime/components/basic/search/fesm2022/index.mjs +36 -24
  20. app-ng-runtime/components/basic/search/fesm2022/index.mjs.map +1 -1
  21. app-ng-runtime/components/basic/search/search.component.d.ts +3 -0
  22. app-ng-runtime/components/data/form/bundles/index.umd.js +23 -11
  23. app-ng-runtime/components/data/form/esm2022/form-field/form-field.directive.mjs +24 -12
  24. app-ng-runtime/components/data/form/fesm2022/index.mjs +23 -11
  25. app-ng-runtime/components/data/form/fesm2022/index.mjs.map +1 -1
  26. app-ng-runtime/components/data/form/form-field/form-field.directive.d.ts +1 -0
  27. app-ng-runtime/components/input/default/base-form-custom.component.d.ts +2 -1
  28. app-ng-runtime/components/input/default/bundles/index.umd.js +13 -4
  29. app-ng-runtime/components/input/default/dataset-aware-form.component.d.ts +2 -2
  30. app-ng-runtime/components/input/default/esm2022/base-form-custom.component.mjs +6 -1
  31. app-ng-runtime/components/input/default/esm2022/checkboxset/checkboxset.component.mjs +3 -1
  32. app-ng-runtime/components/input/default/esm2022/dataset-aware-form.component.mjs +5 -5
  33. app-ng-runtime/components/input/default/esm2022/radioset/radioset.component.mjs +3 -1
  34. app-ng-runtime/components/input/default/fesm2022/index.mjs +13 -4
  35. app-ng-runtime/components/input/default/fesm2022/index.mjs.map +1 -1
  36. app-ng-runtime/core/bundles/index.umd.js +6 -6
  37. app-ng-runtime/core/enums/enums.d.ts +2 -2
  38. app-ng-runtime/core/esm2022/enums/enums.mjs +2 -2
  39. app-ng-runtime/core/esm2022/utils/build-utils.mjs +6 -6
  40. app-ng-runtime/core/fesm2022/index.mjs +6 -6
  41. app-ng-runtime/core/fesm2022/index.mjs.map +1 -1
  42. app-ng-runtime/package.json +1 -1
  43. app-ng-runtime/runtime/base/bundles/index.umd.js +9 -0
  44. app-ng-runtime/runtime/base/components/base-custom-widget.component.d.ts +2 -0
  45. app-ng-runtime/runtime/base/esm2022/components/base-custom-widget.component.mjs +10 -1
  46. app-ng-runtime/runtime/base/fesm2022/index.mjs +9 -0
  47. app-ng-runtime/runtime/base/fesm2022/index.mjs.map +1 -1
@@ -10,7 +10,7 @@ import { widgetIdGenerator } from '../../framework/widget-id-generator';
10
10
  import { DISPLAY_TYPE, EVENTS_MAP } from '../../framework/constants';
11
11
  import { WidgetProxyProvider } from '../../framework/widget-proxy-provider';
12
12
  import { getWatchIdentifier } from '../../../utils/widget-utils';
13
- import { camelCase, extend, forEach, isArray, isObject, join, map } from "lodash-es";
13
+ import { camelCase, extend, forEach, isArray, isObject, join, last, map } from "lodash-es";
14
14
  import * as i0 from "@angular/core";
15
15
  // Gets list of classes to add and remove and applies on the $el
16
16
  const updateClasses = (toAdd, toRemove, el) => {
@@ -137,6 +137,10 @@ export class BaseComponent {
137
137
  else {
138
138
  this.delayedInit = true;
139
139
  initPromise.then((resolveFn) => {
140
+ let formFieldCW = this.widgetSubType === 'wm-form-field-custom-widget', cw = this.widgetSubType.startsWith('wm-custom-');
141
+ if (formFieldCW || cw) {
142
+ this.customWidgetSubType = formFieldCW ? 'wm-form-field-' + last(this["formWidget"].config.widgetType.split('-')) : this["config"].widgetType;
143
+ }
140
144
  this.initWidget();
141
145
  this.setInitProps();
142
146
  resolveFn && resolveFn();
@@ -396,7 +400,7 @@ export class BaseComponent {
396
400
  this.initState.delete(propName);
397
401
  let viewParent = child ? child.widget.viewParent.viewParent : this.viewParent, context = child ? child.widget.context : this.context, widget = child ? child.widget : this.widget, isMuted = child ? child.widget.isMuted : this.isMuted, widgetProps = child ? child.widget.widgetProps : this.widgetProps, widgetId = child ? child.widget.widgetId : this.widgetId;
398
402
  this.registerDestroyListener($watch(expr, viewParent, context, nv => {
399
- if (propName.startsWith('base-'))
403
+ if (propName.startsWith('base-') && widget.updateData)
400
404
  widget.updateData(propName, nv);
401
405
  widget[propName] = nv;
402
406
  }, getWatchIdentifier(widgetId, propName), propName === 'datasource', widgetProps.get(propName), () => isMuted));
@@ -433,7 +437,7 @@ export class BaseComponent {
433
437
  const { 0: propName, 1: type, 2: meta, length } = attrName.split('.');
434
438
  if (type === 'bind') {
435
439
  // if the show property is bound, set the initial value to false
436
- if (propName === 'show') {
440
+ if (propName === 'show' && !this.widgetSubType.startsWith('wm-custom-')) {
437
441
  this.nativeElement.hidden = true;
438
442
  }
439
443
  this.processBindAttr(propName, attrValue, child);
@@ -507,6 +511,12 @@ export class BaseComponent {
507
511
  this.initState = new Map();
508
512
  // get the widget properties
509
513
  const widgetProps = getWidgetPropsByType(this.widgetSubType);
514
+ if (this.customWidgetSubType) {
515
+ const customWidgetProps = getWidgetPropsByType(this.customWidgetSubType);
516
+ customWidgetProps.forEach((v, k) => {
517
+ widgetProps.set(k, v);
518
+ });
519
+ }
510
520
  widgetProps.forEach((v, k) => {
511
521
  if (isDefined(v.value)) {
512
522
  this.initState.set(k, v.value);
@@ -647,4 +657,4 @@ export class BaseComponent {
647
657
  }, {
648
658
  type: Optional
649
659
  }] }, { type: Promise }], null); })();
650
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb21wb25lbnRzL2Jhc2Uvc3JjL3dpZGdldHMvY29tbW9uL2Jhc2UvYmFzZS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUdILFVBQVUsRUFDVixNQUFNLEVBQ04sTUFBTSxFQUNOLFVBQVUsRUFDVixRQUFRLEVBR1IsUUFBUSxFQUNSLGdCQUFnQixFQUNuQixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0sMkJBQTJCLENBQUM7QUFFdkQsT0FBTyxFQUFDLGFBQWEsRUFBRSxPQUFPLEVBQUMsTUFBTSxNQUFNLENBQUM7QUFFNUMsT0FBTyxFQUNILGVBQWUsRUFDZixXQUFXLEVBQ1gsUUFBUSxFQUNSLE1BQU0sRUFDTixRQUFRLEVBQ1IsR0FBRyxFQUNILFVBQVUsRUFDVixTQUFTLEVBQ1QsV0FBVyxFQUNYLFVBQVUsRUFDVixXQUFXLEVBQ1gsT0FBTyxFQUNQLE1BQU0sRUFDTixhQUFhLEVBQ2IsV0FBVyxFQUNkLE1BQU0sVUFBVSxDQUFDO0FBRWxCLE9BQU8sRUFBQyxvQkFBb0IsRUFBQyxNQUFNLDhCQUE4QixDQUFDO0FBQ2xFLE9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NlIHtcbiAgICAgICAgICAgIHRoaXMuZGVsYXllZEluaXQgPSB0cnVlO1xuICAgICAgICAgICAgaW5pdFByb21pc2UudGhlbigocmVzb2x2ZUZuKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5pbml0V2lkZ2V0KCk7XG4gICAgICAgICAgICAgICAgdGhpcy5zZXRJbml0UHJvcHMoKTtcbiAgICAgICAgICAgICAgICByZXNvbHZlRm4gJiYgcmVzb2x2ZUZuKClcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIGlmKGV4cGxpY2l0Q29udGV4dCkge1xuICAgICAgICAgICAgZXh0ZW5kKHRoaXMuY29udGV4dCwgZXhwbGljaXRDb250ZXh0KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHB1YmxpYyBnZXROYXRpdmVFbGVtZW50KCk6IEhUTUxFbGVtZW50IHtcbiAgICAgICAgcmV0dXJuIHRoaXMubmF0aXZlRWxlbWVudDtcbiAgICB9XG5cbiAgICBwdWJsaWMgZ2V0V2lkZ2V0VHlwZSgpOiBzdHJpbmcge1xuICAgICAgICByZXR1cm4gdGhpcy53aWRnZXRUeXBlO1xuICAgIH1cblxuICAgIHB1YmxpYyBnZXRXaWRnZXRTdWJUeXBlKCk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiB0aGlzLndpZGdldFN1YlR5cGU7XG4gICAgfVxuXG4gICAgcHVibGljIGdldFdpZGdldCgpOiBhbnkge1xuICAgICAgICByZXR1cm4gdGhpcy53aWRnZXQ7XG4gICAgfVxuXG4gICAgcHVibGljIHNldFByb3BlcnR5KHByb3BOYW1lLCBwcm9wVmFsdWUpIHtcbiAgICAgICAgdGhpcy53aWRnZXRbcHJvcE5hbWVdID0gcHJvcFZhbHVlO1xuICAgIH1cblxuICAgIHB1YmxpYyBnZXRWaWV3UGFyZW50KCk6IGFueSB7XG4gICAgICAgIHJldHVybiB0aGlzLnZpZXdQYXJlbnQ7XG4gICAgfVxuXG4gICAgcHVibG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RoaXMudmlld1BhcmVudCAhPT0gY29udGV4dCkge1xuICAgICAgICAgICAgdGhpcy5jb250ZXh0ID0gY29udGV4dDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuY29udGV4dCA9IHt9O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHBhcmVudENvbnRleHRzKSB7XG4gICAgICAgICAgICBsZXQgcGFyZW50Q29udGV4dE9iaiA9IHt9O1xuICAgICAgICAgICAgaWYgKGlzQXJyYXkocGFyZW50Q29udGV4dHMpKSB7XG4gICAgICAgICAgICAgICAgZm9yRWFjaChwYXJlbnRDb250ZXh0cywgKGNvbnRleHRPYmopID0+IHtcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihwYXJlbnRDb250ZXh0T2JqLCBjb250ZXh0T2JqKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcGFyZW50Q29udGV4dE9iaiA9IHBhcmVudENvbnRleHRzO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5jb250ZXh0ID0gT2JqZWN0LmFzc2lnbih7fSwgcGFyZW50Q29udGV4dE9iaiwgdGhpcy5jb250ZXh0KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIHNldCB0aGUgdmFsdWUgb24gdGhlIHByb3h5IG9iamVjdCBpZSwgd2lkZ2V0XG4gICAgICogc2V0dGluZyB0aGUgcHJvcGVydHkgb24gdGhlIHByb3h5IHdpbGwgaW52b2tlIHRoZSBjaGFuZ2UgbGlzdGVuZXJzXG4gICAgICogQHBhcmFtIHtzdHJpbmd9IGtleVxuICAgICAqIEBwYXJhbSB2YWx1ZVxuICAgICAqL1xuICAgIHB1YmxpYyBzZXRXaWRnZXRQcm9wZXJ0eShrZXk6IHN0cmluZywgdmFsdWU6IGFueSkge1xuICAgICAgICB0aGlzLndpZGdldFtrZXldID0gdmFsdW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qIEBwYXJhbSBvdlxuICAgICAqL1xuICAgIHByb3RlY3RlZCBvblByb3BlcnR5Q2hhbmdlKGtleTogc3RyaW5nLCBudjogYW55LCBvdj86IGFueSkge1xuICAgICAgICBpZiAoa2V5ID09PSAnc2hvdycpIHtcbiAgICAgICAgICAgIHRoaXMubmF0aXZlRWxlbWVudC5oaWRkZW4gPSAhbnY7XG4gICAgICAgIH0gZWxzZSBpZiAoa2V5ID09PSAnaGludCcpIHtcbiAgICAgICAgICAgIGlmICghaXNNb2JpbGVBcHAoKSkge1xuICAgICAgICAgICAgICAgIHNldEF0dHIodGhpcy5uYXRpdmVFbGVtZW50LCAndGl0bGUnLCBudik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoa2V5ID09PSAnY2xhc3MnKSB7XG4gICAgICAgICAgICBzd2l0Y2hDbGFzcyh0aGlzLm5hdGl2ZUVsZW1lbnQsIG52LCBvdik7XG4gICAgICAgICAgICBsZXQgcmVzdWx0ID0gbnYubWF0Y2goLyhcXFd8XikoaChbMC02XSkpKD89XFxzfCQpLyk7XG4gICAgICAgICAgICBpZiAocmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgc2V0QXR0cih0aGlzLm5hdGl2ZUVsZW1lbnQsICdyb2xlJywgJ2hlYWRpbmcnKTtcbiAgICAgICAgICAgICAgICBzZXRBdHRyKHRoaXMubmF0aXZlRWxlbWVudCwgJ2FyaWEtbGV2ZWwnLCByZXN1bHRbM10pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKGtleSA9PT0gJ25hbWUnIHx8IGtleSA9PT0gJ3RhYmluZGV4Jykge1xuICAgICAgICAgICAgc2V0QXR0cih0aGlzLm5hdGl2ZUVsZW1lbnQsIGtleSwgbnYpO1xuICAgICAgICAgICAgaWYgKGtleSA9PT0gJ25hbWUnICYmIG52KSB7XG4gICAgICAgICAgICAgICAgcmVuYW1lV2lkZ2V0KHRoaXMudmlld1BhcmVudCwgdGhpcy53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7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogaW52b2tlIHRoZSBldmVudCBoYW5kbGVyXG4gICAgICogQ29tcG9uZW50cyBjYW4gb3ZlcnJpZGUgdGhpcyBtZXRob2QgdG8gZXhlY3V0ZSBjdXN0b20gbG9naWMgYmVmb3JlIGludm9raW5nIHRoZSB1c2VyIGNhbGxiYWNrXG4gICAgICovXG4gICAgcHJvdGVjdGVkIGhhbmRsZUV2ZW50KG5vZGU6IEhUTUxFbGVtZW50LCBldmVudE5hbWU6IHN0cmluZywgZXZlbnRDYWxsYmFjazogRnVuY3Rpb24sIGxvY2FsczogYW55LCBtZXRhPzogc3RyaW5nKSB7XG4gICAgICAgIHRoaXMuZXZlbnRNYW5hZ2VyLmFkZEV2ZW50TGlzdGVuZXIoXG4gICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgZXZlbnROYW1lLFxuICAgICAgICAgICAgZSA9PiB7XG4gICAgICAgICAgICAgICAgbG9jYWxzLiRldmVudCA9IGU7XG4gICAgICAgICAgICAgICAgaWYgKG1ldGEgPT09ICdkZWxheWVkJykge1xuICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4gZXZlbnRDYWxsYmFjaygpLCAxNTApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBldmVudENhbGxiYWNrKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICApO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIHBhcnNlIHRoZSBldmVudCBleHByZXNzaW9uIGFuZCBzYXZlIHJlZmVyZW5jZSB0byB0aGUgZnVuY3Rpb24gaW5zaWRlIGV2ZW50SGFuZGxlcnMgbWFwXG4gICAgICogSWYgdGhlIGNvbXBvbmVudCBwcm92aWRlcyBhIG92ZXJyaWRlIGZvciBhbiBldmVudCB0aHJvdWdoIEBFdmVudCBkZWNvcmF0b3IgaW52b2tlIHRoYXRcbiA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gdGhlIGV2ZW50IGlzIGJvdW5kIGRpcmVjdGx5IHRvIHRoZSB2YXJpYWJsZSB0aGVuIHdlIG5lZWQgdG8gaW50ZXJuYWxseSBoYW5kbGVcbiAgICAgICAgICAgICAgICAvLyB0aGUgcHJvbWlzZSByZXR1cm5lZCBieSB0aGUgdmFyaWFibGUgY2FsbC5cbiAgICAgICAgICAgICAgICBib3VuZEZuVmFsID0gYm91bmRGbigpO1xuICAgICAgICAgICAgICAgIGlmIChib3VuZEZuVmFsIGluc3RhbmNlb2YgUHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICBib3VuZEZuVmFsLnRoZW4oIHJlc3BvbnNlID0+IHJlc3BvbnNlLCBlcnIgPT4gZXJyKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYm91bmRGblZhbDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgaWYoY2hpbGQgJiYgIWNoaWxkLndpZGdldC5ldmVudEhhbmRsZXJzKVxuICAgICAgICAgICAgY2hpbGQud2lkZ2V0LmV2ZW50SGFuZGxlcnMgPSBuZXcgTWFwPHN0cmluZywge2NhbGxiYWNrOiBGdW5jdGlvbiwgbG9jYWxzOiBhbnl9PigpXG5cbiAgICAgICAgd2lkZ2V0LmV2ZW50SGFuZGxlcnMuc2V0KHRoaXMuZ2V0TWFwcGVkRXZlbnROYW1lKGV2ZW50TmFtZSksIHtjYWxsYmFjazogZXZlbnRDYWxsYmFjaywgbG9jYWxzfSk7XG4gICAgICAgIC8vIHByZXBlbmQgZXZlbnROYW1lIHdpdGggb24gYW5kIGNvbnZlcnQgaXQgdG8gY2FtZWxjYXNlLlxuICAgICAgICAvLyBlZywgXCJjbGlja1wiIC0tLT4gb25DbGlja1xuICAgIC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CA/IGNoaWxkLndpZGdldCA6IHRoaXMud2lkZ2V0LFxuICAgICAgICAgICAgaXNNdXRlZCAgICAgPSBjaGlsZCA/IGNoaWxkLndpZGdldC5pc011dGVkIDogdGhpcy5pc011dGVkLFxuICAgICAgICAgICAgd2lkZ2V0UHJvcHMgPSBjaGlsZCA/IGNoaWxkLndpZGdldC53aWRnZXRQcm9wcyA6IHRoaXMud2lkZ2V0UHJvcHMsXG4gICAgICAgICAgICB3aWRnZXRJZCAgICA9IGNoaWxkID8gY2hpbGQud2lkZ2V0LndpZGdldElkIDogdGhpcy53aWRnZXRJZDtcbiAgICAgICAgdGhpcy5yZWdpc3RlckRlc3Ryb3lMaXN0ZW5lcihcbiAgICAgICAgICAgICR3YXRjaChcbiAgICAgICAgICAgICAgICBleHByLFxuICAgICAgICAgICAgICAgIHZpZXdQYXJlbnQsXG4gICAgICAgICAgICAgICAgY29udGV4dCxcbiAgICAgICAgICAgICAgICBudiA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmKHByb3BOYW1lLnN0YXJ0c1dpdGgoJ2Jhc2UtJykpXG4gICAgICAgICAgICAgICAgICAgICAgICB3aWRnZXQudXBkYXRlRGF0YShwcm9wTmFtZSwgbnYpO1xuICAgICAgICAgICAgICAgICAgICB3aWRnZXRbcHJvcE5hbWVdID0gbnZcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGdldFdhdGNoSWRlbnRpZmllcih3aWRnZXRJZCwgcHJvcE5hbWUpLFxuICAgICAgICAgICAgICAgIHByb3BOYW1lID09PSAnZGF0YXNvdXJjZScsXG4gICAgICAgICAgICAgICAgd2lkZ2V0UHJvcHMuZ2V0KHByb3BOYW1lKSxcbiAgICAgICAgICAgICAgICAoKSA9PiBpc011dGVkXG4gICAgICAgICAgICApXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUmVtb3ZlIHdhdGNoIG9uIHRoZSBib3VuZCBwcm9wZXJ0eVxuICAgICAqL1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LnZpZXdQYXJlbnQud2lkZ2V0VHlwZSkpIHtcbiAgICAgICAgICAgIHRoaXMuY29udGV4dCA9ICh0aGlzLnZpZXdDb250YWluZXJSZWYgYXMgYW55KS5faG9zdExWaWV3LmZpbmQodCA9PiB0ICYmICEhdC4kaW1wbGljaXQpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5jb250ZXh0ID0gKHRoaXMudmlld0NvbnRhaW5lclJlZiBhcyBhbnkpLnBhcmVudEluamVjdG9yLl9sVmlld1s4XTtcbiAgICAgICAgfSovXG5cbiAgICAgICAgLyppZihfdmlld1BhcmVudCAmJiAhaGFzSW1wbGljaXRDb250ZXh0KSB7XG4gICAgICAgICAgICB0aGlzLmNvbnRleHQgPSAodGhpcy52aWV3Q29udGFpbmVyUmVmIGFzIGFueSkuX2hvc3RMVmlld1s4XTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuY29udGV4dCA9IGhhc0ltcGxpY2l0Q29udGV4dDtcbiAgICAgICAgfSovXG4gICAgICAgIC8vIGlmIChbJ3dtLWxpc3QnLCAnd20tbmF2J10uaW5jbHVkZXModGhpcy52aWV3UGFyZW50LndpZGdldFR5cGUpIHx8IFsnd20tY2Fyb3VzZWwtdGVtcGxhdGUnLCAnd20tY2FyZCddLmluY2x1ZGVzKHRoaXMud2lkZ2V0VHlwZSkpIHtcbiAgICAgICAgLy8gICAgIHRoaXMuY29udGV4dCA9ICh0aGlzLnZpZXdDb250YWluZXJSZWYgYXMgYW55KS5faG9zdExWaWV3LmRlYnVnLmNvbnRleHQ7XG4gICAgICAgIC8vIH0gZWxzZSB7XG4gICAgICAgIC8vICAgICB0aGlzLmNvbnRleHQgPSAodGhpcy52aWV3Q29udGFpbmVyUmVmIGFzIGFueSkucGFyZW50SW5qZWN0b3IuX2xWaWV3WzhdO1xuICAgICAgICAvLyB9XG4gICAgICAgIHRoaXMud2lkZ2V0ID0gdGhpcy5jcmVhdGVQcm94eSg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XREaXNwbGF5VHlwZSgpOiBzdHJpbmcge1xuICAgICAgICByZXR1cm4gdGhpcy5kaXNwbGF5VHlwZTtcbiAgICB9XG5cbiAgICBwcm90ZWN0ZWQgY3JlYXRlUHJveHkoKTogYW55IHtcbiAgICAgICAgcmV0dXJuIFdpZGdldFByb3h5UHJvdmlkZXIuY3JlYXRlKHRoaXMsIHRoaXMud2lkZ2V0U3ViVHlwZSwgZ2V0V2lkZ2V0UHJvcHNCeVR5cGUodGhpcy53aWRnZXRTdWJUeXBlKSk7XG4gICAgfVxuXG4gICAgcHJvdGVjdGVkIGluaXRDb250ZXh0KCkge1xuICAgICAgICAvLyBjb25zdCBjb250ZXh0ID0gKHRoaXMuaW5qIGFzIGFueSkudmlldy5jb250ZXh0O1xuICAgICAgICBjb25zdCBjb250ZXh0ID0gdGhpcy5jb250ZXh0IHx8IHt9O1xuXG4gICAgICAgIGNvbnN0IHBhcmVudENvbnRleHRzID0gdGhpcy5pbmouZ2V0KENvbnRleHQsIHt9KTtcblxuICAgICAgICAvLyBhc3NpZ24gdGhlIGNvbnRleHQgcHJvcGVydHkgYWNjb3JkaW5nbHlcbiAgICAgICAgaWYgKHRoaXMudmlld1BhcmVudCAhPT0gY29udGV4dCkge1xuICAgICAgICAgICAgdGhpcy5jb250ZXh0ID0gY29udGV4dDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuY29udGV4dCA9IHt9O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHBhcmVudENvbnRleHRzKSB7XG4gICAgICAgICAgICBsZXQgcGFyZW50Q29udGV4dE9iaiA9IHt9O1xuICAgICAgICAgICAgaWYgKGlzQXJyYXkocGFyZW50Q29udGV4dHMpKSB7XG4gICAgICAgICAgICAgICAgZm9yRWFjaChwYXJlbnRDb250ZXh0cywgKGNvbnRleHRPYmopID0+IHtcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihwYXJlbnRDb250ZXh0T2JqLCBjb250ZXh0T2JqKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcGFyZW50Q29udGV4dE9iaiA9IHBhcmVudENvbnRleHRzO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5jb250ZXh0ID0gT2JqZWN0LmFzc2lnbih7fSwgcGFyZW50Q29udGV4dE9iaiwgdGhpcy5jb250ZXh0KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIHNldCB0aGUgdmFsdWUgb24gdGhlIHByb3h5IG9iamVjdCBpZSwgd2lkZ2V0XG4gICAgICogc2V0dGluZyB0aGUgcHJvcGVydHkgb24gdGhlIHByb3h5IHdpbGwgaW52b2tlIHRoZSBjaGFuZ2UgbGlzdGVuZXJzXG4gICAgICogQHBhcmFtIHtzdHJpbmd9IGtleVxuICAgICAqIEBwYXJhbSB2YWx1ZVxuICAgICAqL1xuICAgIHB1YmxpYyBzZXRXaWRnZXRQcm9wZXJ0eShrZXk6IHN0cmluZywgdmFsdWU6IGFueSkge1xuICAgICAgICB0aGlzLndpZGdldFtrZXldID0gdmFsdWU7XG4gICAgfVxuXG4gICAgcHVibGljIGdldEF0dHIoYXR0ck5hbWU6IHN0cmluZyk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiB0aGlzLiRhdHRycy5nZXQoYXR0ck5hbWUpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIHJldHVybnMgYXBwIGluc3RhbmNlXG4gICAgICogQHJldHVybnMge0FwcH1cbiAgICAgKi9cbiAgICBwdWJsaWMgZ2V0QXBwSW5zdGFuY2UoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLmluai5nZXQoQXBwKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBHZW5lcmF0ZXMgYSB1bmlxdWUgaWRcbiAgICAgKiBEZWZhdWx0IHBhdHRlcm4gaXMgYHdpZGdldC1pZC0ke2lkfWBcbiAgIC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2RlLFxuICAgICAgICAgICAgZXZlbnROYW1lLFxuICAgICAgICAgICAgZSA9PiB7XG4gICAgICAgICAgICAgICAgbG9jYWxzLiRldmVudCA9IGU7XG4gICAgICAgICAgICAgICAgaWYgKG1ldGEgPT09ICdkZWxheWVkJykge1xuICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4gZXZlbnRDYWxsYmFjaygpLCAxNTApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBldmVudENhbGxiYWNrKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICApO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIHBhcnNlIHRoZSBldmVudCBleHByZXNzaW9uIGFuZCBzYXZlIHJlZmVyZW5jZSB0byB0aGUgZnVuY3Rpb24gaW5zaWRlIGV2ZW50SGFuZGxlcnMgbWFwXG4gICAgICogSWYgdGhlIGNvbXBvbmVudCBwcm92aWRlcyBhIG92ZXJyaWRlIGZvciBhbiBldmVudCB0aHJvdWdoIEBFdmVudCBkZWNvcmF0b3IgaW52b2tlIHRoYXRcbiAgICAgKiBlbHNlIGludm9rZSB0aGUgcmVzb2x2ZWQgZnVuY3Rpb25cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7c3RyaW5nfSBldmVudE5hbWVcbiAgICAgKiBAcGFyYW0ge3N0cmluZ30gZXhwclxuICAgICAqL1xuICAgIHByb3RlY3RlZCBwcm9jZXNzRXZlbnRBdHRyKGV2ZW50TmFtZTogc3RyaW5nLCBleHByOiBzdHJpbmcsIG1ldGE/OiBzdHJpbmcsIGNoaWxkPzogQ2hpbGQpIHtcbiAgICAgICAgY29uc3QgZm4gPSAkcGFyc2VFdmVudChleHByKTtcbiAgICAgICAgY29uc3QgbG9jYWxzID0gdGhpcy5jb250ZXh0O1xuICAgICAgICBsb2NhbHMud2lkZ2V0ID0gY2hpbGQgPyBjaGlsZC53aWRnZXQgOiB0aGlzLndpZGdldDtcbiAgICAgICAgY29uc3QgYm91bmRGbiA9IGZuLmJpbmQodW5kZWZpbmVkLCBjaGlsZCA/IHRoaXMudmlld1BhcmVudC52aWV3UGFyZW50IDogdGhpcy52aWV3UGFyZW50LCBsb2NhbHMpO1xuXG4gICAgICAgIGxldCB3aWRnZXQgICAgICAgICAgPSBjaGlsZCA/IGNoaWxkLndpZGdldCA6IHRoaXMsXG4gICAgICAgICAgICBuYXRpdmVFbGVtZW50ICAgPSBjaGlsZCA/IGNoaWxkLm5hdGl2ZUVsZW1lbnQgOiB0aGlzLm5hdGl2ZUVsZW1lbnQ7XG5cbiAgICAgICAgY29uc3QgZXZlbnRDYWxsYmFjayA9ICgpID0+IHtcbiAgICAgICAgICAgIGxldCBib3VuZEZuVmFsO1xuICAgICAgICAgICAgJGludm9rZVdhdGNoZXJzKHRydWUpO1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBsb2NhbHMuJGV2ZW50ID0gbG9jYWxzLiRldmVudCB8fCBuZXcgd2luZG93LkN1c3RvbUV2ZW50KGV2ZW50TmFtZSk7XG4gICAgICAgICAgICAgICAgLy8gSWYgdGhlIGV2ZW50IGlzIGJvdW5kIGRpcmVjdGx5IHRvIHRoZSB2YXJpYWJsZSB0aGVuIHdlIG5lZWQgdG8gaW50ZXJuYWxseSBoYW5kbGVcbiAgICAgICAgICAgICAgICAvLyB0aGUgcHJvbWlzZSByZXR1cm5lZCBieSB0aGUgdmFyaWFibGUgY2FsbC5cbiAgICAgICAgICAgICAgICBib3VuZEZuVmFsID0gYm91bmRGbigpO1xuICAgICAgICAgICAgICAgIGlmIChib3VuZEZuVmFsIGluc3RhbmNlb2YgUHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICBib3VuZEZuVmFsLnRoZW4oIHJlc3BvbnNlID0+IHJlc3BvbnNlLCBlcnIgPT4gZXJyKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgIC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tZSksIGV2ZW50Q2FsbGJhY2ssIGxvY2FscywgbWV0YSk7XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFByb2Nlc3MgdGhlIGJvdW5kIHByb3BlcnR5XG4gICAgICogUmVnaXN0ZXIgYSB3YXRjaCBvbiB0aGUgYm91bmQgZXhwcmVzc2lvblxuICAgICAqL1xuICAgIHByb3RlY3RlZCBwcm9jZXNzQmluZEF0dHIocHJvcE5hbWU6IHN0cmluZywgZXhwcjogc3RyaW5nLCBjaGlsZCA/OiBhbnkpIHtcbiAgICAgICAgaWYoIWNoaWxkKVxuICAgICAgICAgICAgdGhpcy5pbml0U3RhdGUuZGVsZXRlKHByb3BOYW1lKTtcbiAgICAgICAgbGV0IHZpZXdQYXJlbnQgID0gY2hpbGQgPyBjaGlsZC53aWRnZXQudmlld1BhcmVudC52aWV3UGFyZW50IDogdGhpcy52aWV3UGFyZW50LFxuICAgICAgICAgICAgY29udGV4dCAgICAgPSBjaGlsZCA/IGNoaWxkLndpZGdldC5jb250ZXh0IDogdGhpcy5jb250ZXh0LFxuICAgICAgICAgICAgd2lkZ2V0ICAgICAgPSBjaGlsZCA/IGNoaWxkLndpZGdldCA6IHRoaXMud2lkZ2V0LFxuICAgICAgICAgICAgaXNNdXRlZCAgICAgPSBjaGlsZCA/IGNoaWxkLndpZGdldC5pc011dGVkIDogdGhpcy5pc011dGVkLFxuICAgICAgICAgICAgd2lkZ2V0UHJvcHMgPSBjaGlsZCA/IGNoaWxkLndpZGdldC53aWRnZXRQcm9wcyA6IHRoaXMud2lkZ2V0UHJvcHMsXG4gICAgICAgICAgICB3aWRnZXRJZCAgICA9IGNoaWxkID8gY2hpbGQud2lkZ2V0LndpZGdldElkIDogdGhpcy53aWRnZXRJZDtcbiAgICAgICAgdGhpcy5yZWdpc3RlckRlc3Ryb3lMaXN0ZW5lcihcbiAgICAgICAgICAgICR3YXRjaChcbiAgICAgICAgICAgICAgICBleHByLFxuICAgICAgICAgICAgICAgIHZpZXdQYXJlbnQsXG4gICAgICAgICAgICAgICAgY29udGV4dCxcbiAgICAgICAgICAgICAgICBudiA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmKHByb3BOYW1lLnN0YXJ0c1dpdGgoJ2Jhc2UtJykgJiYgd2lkZ2V0LnVwZGF0ZURhdGEpXG4gICAgICAgICAgICAgICAgICAgICAgICB3aWRnZXQudXBkYXRlRGF0YShwcm9wTmFtZSwgbnYpO1xuICAgICAgICAgICAgICAgICAgICB3aWRnZXRbcHJvcE5hbWVdID0gbnZcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGdldFdhdGNoSWRlbnRpZmllcih3aWRnZXRJZCwgcHJvcE5hbWUpLFxuICAgICAgICAgICAgICAgIHByb3BOYW1lID09PSAnZGF0YXNvdXJjZScsXG4gICAgICAgICAgICAgICAgd2lkZ2V0UHJvcHMuZ2V0KHByb3BOYW1lKSxcbiAgICAgICAgICAgICAgICAoKSA9PiBpc011dGVkXG4gICAgICAgICAgICApXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUmVtb3ZlIHdhdGNoIG9uIHRoZSBib3VuZCBwcm9wZXJ0eVxuICAgICAqL1xuICAgIHByb3RlY3RlZCByZW1vdmVQcm9wZXJ0eUJpbmRpbmcocHJvcE5hbWU6IHN0cmluZykge1xuICAgICAgICAkdW53YXRjaChnZXRXYXRjaElkZW50aWZpZXIodGhpcy53aWRnZXRJZCwgcHJvcE5hbWUpKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBpbnZva2UgdGhlIGV2ZW50IGNhbGxiYWNrIG1ldGhvZFxuICAgICAqIEBwYXJhbSB7c3RyaW5nfSBldmVudE5hbWVcbiAgICAgKiBAcGFyYW0gZXh0cmFMb2NhbHNcbiAgICAgKi9cbiAgICBwdWJsaWMgaW52b2tlRXZlbnRDYWxsYmFjayhldmVudE5hbWU6IHN0cmluZywgZXh0cmFMb2NhbHM/OiBhbnk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gfVxuICAgICAgICB0aGlzLnRvQmVTZXR1cEV2ZW50c1F1ZXVlLmxlbmd0aCA9IDA7XG4gICAgICAgIHRoaXMuaXNBdHRhY2hlZCA9IHRydWU7XG4gICAgfVxuXG4gICAgbmdBZnRlckNvbnRlbnRJbml0KCkge31cblxuICAgIG5nT25EZXN0cm95KCkge1xuICAgICAgICB0aGlzLmlzRGVzdHJveWVkID0gdHJ1ZTtcbiAgICAgICAgdGhpcy53aWRnZXQgPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICAgICAgICB0aGlzLnN0eWxlQ2hhbmdlLmNvbXBsZXRlKCk7XG4gICAgICAgIHRoaXMucHJvcGVydHlDaGFuZ2UuY29tcGxldGUoKTtcbiAgICAgICAgdGhpcy5kZXN0cm95LmNvbXBsZXRlKCk7XG4gICAgICAgIHRoaXMuaXNBdHRhY2hlZCA9IGZhbHNlO1xuICAgIH1cbn1cbiJdfQ==
@@ -39,7 +39,7 @@ export const globalPropertyChangeHandler = (component, key, nv) => {
39
39
  }
40
40
  resetChangeFromWatch();
41
41
  const widgetProps = getWidgetPropsByType(component.getWidgetSubType());
42
- const propInfo = widgetProps.get(key);
42
+ const propInfo = widgetProps ? widgetProps.get(key) : undefined;
43
43
  if (propInfo) {
44
44
  const type = propInfo.type;
45
45
  if (type) {
@@ -78,4 +78,4 @@ export const globalPropertyChangeHandler = (component, key, nv) => {
78
78
  $appDigest();
79
79
  }
80
80
  };
81
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvcGVydHktY2hhbmdlLWhhbmRsZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb21wb25lbnRzL2Jhc2Uvc3JjL3dpZGdldHMvZnJhbWV3b3JrL3Byb3BlcnR5LWNoYW5nZS1oYW5kbGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8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AgICAgICAgICAgY29uc3QgcmVmOiBhbnkgPSBjb21wb25lbnQ7XG4gICAgICAgICAgICBpZiAocmVmLl9wYXJlbnRQcmVmYWJfID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICByZWYuX3BhcmVudFByZWZhYl8gPSBjb21wb25lbnQuJGVsZW1lbnQucGFyZW50KCkuY2xvc2VzdCgnW3ByZWZhYm5hbWVdW3ByZWZhYm5hbWUhPVwiX19zZWxmX19cIl0nKS5hdHRyKCdwcmVmYWJuYW1lJykgfHwgJyc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAocmVmLl9wYXJlbnRQcmVmYWJfKSB7XG4gICAgICAgICAgICAgICAgbnYgPSBgLi9hcHAvcHJlZmFicy8ke3JlZi5fcGFyZW50UHJlZmFiX30vJHtudn1gO1xuICAgICAgICAgICAgfSBlbHNlIGlmKHByb3BJbmZvICYmIG52ICE9IHByb3BJbmZvLnZhbHVlKSB7XG4gICAgICAgICAgICAgICAgbnYgPSAnLi8nICsgbnY7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBjb21wb25lbnRba2V5XSA9IG52O1xuXG4gICAgICAgIGlmIChpc1N0eWxlKGtleSkpIHtcbiAgICAgICAgICAgIGNvbXBvbmVudC5ub3RpZnlTdHlsZUNoYW5nZShrZXksIG52LCBvdik7XG4gICAgICAgIH0gZWxzZSB7XG5cbiAgICAgICAgICAgIGlmIChrZXkgPT09ICdjb25kaXRpb25hbGNsYXNzJykge1xuICAgICAgICAgICAgICAgIG52ID0gZ2V0Q29uZGl0aW9uYWxDbGFzc2VzKG52LCBvdik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChwcm9wSW5mbykge1xuICAgICAgICAgICAgICAgIGNvbXBvbmVudC5ub3RpZnlQcm9wZXJ0eUNoYW5nZShrZXksIG52LCBvdik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAkYXBwRGlnZXN0KCk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AodHlwZSkge1xuICAgICAgICAgICAgbnYgPSBwYXJzZVZhbHVlKGtleSwgbnYsIHR5cGUpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gU2V0IHRoZSB2YWx1ZSBpbiB0aGUgY29tcG9uZW50IGFuZCB0cmlnZ2VyIGFwcERpZ2VzdCB3aGVuIHRoZXJlIGlzIGEgY2hhbmdlIGluIHRoZSB2YWx1ZVxuICAgIGlmIChudiAhPT0gb3YgfHwgaXNPYmplY3QobnYpIHx8IGlzT2JqZWN0KG92KSkge1xuXG4gICAgICAgIGlmIChpc0RpbWVuc2lvblByb3Aoa2V5KSkge1xuICAgICAgICAgICAgbnYgPSB0b0RpbWVuc2lvbihudik7XG4gICAgICAgIH0gZWxzZSBpZiAoc3RhcnRzV2l0aChudiwgJ3Jlc291cmNlcy8nKSkge1xuICAgICAgICAgICAgY29uc3QgcmVmOiBhbnkgPSBjb21wb25lbnQ7XG4gICAgICAgICAgICBpZiAocmVmLl9wYXJlbnRQcmVmYWJfID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICByZWYuX3BhcmVudFByZWZhYl8gPSBjb21wb25lbnQuJGVsZW1lbnQucGFyZW50KCkuY2xvc2VzdCgnW3ByZWZhYm5hbWVdW3ByZWZhYm5hbWUhPVwiX19zZWxmX19cIl0nKS5hdHRyKCdwcmVmYWJuYW1lJykgfHwgJyc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAocmVmLl9wYXJlbnRQcmVmYWJfKSB7XG4gICAgICAgICAgICAgICAgbnYgPSBgLi9hcHAvcHJlZmFicy8ke3JlZi5fcGFyZW50UHJlZmFiX30vJHtudn1gO1xuICAgICAgICAgICAgfSBlbHNlIGlmKHByb3BJbmZvICYmIG52ICE9IHByb3BJbmZvLnZhbHVlKSB7XG4gICAgICAgICAgICAgICAgbnYgPSAnLi8nICsgbnY7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBjb21wb25lbnRba2V5XSA9IG52O1xuXG4gICAgICAgIGlmIChpc1N0eWxlKGtleSkpIHtcbiAgICAgICAgICAgIGNvbXBvbmVudC5ub3RpZnlTdHlsZUNoYW5nZShrZXksIG52LCBvdik7XG4gICAgICAgIH0gZWxzZSB7XG5cbiAgICAgICAgICAgIGlmIChrZXkgPT09ICdjb25kaXRpb25hbGNsYXNzJykge1xuICAgICAgICAgICAgICAgIG52ID0gZ2V0Q29uZGl0aW9uYWxDbGFzc2VzKG52LCBvdik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChwcm9wSW5mbykge1xuICAgICAgICAgICAgICAgIGNvbXBvbmVudC5ub3RpZnlQcm9wZXJ0eUNoYW5nZShrZXksIG52LCBvdik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAkYXBwRGlnZXN0KCk7XG4gICAgfVxufTtcbiJdfQ==
@@ -6,7 +6,7 @@ import * as i1 from '@wm/core';
6
6
  import { FormWidgetType, checkIsCustomPipeExpression, $parseExpr, isValidWebURL, encodeUrl, stringStartsWith, prettifyLabel, deHyphenate, initCaps, getClonedObject, setCSS, isDefined, IDGenerator, toBoolean, isChangeFromWatch, $unwatch, resetChangeFromWatch, isObject as isObject$1, toDimension, $appDigest, removeClass, addClass, setCSSFromObj, App, findParent, setAttr, isMobileApp, switchClass, removeAttr, $parseEvent, $invokeWatchers, $watch, transformFileURI, ComponentType, noop as noop$1, isLargeTabletLandscape, isLargeTabletPortrait, isKitkatDevice, debounce as debounce$1, hasOffsetStr, AbstractI18nService, CURRENCY_INFO, isMobile, AbstractDialogService, DataSource, processFilterExpBindNode, MatchMode, isEqualWithFields, getFormattedDate, isAndroid, isNumberType, DataType, findValueOf, validateAccessRoles, VALIDATOR, isIos } from '@wm/core';
7
7
  import { SecurityModule, SecurityService } from '@wm/security';
8
8
  import { createFocusTrap } from '@wavemaker/focus-trap';
9
- import { isNull, get, forEach, join, union, isArray, isObject, includes, split, isString, assignWith, startsWith, isFunction, extend, camelCase, map, pickBy, assign, debounce, isDate, isUndefined, filter as filter$1, isEmpty, keys, head, replace, each, intersection, cloneDeep, orderBy, trim, isEqual, uniqWith, uniqBy, sortBy, groupBy, toLower, values, first, omitBy, toUpper, find, concat } from 'lodash-es';
9
+ import { isNull, get, forEach, join, union, isArray, isObject, includes, split, isString, assignWith, startsWith, isFunction, last, extend, camelCase, map, pickBy, assign, debounce, isDate, isUndefined, filter as filter$1, isEmpty, keys, head, replace, each, intersection, cloneDeep, orderBy, trim, isEqual, uniqWith, uniqBy, sortBy, groupBy, toLower, values, first, omitBy, toUpper, find, concat } from 'lodash-es';
10
10
  import * as i1$2 from '@angular/platform-browser';
11
11
  import { EventManager } from '@angular/platform-browser';
12
12
  import { ReplaySubject, Subject } from 'rxjs';
@@ -782,7 +782,7 @@ const globalPropertyChangeHandler = (component, key, nv) => {
782
782
  }
783
783
  resetChangeFromWatch();
784
784
  const widgetProps = getWidgetPropsByType(component.getWidgetSubType());
785
- const propInfo = widgetProps.get(key);
785
+ const propInfo = widgetProps ? widgetProps.get(key) : undefined;
786
786
  if (propInfo) {
787
787
  const type = propInfo.type;
788
788
  if (type) {
@@ -1017,6 +1017,10 @@ class BaseComponent {
1017
1017
  else {
1018
1018
  this.delayedInit = true;
1019
1019
  initPromise.then((resolveFn) => {
1020
+ let formFieldCW = this.widgetSubType === 'wm-form-field-custom-widget', cw = this.widgetSubType.startsWith('wm-custom-');
1021
+ if (formFieldCW || cw) {
1022
+ this.customWidgetSubType = formFieldCW ? 'wm-form-field-' + last(this["formWidget"].config.widgetType.split('-')) : this["config"].widgetType;
1023
+ }
1020
1024
  this.initWidget();
1021
1025
  this.setInitProps();
1022
1026
  resolveFn && resolveFn();
@@ -1276,7 +1280,7 @@ class BaseComponent {
1276
1280
  this.initState.delete(propName);
1277
1281
  let viewParent = child ? child.widget.viewParent.viewParent : this.viewParent, context = child ? child.widget.context : this.context, widget = child ? child.widget : this.widget, isMuted = child ? child.widget.isMuted : this.isMuted, widgetProps = child ? child.widget.widgetProps : this.widgetProps, widgetId = child ? child.widget.widgetId : this.widgetId;
1278
1282
  this.registerDestroyListener($watch(expr, viewParent, context, nv => {
1279
- if (propName.startsWith('base-'))
1283
+ if (propName.startsWith('base-') && widget.updateData)
1280
1284
  widget.updateData(propName, nv);
1281
1285
  widget[propName] = nv;
1282
1286
  }, getWatchIdentifier(widgetId, propName), propName === 'datasource', widgetProps.get(propName), () => isMuted));
@@ -1313,7 +1317,7 @@ class BaseComponent {
1313
1317
  const { 0: propName, 1: type, 2: meta, length } = attrName.split('.');
1314
1318
  if (type === 'bind') {
1315
1319
  // if the show property is bound, set the initial value to false
1316
- if (propName === 'show') {
1320
+ if (propName === 'show' && !this.widgetSubType.startsWith('wm-custom-')) {
1317
1321
  this.nativeElement.hidden = true;
1318
1322
  }
1319
1323
  this.processBindAttr(propName, attrValue, child);
@@ -1387,6 +1391,12 @@ class BaseComponent {
1387
1391
  this.initState = new Map();
1388
1392
  // get the widget properties
1389
1393
  const widgetProps = getWidgetPropsByType(this.widgetSubType);
1394
+ if (this.customWidgetSubType) {
1395
+ const customWidgetProps = getWidgetPropsByType(this.customWidgetSubType);
1396
+ customWidgetProps.forEach((v, k) => {
1397
+ widgetProps.set(k, v);
1398
+ });
1399
+ }
1390
1400
  widgetProps.forEach((v, k) => {
1391
1401
  if (isDefined(v.value)) {
1392
1402
  this.initState.set(k, v.value);