@wavemaker/angular-codegen 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.
@@ -142015,6 +142015,7 @@ var FormWidgetType$1;
142015
142015
  FormWidgetType["CHIPS"] = "chips";
142016
142016
  FormWidgetType["COLORPICKER"] = "colorpicker";
142017
142017
  FormWidgetType["CURRENCY"] = "currency";
142018
+ FormWidgetType["CUSTOMWIDGET"] = "custom-widget";
142018
142019
  FormWidgetType["DATE"] = "date";
142019
142020
  FormWidgetType["DATETIME"] = "datetime";
142020
142021
  FormWidgetType["NUMBER"] = "number";
@@ -142032,7 +142033,6 @@ var FormWidgetType$1;
142032
142033
  FormWidgetType["TIMESTAMP"] = "timestamp";
142033
142034
  FormWidgetType["TYPEAHEAD"] = "typeahead";
142034
142035
  FormWidgetType["UPLOAD"] = "upload";
142035
- FormWidgetType["CUSTOM"] = "custom";
142036
142036
  })(FormWidgetType$1 || (FormWidgetType$1 = {}));
142037
142037
  var DataType$1;
142038
142038
  (function (DataType) {
@@ -201357,6 +201357,7 @@ var FormWidgetType;
201357
201357
  FormWidgetType["CHIPS"] = "chips";
201358
201358
  FormWidgetType["COLORPICKER"] = "colorpicker";
201359
201359
  FormWidgetType["CURRENCY"] = "currency";
201360
+ FormWidgetType["CUSTOMWIDGET"] = "custom-widget";
201360
201361
  FormWidgetType["DATE"] = "date";
201361
201362
  FormWidgetType["DATETIME"] = "datetime";
201362
201363
  FormWidgetType["NUMBER"] = "number";
@@ -201374,7 +201375,6 @@ var FormWidgetType;
201374
201375
  FormWidgetType["TIMESTAMP"] = "timestamp";
201375
201376
  FormWidgetType["TYPEAHEAD"] = "typeahead";
201376
201377
  FormWidgetType["UPLOAD"] = "upload";
201377
- FormWidgetType["CUSTOM"] = "custom";
201378
201378
  })(FormWidgetType || (FormWidgetType = {}));
201379
201379
  var DataType;
201380
201380
  (function (DataType) {
@@ -86132,6 +86132,7 @@ var FormWidgetType;
86132
86132
  FormWidgetType["CHIPS"] = "chips";
86133
86133
  FormWidgetType["COLORPICKER"] = "colorpicker";
86134
86134
  FormWidgetType["CURRENCY"] = "currency";
86135
+ FormWidgetType["CUSTOMWIDGET"] = "custom-widget";
86135
86136
  FormWidgetType["DATE"] = "date";
86136
86137
  FormWidgetType["DATETIME"] = "datetime";
86137
86138
  FormWidgetType["NUMBER"] = "number";
@@ -86149,7 +86150,6 @@ var FormWidgetType;
86149
86150
  FormWidgetType["TIMESTAMP"] = "timestamp";
86150
86151
  FormWidgetType["TYPEAHEAD"] = "typeahead";
86151
86152
  FormWidgetType["UPLOAD"] = "upload";
86152
- FormWidgetType["CUSTOM"] = "custom";
86153
86153
  })(FormWidgetType || (FormWidgetType = {}));
86154
86154
  var DataType;
86155
86155
  (function (DataType) {
@@ -86234,6 +86234,9 @@ const getFormWidgetTemplate = (widgetType, innerTmpl, attrs, options = {}) => {
86234
86234
  case FormWidgetType.CURRENCY:
86235
86235
  tmpl = `<div wmCurrency ${attrs.get('required') === 'true' ? 'required=true' : ''} ${updateOnTmpl} ${innerTmpl} ${showTmpl}></div>`;
86236
86236
  break;
86237
+ case FormWidgetType.CUSTOMWIDGET:
86238
+ tmpl = `<div wmWidgetContainer customWidgetContainer ${attrs.get('required') === 'true' ? 'required=true' : ''} ${updateOnTmpl} ${innerTmpl} ${showTmpl}></div>`;
86239
+ break;
86237
86240
  case FormWidgetType.DATE:
86238
86241
  tmpl = `<div wmDate ${attrs.get('required') === 'true' ? 'required=true' : ''} dataentrymode="${attrs.get('dataentrymode')}" ${innerTmpl} ${showTmpl}></div>`;
86239
86242
  break;
@@ -86280,9 +86283,6 @@ const getFormWidgetTemplate = (widgetType, innerTmpl, attrs, options = {}) => {
86280
86283
  case FormWidgetType.TIMESTAMP:
86281
86284
  tmpl = `<div wmDateTime ${attrs.get('required') === 'true' ? 'required=true' : ''} dataentrymode="${attrs.get('dataentrymode')}" ${innerTmpl} role="input" ${showTmpl}></div>`;
86282
86285
  break;
86283
- case FormWidgetType.CUSTOM:
86284
- tmpl = `<div wmWidgetContainer customWidgetContainer ${attrs.get('required') === 'true' ? 'required=true' : ''} ${innerTmpl} ${showTmpl}></div>`;
86285
- break;
86286
86286
  case FormWidgetType.UPLOAD:
86287
86287
  const counter = options.counter;
86288
86288
  const pCounter = options.pCounter;
@@ -86320,6 +86320,8 @@ const getRequiredFormWidget = (widgetType) => {
86320
86320
  return 'wm-colorpicker';
86321
86321
  case FormWidgetType.CURRENCY:
86322
86322
  return 'wm-currency';
86323
+ case FormWidgetType.CUSTOMWIDGET:
86324
+ return 'wm-custom-widget';
86323
86325
  case FormWidgetType.DATE:
86324
86326
  return 'wm-date';
86325
86327
  case FormWidgetType.DATETIME:
@@ -86333,8 +86335,6 @@ const getRequiredFormWidget = (widgetType) => {
86333
86335
  return 'wm-richtexteditor';
86334
86336
  case FormWidgetType.SLIDER:
86335
86337
  return 'wm-slider';
86336
- case FormWidgetType.CUSTOM:
86337
- return 'wm-custom-widget';
86338
86338
  default:
86339
86339
  return 'wm-text';
86340
86340
  }
@@ -91500,6 +91500,13 @@ const setDefaultPlaceholder = (attrs, widgetType, index) => {
91500
91500
  }
91501
91501
  };
91502
91502
  const getWidgetTemplate = (attrs, options) => {
91503
+ let customAttrs = ``;
91504
+ if (options.widgetType === "custom-widget") {
91505
+ for (let [key, value] of attrs) {
91506
+ if (key.startsWith('prop-'))
91507
+ customAttrs += key + '="' + value + '" ';
91508
+ }
91509
+ }
91503
91510
  const name = attrs.get('name');
91504
91511
  const customWidgetName = attrs.get('widgetname');
91505
91512
  const fieldName = (attrs.get('key') || name || '').trim();
@@ -91507,7 +91514,7 @@ const getWidgetTemplate = (attrs, options) => {
91507
91514
  const tmplRef = options.isMaxWidget ? `#formWidgetMax` : `#formWidget`;
91508
91515
  const widgetName = name ? (options.isMaxWidget ? `name="${name}_formWidgetMax"` : `name="${name}_formWidget"`) : '';
91509
91516
  const conditionalClass = `[ngClass]="${attrs.get('ngclass')}"`;
91510
- const defaultTmpl = `[class.hidden]="!${options.pCounter}.isUpdateMode && ${options.counter}.viewmodewidget !== 'default'" ${formControl} ${options.eventsTmpl} ${conditionalClass} ${tmplRef} ${widgetName} ${customWidgetName ? `widgetname=${customWidgetName}` : ''}`;
91517
+ const defaultTmpl = `[class.hidden]="!${options.pCounter}.isUpdateMode && ${options.counter}.viewmodewidget !== 'default'" ${formControl} ${options.eventsTmpl} ${conditionalClass} ${tmplRef} ${widgetName} ${customWidgetName ? `widgetname=${customWidgetName} ${customAttrs}` : ''}`;
91511
91518
  return getFormWidgetTemplate(options.widgetType, defaultTmpl, attrs, { counter: options.counter, pCounter: options.pCounter });
91512
91519
  };
91513
91520
  const getTemplate = (attrs, widgetType, eventsTmpl, counter, pCounter, isInList) => {
@@ -97323,6 +97323,7 @@ var FormWidgetType;
97323
97323
  FormWidgetType["CHIPS"] = "chips";
97324
97324
  FormWidgetType["COLORPICKER"] = "colorpicker";
97325
97325
  FormWidgetType["CURRENCY"] = "currency";
97326
+ FormWidgetType["CUSTOMWIDGET"] = "custom-widget";
97326
97327
  FormWidgetType["DATE"] = "date";
97327
97328
  FormWidgetType["DATETIME"] = "datetime";
97328
97329
  FormWidgetType["NUMBER"] = "number";
@@ -97340,7 +97341,6 @@ var FormWidgetType;
97340
97341
  FormWidgetType["TIMESTAMP"] = "timestamp";
97341
97342
  FormWidgetType["TYPEAHEAD"] = "typeahead";
97342
97343
  FormWidgetType["UPLOAD"] = "upload";
97343
- FormWidgetType["CUSTOM"] = "custom";
97344
97344
  })(FormWidgetType || (FormWidgetType = {}));
97345
97345
  var DataType;
97346
97346
  (function (DataType) {
@@ -97425,6 +97425,9 @@ const getFormWidgetTemplate = (widgetType, innerTmpl, attrs, options = {}) => {
97425
97425
  case FormWidgetType.CURRENCY:
97426
97426
  tmpl = `<div wmCurrency ${attrs.get('required') === 'true' ? 'required=true' : ''} ${updateOnTmpl} ${innerTmpl} ${showTmpl}></div>`;
97427
97427
  break;
97428
+ case FormWidgetType.CUSTOMWIDGET:
97429
+ tmpl = `<div wmWidgetContainer customWidgetContainer ${attrs.get('required') === 'true' ? 'required=true' : ''} ${updateOnTmpl} ${innerTmpl} ${showTmpl}></div>`;
97430
+ break;
97428
97431
  case FormWidgetType.DATE:
97429
97432
  tmpl = `<div wmDate ${attrs.get('required') === 'true' ? 'required=true' : ''} dataentrymode="${attrs.get('dataentrymode')}" ${innerTmpl} ${showTmpl}></div>`;
97430
97433
  break;
@@ -97471,9 +97474,6 @@ const getFormWidgetTemplate = (widgetType, innerTmpl, attrs, options = {}) => {
97471
97474
  case FormWidgetType.TIMESTAMP:
97472
97475
  tmpl = `<div wmDateTime ${attrs.get('required') === 'true' ? 'required=true' : ''} dataentrymode="${attrs.get('dataentrymode')}" ${innerTmpl} role="input" ${showTmpl}></div>`;
97473
97476
  break;
97474
- case FormWidgetType.CUSTOM:
97475
- tmpl = `<div wmWidgetContainer customWidgetContainer ${attrs.get('required') === 'true' ? 'required=true' : ''} ${innerTmpl} ${showTmpl}></div>`;
97476
- break;
97477
97477
  case FormWidgetType.UPLOAD:
97478
97478
  const counter = options.counter;
97479
97479
  const pCounter = options.pCounter;
@@ -97511,6 +97511,8 @@ const getRequiredFormWidget = (widgetType) => {
97511
97511
  return 'wm-colorpicker';
97512
97512
  case FormWidgetType.CURRENCY:
97513
97513
  return 'wm-currency';
97514
+ case FormWidgetType.CUSTOMWIDGET:
97515
+ return 'wm-custom-widget';
97514
97516
  case FormWidgetType.DATE:
97515
97517
  return 'wm-date';
97516
97518
  case FormWidgetType.DATETIME:
@@ -97524,8 +97526,6 @@ const getRequiredFormWidget = (widgetType) => {
97524
97526
  return 'wm-richtexteditor';
97525
97527
  case FormWidgetType.SLIDER:
97526
97528
  return 'wm-slider';
97527
- case FormWidgetType.CUSTOM:
97528
- return 'wm-custom-widget';
97529
97529
  default:
97530
97530
  return 'wm-text';
97531
97531
  }
@@ -102691,6 +102691,13 @@ const setDefaultPlaceholder = (attrs, widgetType, index) => {
102691
102691
  }
102692
102692
  };
102693
102693
  const getWidgetTemplate = (attrs, options) => {
102694
+ let customAttrs = ``;
102695
+ if (options.widgetType === "custom-widget") {
102696
+ for (let [key, value] of attrs) {
102697
+ if (key.startsWith('prop-'))
102698
+ customAttrs += key + '="' + value + '" ';
102699
+ }
102700
+ }
102694
102701
  const name = attrs.get('name');
102695
102702
  const customWidgetName = attrs.get('widgetname');
102696
102703
  const fieldName = (attrs.get('key') || name || '').trim();
@@ -102698,7 +102705,7 @@ const getWidgetTemplate = (attrs, options) => {
102698
102705
  const tmplRef = options.isMaxWidget ? `#formWidgetMax` : `#formWidget`;
102699
102706
  const widgetName = name ? (options.isMaxWidget ? `name="${name}_formWidgetMax"` : `name="${name}_formWidget"`) : '';
102700
102707
  const conditionalClass = `[ngClass]="${attrs.get('ngclass')}"`;
102701
- const defaultTmpl = `[class.hidden]="!${options.pCounter}.isUpdateMode && ${options.counter}.viewmodewidget !== 'default'" ${formControl} ${options.eventsTmpl} ${conditionalClass} ${tmplRef} ${widgetName} ${customWidgetName ? `widgetname=${customWidgetName}` : ''}`;
102708
+ const defaultTmpl = `[class.hidden]="!${options.pCounter}.isUpdateMode && ${options.counter}.viewmodewidget !== 'default'" ${formControl} ${options.eventsTmpl} ${conditionalClass} ${tmplRef} ${widgetName} ${customWidgetName ? `widgetname=${customWidgetName} ${customAttrs}` : ''}`;
102702
102709
  return getFormWidgetTemplate(options.widgetType, defaultTmpl, attrs, { counter: options.counter, pCounter: options.pCounter });
102703
102710
  };
102704
102711
  const getTemplate = (attrs, widgetType, eventsTmpl, counter, pCounter, isInList) => {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "12.0.0-next.45078",
3
+ "version": "12.0.0-next.45081",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {