@wavemaker/angular-codegen 11.2.4-rc.91 → 11.2.5-next.141563

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.
@@ -37,6 +37,9 @@
37
37
  "@wm/core": [
38
38
  "node_modules/@wavemaker/app-ng-runtime/core"
39
39
  ],
40
+ "@wavemaker/variables": [
41
+ "node_modules/@wavemaker/variables/"
42
+ ],
40
43
  "@wm/components/base": [
41
44
  "node_modules/@wavemaker/app-ng-runtime/components/base"
42
45
  ],
@@ -46638,41 +46638,42 @@ const validateDataSourceCtx = (ds, ctx) => {
46638
46638
  * @param name name of the variable
46639
46639
  * @param context scope of the variable
46640
46640
  */
46641
- const processFilterExpBindNode = (context, filterExpressions) => {
46641
+ const processFilterExpBindNode = (context, filterExpressions, variable) => {
46642
46642
  const destroyFn = context.registerDestroyListener ? context.registerDestroyListener.bind(context) : _.noop;
46643
46643
  const filter$ = new Subject();
46644
46644
  const bindFilExpObj = (obj, targetNodeKey) => {
46645
+ const listener = (newVal, oldVal) => {
46646
+ if ((newVal === oldVal && _.isUndefined(newVal)) || (_.isUndefined(newVal) && !_.isUndefined(oldVal))) {
46647
+ return;
46648
+ }
46649
+ // Skip cloning for blob column
46650
+ if (!_.includes(['blob', 'file'], obj.type)) {
46651
+ newVal = getClonedObject(newVal);
46652
+ }
46653
+ // backward compatibility: where we are allowing the user to bind complete object
46654
+ if (obj.target === 'dataBinding') {
46655
+ // remove the existing databinding element
46656
+ filterExpressions.rules = [];
46657
+ // now add all the returned values
46658
+ _.forEach(newVal, function (value, target) {
46659
+ filterExpressions.rules.push({
46660
+ 'target': target,
46661
+ 'value': value,
46662
+ 'matchMode': obj.matchMode || 'startignorecase',
46663
+ 'required': false,
46664
+ 'type': ''
46665
+ });
46666
+ });
46667
+ }
46668
+ else {
46669
+ // setting value to the root node
46670
+ obj[targetNodeKey] = newVal;
46671
+ }
46672
+ filter$.next({ filterExpressions, newVal });
46673
+ };
46645
46674
  if (stringStartsWith(obj[targetNodeKey], 'bind:')) {
46646
46675
  // [Todo-CSP]: needs a check, where is this used
46647
- destroyFn($watch(obj[targetNodeKey].replace('bind:', ''), context, {}, (newVal, oldVal) => {
46648
- if ((newVal === oldVal && _.isUndefined(newVal)) || (_.isUndefined(newVal) && !_.isUndefined(oldVal))) {
46649
- return;
46650
- }
46651
- // Skip cloning for blob column
46652
- if (!_.includes(['blob', 'file'], obj.type)) {
46653
- newVal = getClonedObject(newVal);
46654
- }
46655
- // backward compatibility: where we are allowing the user to bind complete object
46656
- if (obj.target === 'dataBinding') {
46657
- // remove the existing databinding element
46658
- filterExpressions.rules = [];
46659
- // now add all the returned values
46660
- _.forEach(newVal, function (value, target) {
46661
- filterExpressions.rules.push({
46662
- 'target': target,
46663
- 'value': value,
46664
- 'matchMode': obj.matchMode || 'startignorecase',
46665
- 'required': false,
46666
- 'type': ''
46667
- });
46668
- });
46669
- }
46670
- else {
46671
- // setting value to the root node
46672
- obj[targetNodeKey] = newVal;
46673
- }
46674
- filter$.next({ filterExpressions, newVal });
46675
- }, undefined, false, { arrayType: _.includes(['in', 'notin'], obj.matchMode) }));
46676
+ destroyFn($watch(obj[targetNodeKey].replace('bind:', ''), context, {}, variable ? variable.invokeOnFiltertExpressionChange.bind(variable, obj, targetNodeKey) : listener, undefined, false, { arrayType: _.includes(['in', 'notin'], obj.matchMode) }));
46676
46677
  }
46677
46678
  };
46678
46679
  const traverseFilterExpressions = expressions => {
@@ -46781,6 +46782,13 @@ const addForIdAttributes = (element) => {
46781
46782
  setAttr(labelEl[0], 'for', widgetId);
46782
46783
  }
46783
46784
  }
46785
+ /*Adding aria-labelledby to radioset, checkboxset widgets*/
46786
+ const ulEl = element.querySelectorAll('ul');
46787
+ if (labelEl.length && ulEl.length && (ulEl[0].getAttribute('role') === 'radiogroup' || ulEl[0].getAttribute('role') === 'group')) {
46788
+ const widgetId = 'wm-group-label-' + generateGUId();
46789
+ setAttr(ulEl[0], 'aria-labelledby', widgetId);
46790
+ setAttr(labelEl[0], 'id', widgetId);
46791
+ }
46784
46792
  };
46785
46793
  /**
46786
46794
  * This method is used to adjust the container position
@@ -40714,7 +40714,7 @@ const getFormWidgetTemplate = (widgetType, innerTmpl, attrs, options = {}) => {
40714
40714
  tmpl = `<div wmCheckbox ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''}></div>`;
40715
40715
  break;
40716
40716
  case FormWidgetType.CHECKBOXSET:
40717
- tmpl = `<ul wmCheckboxset ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''}></ul>`;
40717
+ tmpl = `<ul role="group" wmCheckboxset ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''}></ul>`;
40718
40718
  break;
40719
40719
  case FormWidgetType.CHIPS:
40720
40720
  tmpl = `<ul wmChips role="input" debouncetime="${attrs.get('debouncetime')}" ${innerTmpl}></ul>`;
@@ -40738,7 +40738,7 @@ const getFormWidgetTemplate = (widgetType, innerTmpl, attrs, options = {}) => {
40738
40738
  tmpl = `<wm-input ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''} type="password" aria-label="Enter password" ${updateOnTmpl}></wm-input>`;
40739
40739
  break;
40740
40740
  case FormWidgetType.RADIOSET:
40741
- tmpl = `<ul wmRadioset ${innerTmpl}></ul>`;
40741
+ tmpl = `<ul role="radiogroup" wmRadioset ${innerTmpl}></ul>`;
40742
40742
  break;
40743
40743
  case FormWidgetType.RATING:
40744
40744
  tmpl = `<div wmRating ${innerTmpl}></div>`;
@@ -40760,10 +40760,10 @@ const getFormWidgetTemplate = (widgetType, innerTmpl, attrs, options = {}) => {
40760
40760
  break;
40761
40761
  case FormWidgetType.TEXT:
40762
40762
  const inputType = options.inputType || 'inputtype';
40763
- tmpl = `<wm-input ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''} type="${attrs.get(inputType) || 'text'}" aria-describedby="Enter text" ${updateOnTmpl}></wm-input>`;
40763
+ tmpl = `<wm-input ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''} type="${attrs.get(inputType) || 'text'}" ${updateOnTmpl}></wm-input>`;
40764
40764
  break;
40765
40765
  case FormWidgetType.TEXTAREA:
40766
- tmpl = `<wm-textarea ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''} role="textbox" aria-describedby="Place your text" ${updateOnTmpl}></wm-textarea>`;
40766
+ tmpl = `<wm-textarea ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''} role="textbox" ${updateOnTmpl}></wm-textarea>`;
40767
40767
  break;
40768
40768
  case FormWidgetType.TIME:
40769
40769
  tmpl = `<div wmTime ${attrs.get('required') === 'true' ? 'required=true' : ''} dataentrymode="${attrs.get('dataentrymode')}" ${innerTmpl}></div>`;
@@ -40792,7 +40792,7 @@ const getFormWidgetTemplate = (widgetType, innerTmpl, attrs, options = {}) => {
40792
40792
  }
40793
40793
  break;
40794
40794
  default:
40795
- tmpl = `<wm-input ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''} aria-describedby="Enter text" type="text" ${updateOnTmpl}></wm-input>`;
40795
+ tmpl = `<wm-input ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''} type="text" ${updateOnTmpl}></wm-input>`;
40796
40796
  break;
40797
40797
  }
40798
40798
  return tmpl;
@@ -42716,41 +42716,42 @@ const validateDataSourceCtx = (ds, ctx) => {
42716
42716
  * @param name name of the variable
42717
42717
  * @param context scope of the variable
42718
42718
  */
42719
- const processFilterExpBindNode = (context, filterExpressions) => {
42719
+ const processFilterExpBindNode = (context, filterExpressions, variable) => {
42720
42720
  const destroyFn = context.registerDestroyListener ? context.registerDestroyListener.bind(context) : _.noop;
42721
42721
  const filter$ = new Subject();
42722
42722
  const bindFilExpObj = (obj, targetNodeKey) => {
42723
+ const listener = (newVal, oldVal) => {
42724
+ if ((newVal === oldVal && _.isUndefined(newVal)) || (_.isUndefined(newVal) && !_.isUndefined(oldVal))) {
42725
+ return;
42726
+ }
42727
+ // Skip cloning for blob column
42728
+ if (!_.includes(['blob', 'file'], obj.type)) {
42729
+ newVal = getClonedObject(newVal);
42730
+ }
42731
+ // backward compatibility: where we are allowing the user to bind complete object
42732
+ if (obj.target === 'dataBinding') {
42733
+ // remove the existing databinding element
42734
+ filterExpressions.rules = [];
42735
+ // now add all the returned values
42736
+ _.forEach(newVal, function (value, target) {
42737
+ filterExpressions.rules.push({
42738
+ 'target': target,
42739
+ 'value': value,
42740
+ 'matchMode': obj.matchMode || 'startignorecase',
42741
+ 'required': false,
42742
+ 'type': ''
42743
+ });
42744
+ });
42745
+ }
42746
+ else {
42747
+ // setting value to the root node
42748
+ obj[targetNodeKey] = newVal;
42749
+ }
42750
+ filter$.next({ filterExpressions, newVal });
42751
+ };
42723
42752
  if (stringStartsWith(obj[targetNodeKey], 'bind:')) {
42724
42753
  // [Todo-CSP]: needs a check, where is this used
42725
- destroyFn($watch(obj[targetNodeKey].replace('bind:', ''), context, {}, (newVal, oldVal) => {
42726
- if ((newVal === oldVal && _.isUndefined(newVal)) || (_.isUndefined(newVal) && !_.isUndefined(oldVal))) {
42727
- return;
42728
- }
42729
- // Skip cloning for blob column
42730
- if (!_.includes(['blob', 'file'], obj.type)) {
42731
- newVal = getClonedObject(newVal);
42732
- }
42733
- // backward compatibility: where we are allowing the user to bind complete object
42734
- if (obj.target === 'dataBinding') {
42735
- // remove the existing databinding element
42736
- filterExpressions.rules = [];
42737
- // now add all the returned values
42738
- _.forEach(newVal, function (value, target) {
42739
- filterExpressions.rules.push({
42740
- 'target': target,
42741
- 'value': value,
42742
- 'matchMode': obj.matchMode || 'startignorecase',
42743
- 'required': false,
42744
- 'type': ''
42745
- });
42746
- });
42747
- }
42748
- else {
42749
- // setting value to the root node
42750
- obj[targetNodeKey] = newVal;
42751
- }
42752
- filter$.next({ filterExpressions, newVal });
42753
- }, undefined, false, { arrayType: _.includes(['in', 'notin'], obj.matchMode) }));
42754
+ destroyFn($watch(obj[targetNodeKey].replace('bind:', ''), context, {}, variable ? variable.invokeOnFiltertExpressionChange.bind(variable, obj, targetNodeKey) : listener, undefined, false, { arrayType: _.includes(['in', 'notin'], obj.matchMode) }));
42754
42755
  }
42755
42756
  };
42756
42757
  const traverseFilterExpressions = expressions => {
@@ -42859,6 +42860,13 @@ const addForIdAttributes = (element) => {
42859
42860
  setAttr(labelEl[0], 'for', widgetId);
42860
42861
  }
42861
42862
  }
42863
+ /*Adding aria-labelledby to radioset, checkboxset widgets*/
42864
+ const ulEl = element.querySelectorAll('ul');
42865
+ if (labelEl.length && ulEl.length && (ulEl[0].getAttribute('role') === 'radiogroup' || ulEl[0].getAttribute('role') === 'group')) {
42866
+ const widgetId = 'wm-group-label-' + generateGUId();
42867
+ setAttr(ulEl[0], 'aria-labelledby', widgetId);
42868
+ setAttr(labelEl[0], 'id', widgetId);
42869
+ }
42862
42870
  };
42863
42871
  /**
42864
42872
  * This method is used to adjust the container position
@@ -45514,7 +45522,7 @@ register('wm-panel', () => {
45514
45522
  return {
45515
45523
  pre: (attrs) => {
45516
45524
  const counter = idGen$j.nextUid();
45517
- return `<${tagName$1c} wmPanel #${counter}="wmPanel" partialContainer [attr.aria-label]="${counter}.hint || 'Panel'" wm-navigable-element="true" ${getAttrMarkup(attrs)}>`;
45525
+ return `<${tagName$1c} wmPanel #${counter}="wmPanel" partialContainer wm-navigable-element="true" ${getAttrMarkup(attrs)}>`;
45518
45526
  },
45519
45527
  post: () => `</${tagName$1c}>`
45520
45528
  };
@@ -46042,12 +46050,14 @@ const registerFormField = (isFormField) => {
46042
46050
  const pCounter = (parent && parent.get('form_reference')) || 'form';
46043
46051
  const widgetType = attrs.get('widget') || FormWidgetType.TEXT;
46044
46052
  const dataRole = isFormField ? 'form-field' : 'filter-field';
46053
+ const formFieldErrorMsgId = 'wmform-field-error-' + generateGUId();
46045
46054
  const validationMsg = isFormField ? `<p *ngIf="${counter}._control?.invalid && ${counter}._control?.touched && ${pCounter}.isUpdateMode"
46046
- class="help-block text-danger" aria-hidden="false" [attr.aria-label]="${counter}.validationmessage" role="alert"
46047
- aria-live="assertive" [textContent]="${counter}.validationmessage"></p>` : '';
46055
+ class="help-block text-danger" aria-hidden="false" role="alert"
46056
+ aria-live="assertive" [attr.aria-label]="${counter}.validationmessage" id="${formFieldErrorMsgId}"><span aria-hidden="true" [textContent]="${counter}.validationmessage"></span></p>` : '';
46048
46057
  const eventsTmpl = widgetType === FormWidgetType.UPLOAD ? '' : getEventsTemplate(attrs);
46049
46058
  const controlLayout = isMobileApp() ? 'col-xs-12' : 'col-sm-12';
46050
46059
  const isInList = pCounter === (parentList && parentList.get('parent_form_reference'));
46060
+ attrs.set('__errormsg', formFieldErrorMsgId);
46051
46061
  attrs.set('__widgetType', widgetType);
46052
46062
  attrs.delete('widget');
46053
46063
  shared.set('counter', counter);
@@ -46064,7 +46074,7 @@ const registerFormField = (isFormField) => {
46064
46074
  [ngStyle]="{width: ${pCounter}.captionsize}" [ngClass]="{'text-danger': ${counter}._control?.invalid && ${counter}._control?.touched && ${pCounter}.isUpdateMode,
46065
46075
  required: ${pCounter}.isUpdateMode && ${counter}.required}" [textContent]="${counter}.displayname"> </label>
46066
46076
  <div [ngClass]="${counter}.displayname ? ${pCounter}._widgetClass : '${controlLayout}'">
46067
- <label class="form-control-static app-label"
46077
+ <label class="form-control-static app-label" *ngIf="!(${pCounter}.isUpdateMode || ${counter}.viewmodewidget === 'default' || ${counter}.widgettype === 'upload')"
46068
46078
  [hidden]="${pCounter}.isUpdateMode || ${counter}.viewmodewidget === 'default' || ${counter}.widgettype === 'upload'" [innerHTML]="${getCaptionByWidget(attrs, widgetType, counter)}"></label>
46069
46079
  ${getTemplate(attrs, widgetType, eventsTmpl, counter, pCounter, isInList)}
46070
46080
  <span aria-hidden="true" *ngIf="${counter}.showPendingSpinner" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span>
@@ -46379,7 +46389,7 @@ var checkbox_build$1 = /*#__PURE__*/Object.freeze({
46379
46389
  const tagName$N = 'ul';
46380
46390
  register('wm-checkboxset', () => {
46381
46391
  return {
46382
- pre: attrs => `<${tagName$N} wmCheckboxset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46392
+ pre: attrs => `<${tagName$N} role="group" wmCheckboxset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46383
46393
  post: () => `</${tagName$N}>`
46384
46394
  };
46385
46395
  });
@@ -46421,7 +46431,7 @@ var number_build$1 = /*#__PURE__*/Object.freeze({
46421
46431
  const tagName$K = 'ul';
46422
46432
  register('wm-radioset', () => {
46423
46433
  return {
46424
- pre: attrs => `<${tagName$K} wmRadioset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46434
+ pre: attrs => `<${tagName$K} role="radiogroup" wmRadioset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46425
46435
  post: () => `</${tagName$K}>`
46426
46436
  };
46427
46437
  });
@@ -46946,7 +46956,7 @@ register('wm-page', () => {
46946
46956
  },
46947
46957
  pre: (attrs) => {
46948
46958
  const counter = idGen$8.nextUid();
46949
- return `<${tagName$p} wmPage #${counter}="wmPage" data-role="pageContainer" [attr.aria-label]="${counter}.hint || 'Main page content'" ${getAttrMarkup(attrs)}>`;
46959
+ return `<${tagName$p} wmPage #${counter}="wmPage" data-role="pageContainer" [attr.aria-label]="${counter}.hint" ${getAttrMarkup(attrs)}>`;
46950
46960
  },
46951
46961
  post: () => `</${tagName$p}>`
46952
46962
  };
@@ -47064,7 +47074,7 @@ register('wm-left-panel', () => {
47064
47074
  return {
47065
47075
  pre: (attrs) => {
47066
47076
  const counter = idGen$4.nextUid();
47067
- return `<${tagName$i} wmLeftPanel #${counter}="wmLeftPanel" partialContainer data-role="page-left-panel" role="navigation" [attr.aria-label]="${counter}.hint || 'Left navigation panel'" wmSmoothscroll="${attrs.get('smoothscroll') || 'false'}" ${getAttrMarkup(attrs)}>`;
47077
+ return `<${tagName$i} wmLeftPanel #${counter}="wmLeftPanel" partialContainer data-role="page-left-panel" [attr.aria-label]="${counter}.hint || 'Left navigation panel'" wmSmoothscroll="${attrs.get('smoothscroll') || 'false'}" ${getAttrMarkup(attrs)}>`;
47068
47078
  },
47069
47079
  post: () => `</${tagName$i}>`
47070
47080
  };
@@ -47598,12 +47608,13 @@ const tagName$5 = 'div';
47598
47608
  const getRowExpansionActionTmpl = (attrs) => {
47599
47609
  const tag = attrs.get('widget-type') === 'anchor' ? 'a' : 'button';
47600
47610
  const directive = attrs.get('widget-type') === 'anchor' ? 'wmAnchor' : 'wmButton';
47611
+ const title = attrs.get('display-name') || attrs.get('title') || 'Collapse/Expand';
47601
47612
  return `<ng-template #rowExpansionActionTmpl let-row="row">
47602
47613
  <${tag} ${directive}
47603
47614
  ${getRowActionAttrs(attrs)}
47604
47615
  class="${attrs.get('class')} row-expansion-button"
47605
47616
  iconclass="${attrs.get('collapseicon')}"
47606
- type="button"></${tag}>
47617
+ type="button" aria-label="${title}"></${tag}>
47607
47618
  </ng-template>`;
47608
47619
  };
47609
47620
  const ɵ0$1$2 = getRowExpansionActionTmpl;
@@ -40714,7 +40714,7 @@ const getFormWidgetTemplate = (widgetType, innerTmpl, attrs, options = {}) => {
40714
40714
  tmpl = `<div wmCheckbox ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''}></div>`;
40715
40715
  break;
40716
40716
  case FormWidgetType.CHECKBOXSET:
40717
- tmpl = `<ul wmCheckboxset ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''}></ul>`;
40717
+ tmpl = `<ul role="group" wmCheckboxset ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''}></ul>`;
40718
40718
  break;
40719
40719
  case FormWidgetType.CHIPS:
40720
40720
  tmpl = `<ul wmChips role="input" debouncetime="${attrs.get('debouncetime')}" ${innerTmpl}></ul>`;
@@ -40738,7 +40738,7 @@ const getFormWidgetTemplate = (widgetType, innerTmpl, attrs, options = {}) => {
40738
40738
  tmpl = `<wm-input ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''} type="password" aria-label="Enter password" ${updateOnTmpl}></wm-input>`;
40739
40739
  break;
40740
40740
  case FormWidgetType.RADIOSET:
40741
- tmpl = `<ul wmRadioset ${innerTmpl}></ul>`;
40741
+ tmpl = `<ul role="radiogroup" wmRadioset ${innerTmpl}></ul>`;
40742
40742
  break;
40743
40743
  case FormWidgetType.RATING:
40744
40744
  tmpl = `<div wmRating ${innerTmpl}></div>`;
@@ -40760,10 +40760,10 @@ const getFormWidgetTemplate = (widgetType, innerTmpl, attrs, options = {}) => {
40760
40760
  break;
40761
40761
  case FormWidgetType.TEXT:
40762
40762
  const inputType = options.inputType || 'inputtype';
40763
- tmpl = `<wm-input ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''} type="${attrs.get(inputType) || 'text'}" aria-describedby="Enter text" ${updateOnTmpl}></wm-input>`;
40763
+ tmpl = `<wm-input ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''} type="${attrs.get(inputType) || 'text'}" ${updateOnTmpl}></wm-input>`;
40764
40764
  break;
40765
40765
  case FormWidgetType.TEXTAREA:
40766
- tmpl = `<wm-textarea ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''} role="textbox" aria-describedby="Place your text" ${updateOnTmpl}></wm-textarea>`;
40766
+ tmpl = `<wm-textarea ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''} role="textbox" ${updateOnTmpl}></wm-textarea>`;
40767
40767
  break;
40768
40768
  case FormWidgetType.TIME:
40769
40769
  tmpl = `<div wmTime ${attrs.get('required') === 'true' ? 'required=true' : ''} dataentrymode="${attrs.get('dataentrymode')}" ${innerTmpl}></div>`;
@@ -40792,7 +40792,7 @@ const getFormWidgetTemplate = (widgetType, innerTmpl, attrs, options = {}) => {
40792
40792
  }
40793
40793
  break;
40794
40794
  default:
40795
- tmpl = `<wm-input ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''} aria-describedby="Enter text" type="text" ${updateOnTmpl}></wm-input>`;
40795
+ tmpl = `<wm-input ${innerTmpl} ${attrs.get('required') === 'true' ? 'required=true' : ''} type="text" ${updateOnTmpl}></wm-input>`;
40796
40796
  break;
40797
40797
  }
40798
40798
  return tmpl;
@@ -42716,41 +42716,42 @@ const validateDataSourceCtx = (ds, ctx) => {
42716
42716
  * @param name name of the variable
42717
42717
  * @param context scope of the variable
42718
42718
  */
42719
- const processFilterExpBindNode = (context, filterExpressions) => {
42719
+ const processFilterExpBindNode = (context, filterExpressions, variable) => {
42720
42720
  const destroyFn = context.registerDestroyListener ? context.registerDestroyListener.bind(context) : _.noop;
42721
42721
  const filter$ = new Subject();
42722
42722
  const bindFilExpObj = (obj, targetNodeKey) => {
42723
+ const listener = (newVal, oldVal) => {
42724
+ if ((newVal === oldVal && _.isUndefined(newVal)) || (_.isUndefined(newVal) && !_.isUndefined(oldVal))) {
42725
+ return;
42726
+ }
42727
+ // Skip cloning for blob column
42728
+ if (!_.includes(['blob', 'file'], obj.type)) {
42729
+ newVal = getClonedObject(newVal);
42730
+ }
42731
+ // backward compatibility: where we are allowing the user to bind complete object
42732
+ if (obj.target === 'dataBinding') {
42733
+ // remove the existing databinding element
42734
+ filterExpressions.rules = [];
42735
+ // now add all the returned values
42736
+ _.forEach(newVal, function (value, target) {
42737
+ filterExpressions.rules.push({
42738
+ 'target': target,
42739
+ 'value': value,
42740
+ 'matchMode': obj.matchMode || 'startignorecase',
42741
+ 'required': false,
42742
+ 'type': ''
42743
+ });
42744
+ });
42745
+ }
42746
+ else {
42747
+ // setting value to the root node
42748
+ obj[targetNodeKey] = newVal;
42749
+ }
42750
+ filter$.next({ filterExpressions, newVal });
42751
+ };
42723
42752
  if (stringStartsWith(obj[targetNodeKey], 'bind:')) {
42724
42753
  // [Todo-CSP]: needs a check, where is this used
42725
- destroyFn($watch(obj[targetNodeKey].replace('bind:', ''), context, {}, (newVal, oldVal) => {
42726
- if ((newVal === oldVal && _.isUndefined(newVal)) || (_.isUndefined(newVal) && !_.isUndefined(oldVal))) {
42727
- return;
42728
- }
42729
- // Skip cloning for blob column
42730
- if (!_.includes(['blob', 'file'], obj.type)) {
42731
- newVal = getClonedObject(newVal);
42732
- }
42733
- // backward compatibility: where we are allowing the user to bind complete object
42734
- if (obj.target === 'dataBinding') {
42735
- // remove the existing databinding element
42736
- filterExpressions.rules = [];
42737
- // now add all the returned values
42738
- _.forEach(newVal, function (value, target) {
42739
- filterExpressions.rules.push({
42740
- 'target': target,
42741
- 'value': value,
42742
- 'matchMode': obj.matchMode || 'startignorecase',
42743
- 'required': false,
42744
- 'type': ''
42745
- });
42746
- });
42747
- }
42748
- else {
42749
- // setting value to the root node
42750
- obj[targetNodeKey] = newVal;
42751
- }
42752
- filter$.next({ filterExpressions, newVal });
42753
- }, undefined, false, { arrayType: _.includes(['in', 'notin'], obj.matchMode) }));
42754
+ destroyFn($watch(obj[targetNodeKey].replace('bind:', ''), context, {}, variable ? variable.invokeOnFiltertExpressionChange.bind(variable, obj, targetNodeKey) : listener, undefined, false, { arrayType: _.includes(['in', 'notin'], obj.matchMode) }));
42754
42755
  }
42755
42756
  };
42756
42757
  const traverseFilterExpressions = expressions => {
@@ -42859,6 +42860,13 @@ const addForIdAttributes = (element) => {
42859
42860
  setAttr(labelEl[0], 'for', widgetId);
42860
42861
  }
42861
42862
  }
42863
+ /*Adding aria-labelledby to radioset, checkboxset widgets*/
42864
+ const ulEl = element.querySelectorAll('ul');
42865
+ if (labelEl.length && ulEl.length && (ulEl[0].getAttribute('role') === 'radiogroup' || ulEl[0].getAttribute('role') === 'group')) {
42866
+ const widgetId = 'wm-group-label-' + generateGUId();
42867
+ setAttr(ulEl[0], 'aria-labelledby', widgetId);
42868
+ setAttr(labelEl[0], 'id', widgetId);
42869
+ }
42862
42870
  };
42863
42871
  /**
42864
42872
  * This method is used to adjust the container position
@@ -45514,7 +45522,7 @@ register('wm-panel', () => {
45514
45522
  return {
45515
45523
  pre: (attrs) => {
45516
45524
  const counter = idGen$j.nextUid();
45517
- return `<${tagName$1c} wmPanel #${counter}="wmPanel" partialContainer [attr.aria-label]="${counter}.hint || 'Panel'" wm-navigable-element="true" ${getAttrMarkup(attrs)}>`;
45525
+ return `<${tagName$1c} wmPanel #${counter}="wmPanel" partialContainer wm-navigable-element="true" ${getAttrMarkup(attrs)}>`;
45518
45526
  },
45519
45527
  post: () => `</${tagName$1c}>`
45520
45528
  };
@@ -46042,12 +46050,14 @@ const registerFormField = (isFormField) => {
46042
46050
  const pCounter = (parent && parent.get('form_reference')) || 'form';
46043
46051
  const widgetType = attrs.get('widget') || FormWidgetType.TEXT;
46044
46052
  const dataRole = isFormField ? 'form-field' : 'filter-field';
46053
+ const formFieldErrorMsgId = 'wmform-field-error-' + generateGUId();
46045
46054
  const validationMsg = isFormField ? `<p *ngIf="${counter}._control?.invalid && ${counter}._control?.touched && ${pCounter}.isUpdateMode"
46046
- class="help-block text-danger" aria-hidden="false" [attr.aria-label]="${counter}.validationmessage" role="alert"
46047
- aria-live="assertive" [textContent]="${counter}.validationmessage"></p>` : '';
46055
+ class="help-block text-danger" aria-hidden="false" role="alert"
46056
+ aria-live="assertive" [attr.aria-label]="${counter}.validationmessage" id="${formFieldErrorMsgId}"><span aria-hidden="true" [textContent]="${counter}.validationmessage"></span></p>` : '';
46048
46057
  const eventsTmpl = widgetType === FormWidgetType.UPLOAD ? '' : getEventsTemplate(attrs);
46049
46058
  const controlLayout = isMobileApp() ? 'col-xs-12' : 'col-sm-12';
46050
46059
  const isInList = pCounter === (parentList && parentList.get('parent_form_reference'));
46060
+ attrs.set('__errormsg', formFieldErrorMsgId);
46051
46061
  attrs.set('__widgetType', widgetType);
46052
46062
  attrs.delete('widget');
46053
46063
  shared.set('counter', counter);
@@ -46064,7 +46074,7 @@ const registerFormField = (isFormField) => {
46064
46074
  [ngStyle]="{width: ${pCounter}.captionsize}" [ngClass]="{'text-danger': ${counter}._control?.invalid && ${counter}._control?.touched && ${pCounter}.isUpdateMode,
46065
46075
  required: ${pCounter}.isUpdateMode && ${counter}.required}" [textContent]="${counter}.displayname"> </label>
46066
46076
  <div [ngClass]="${counter}.displayname ? ${pCounter}._widgetClass : '${controlLayout}'">
46067
- <label class="form-control-static app-label"
46077
+ <label class="form-control-static app-label" *ngIf="!(${pCounter}.isUpdateMode || ${counter}.viewmodewidget === 'default' || ${counter}.widgettype === 'upload')"
46068
46078
  [hidden]="${pCounter}.isUpdateMode || ${counter}.viewmodewidget === 'default' || ${counter}.widgettype === 'upload'" [innerHTML]="${getCaptionByWidget(attrs, widgetType, counter)}"></label>
46069
46079
  ${getTemplate(attrs, widgetType, eventsTmpl, counter, pCounter, isInList)}
46070
46080
  <span aria-hidden="true" *ngIf="${counter}.showPendingSpinner" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span>
@@ -46379,7 +46389,7 @@ var checkbox_build$1 = /*#__PURE__*/Object.freeze({
46379
46389
  const tagName$N = 'ul';
46380
46390
  register('wm-checkboxset', () => {
46381
46391
  return {
46382
- pre: attrs => `<${tagName$N} wmCheckboxset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46392
+ pre: attrs => `<${tagName$N} role="group" wmCheckboxset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46383
46393
  post: () => `</${tagName$N}>`
46384
46394
  };
46385
46395
  });
@@ -46421,7 +46431,7 @@ var number_build$1 = /*#__PURE__*/Object.freeze({
46421
46431
  const tagName$K = 'ul';
46422
46432
  register('wm-radioset', () => {
46423
46433
  return {
46424
- pre: attrs => `<${tagName$K} wmRadioset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46434
+ pre: attrs => `<${tagName$K} role="radiogroup" wmRadioset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46425
46435
  post: () => `</${tagName$K}>`
46426
46436
  };
46427
46437
  });
@@ -46946,7 +46956,7 @@ register('wm-page', () => {
46946
46956
  },
46947
46957
  pre: (attrs) => {
46948
46958
  const counter = idGen$8.nextUid();
46949
- return `<${tagName$p} wmPage #${counter}="wmPage" data-role="pageContainer" [attr.aria-label]="${counter}.hint || 'Main page content'" ${getAttrMarkup(attrs)}>`;
46959
+ return `<${tagName$p} wmPage #${counter}="wmPage" data-role="pageContainer" [attr.aria-label]="${counter}.hint" ${getAttrMarkup(attrs)}>`;
46950
46960
  },
46951
46961
  post: () => `</${tagName$p}>`
46952
46962
  };
@@ -47064,7 +47074,7 @@ register('wm-left-panel', () => {
47064
47074
  return {
47065
47075
  pre: (attrs) => {
47066
47076
  const counter = idGen$4.nextUid();
47067
- return `<${tagName$i} wmLeftPanel #${counter}="wmLeftPanel" partialContainer data-role="page-left-panel" role="navigation" [attr.aria-label]="${counter}.hint || 'Left navigation panel'" wmSmoothscroll="${attrs.get('smoothscroll') || 'false'}" ${getAttrMarkup(attrs)}>`;
47077
+ return `<${tagName$i} wmLeftPanel #${counter}="wmLeftPanel" partialContainer data-role="page-left-panel" [attr.aria-label]="${counter}.hint || 'Left navigation panel'" wmSmoothscroll="${attrs.get('smoothscroll') || 'false'}" ${getAttrMarkup(attrs)}>`;
47068
47078
  },
47069
47079
  post: () => `</${tagName$i}>`
47070
47080
  };
@@ -47598,12 +47608,13 @@ const tagName$5 = 'div';
47598
47608
  const getRowExpansionActionTmpl = (attrs) => {
47599
47609
  const tag = attrs.get('widget-type') === 'anchor' ? 'a' : 'button';
47600
47610
  const directive = attrs.get('widget-type') === 'anchor' ? 'wmAnchor' : 'wmButton';
47611
+ const title = attrs.get('display-name') || attrs.get('title') || 'Collapse/Expand';
47601
47612
  return `<ng-template #rowExpansionActionTmpl let-row="row">
47602
47613
  <${tag} ${directive}
47603
47614
  ${getRowActionAttrs(attrs)}
47604
47615
  class="${attrs.get('class')} row-expansion-button"
47605
47616
  iconclass="${attrs.get('collapseicon')}"
47606
- type="button"></${tag}>
47617
+ type="button" aria-label="${title}"></${tag}>
47607
47618
  </ng-template>`;
47608
47619
  };
47609
47620
  const ɵ0$1$2 = getRowExpansionActionTmpl;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "11.2.4-rc.91",
3
+ "version": "11.2.5-next.141563",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {