@wavemaker/angular-codegen 11.2.0-next.141305 → 11.2.0-next.141561

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,9 +37,6 @@
37
37
  "@wm/core": [
38
38
  "node_modules/@wavemaker/app-ng-runtime/core"
39
39
  ],
40
- "@wavemaker/variables": [
41
- "node_modules/@wavemaker/variables/"
42
- ],
43
40
  "@wm/components/base": [
44
41
  "node_modules/@wavemaker/app-ng-runtime/components/base"
45
42
  ],
@@ -46638,42 +46638,41 @@ 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, variable) => {
46641
+ const processFilterExpBindNode = (context, filterExpressions) => {
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
- };
46674
46645
  if (stringStartsWith(obj[targetNodeKey], 'bind:')) {
46675
46646
  // [Todo-CSP]: needs a check, where is this used
46676
- destroyFn($watch(obj[targetNodeKey].replace('bind:', ''), context, {}, variable ? variable.invokeOnFiltertExpressionChange.bind(variable, obj, targetNodeKey) : listener, undefined, false, { arrayType: _.includes(['in', 'notin'], obj.matchMode) }));
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) }));
46677
46676
  }
46678
46677
  };
46679
46678
  const traverseFilterExpressions = expressions => {
@@ -46782,6 +46781,13 @@ const addForIdAttributes = (element) => {
46782
46781
  setAttr(labelEl[0], 'for', widgetId);
46783
46782
  }
46784
46783
  }
46784
+ /*Adding aria-labelledby to radioset, checkboxset widgets*/
46785
+ const ulEl = element.querySelectorAll('ul');
46786
+ if (labelEl.length && ulEl.length && (ulEl[0].getAttribute('role') === 'radiogroup' || ulEl[0].getAttribute('role') === 'group')) {
46787
+ const widgetId = 'wm-group-label-' + generateGUId();
46788
+ setAttr(ulEl[0], 'aria-labelledby', widgetId);
46789
+ setAttr(labelEl[0], 'id', widgetId);
46790
+ }
46785
46791
  };
46786
46792
  /**
46787
46793
  * 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,42 +42716,41 @@ 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, variable) => {
42719
+ const processFilterExpBindNode = (context, filterExpressions) => {
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
- };
42752
42723
  if (stringStartsWith(obj[targetNodeKey], 'bind:')) {
42753
42724
  // [Todo-CSP]: needs a check, where is this used
42754
- destroyFn($watch(obj[targetNodeKey].replace('bind:', ''), context, {}, variable ? variable.invokeOnFiltertExpressionChange.bind(variable, obj, targetNodeKey) : listener, undefined, false, { arrayType: _.includes(['in', 'notin'], obj.matchMode) }));
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) }));
42755
42754
  }
42756
42755
  };
42757
42756
  const traverseFilterExpressions = expressions => {
@@ -42860,6 +42859,13 @@ const addForIdAttributes = (element) => {
42860
42859
  setAttr(labelEl[0], 'for', widgetId);
42861
42860
  }
42862
42861
  }
42862
+ /*Adding aria-labelledby to radioset, checkboxset widgets*/
42863
+ const ulEl = element.querySelectorAll('ul');
42864
+ if (labelEl.length && ulEl.length && (ulEl[0].getAttribute('role') === 'radiogroup' || ulEl[0].getAttribute('role') === 'group')) {
42865
+ const widgetId = 'wm-group-label-' + generateGUId();
42866
+ setAttr(ulEl[0], 'aria-labelledby', widgetId);
42867
+ setAttr(labelEl[0], 'id', widgetId);
42868
+ }
42863
42869
  };
42864
42870
  /**
42865
42871
  * This method is used to adjust the container position
@@ -45515,7 +45521,7 @@ register('wm-panel', () => {
45515
45521
  return {
45516
45522
  pre: (attrs) => {
45517
45523
  const counter = idGen$j.nextUid();
45518
- return `<${tagName$1c} wmPanel #${counter}="wmPanel" partialContainer [attr.aria-label]="${counter}.hint || 'Panel'" wm-navigable-element="true" ${getAttrMarkup(attrs)}>`;
45524
+ return `<${tagName$1c} wmPanel #${counter}="wmPanel" partialContainer wm-navigable-element="true" ${getAttrMarkup(attrs)}>`;
45519
45525
  },
45520
45526
  post: () => `</${tagName$1c}>`
45521
45527
  };
@@ -46044,7 +46050,7 @@ const registerFormField = (isFormField) => {
46044
46050
  const widgetType = attrs.get('widget') || FormWidgetType.TEXT;
46045
46051
  const dataRole = isFormField ? 'form-field' : 'filter-field';
46046
46052
  const validationMsg = isFormField ? `<p *ngIf="${counter}._control?.invalid && ${counter}._control?.touched && ${pCounter}.isUpdateMode"
46047
- class="help-block text-danger" aria-hidden="false" [attr.aria-label]="${counter}.validationmessage" role="alert"
46053
+ class="help-block text-danger" aria-hidden="false" role="alert"
46048
46054
  aria-live="assertive" [textContent]="${counter}.validationmessage"></p>` : '';
46049
46055
  const eventsTmpl = widgetType === FormWidgetType.UPLOAD ? '' : getEventsTemplate(attrs);
46050
46056
  const controlLayout = isMobileApp() ? 'col-xs-12' : 'col-sm-12';
@@ -46065,7 +46071,7 @@ const registerFormField = (isFormField) => {
46065
46071
  [ngStyle]="{width: ${pCounter}.captionsize}" [ngClass]="{'text-danger': ${counter}._control?.invalid && ${counter}._control?.touched && ${pCounter}.isUpdateMode,
46066
46072
  required: ${pCounter}.isUpdateMode && ${counter}.required}" [textContent]="${counter}.displayname"> </label>
46067
46073
  <div [ngClass]="${counter}.displayname ? ${pCounter}._widgetClass : '${controlLayout}'">
46068
- <label class="form-control-static app-label"
46074
+ <label class="form-control-static app-label" *ngIf="!(${pCounter}.isUpdateMode || ${counter}.viewmodewidget === 'default' || ${counter}.widgettype === 'upload')"
46069
46075
  [hidden]="${pCounter}.isUpdateMode || ${counter}.viewmodewidget === 'default' || ${counter}.widgettype === 'upload'" [innerHTML]="${getCaptionByWidget(attrs, widgetType, counter)}"></label>
46070
46076
  ${getTemplate(attrs, widgetType, eventsTmpl, counter, pCounter, isInList)}
46071
46077
  <span aria-hidden="true" *ngIf="${counter}.showPendingSpinner" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span>
@@ -46380,7 +46386,7 @@ var checkbox_build$1 = /*#__PURE__*/Object.freeze({
46380
46386
  const tagName$N = 'ul';
46381
46387
  register('wm-checkboxset', () => {
46382
46388
  return {
46383
- pre: attrs => `<${tagName$N} wmCheckboxset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46389
+ pre: attrs => `<${tagName$N} role="group" wmCheckboxset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46384
46390
  post: () => `</${tagName$N}>`
46385
46391
  };
46386
46392
  });
@@ -46422,7 +46428,7 @@ var number_build$1 = /*#__PURE__*/Object.freeze({
46422
46428
  const tagName$K = 'ul';
46423
46429
  register('wm-radioset', () => {
46424
46430
  return {
46425
- pre: attrs => `<${tagName$K} wmRadioset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46431
+ pre: attrs => `<${tagName$K} role="radiogroup" wmRadioset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46426
46432
  post: () => `</${tagName$K}>`
46427
46433
  };
46428
46434
  });
@@ -46947,7 +46953,7 @@ register('wm-page', () => {
46947
46953
  },
46948
46954
  pre: (attrs) => {
46949
46955
  const counter = idGen$8.nextUid();
46950
- return `<${tagName$p} wmPage #${counter}="wmPage" data-role="pageContainer" [attr.aria-label]="${counter}.hint || 'Main page content'" ${getAttrMarkup(attrs)}>`;
46956
+ return `<${tagName$p} wmPage #${counter}="wmPage" data-role="pageContainer" [attr.aria-label]="${counter}.hint" ${getAttrMarkup(attrs)}>`;
46951
46957
  },
46952
46958
  post: () => `</${tagName$p}>`
46953
46959
  };
@@ -47065,7 +47071,7 @@ register('wm-left-panel', () => {
47065
47071
  return {
47066
47072
  pre: (attrs) => {
47067
47073
  const counter = idGen$4.nextUid();
47068
- 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)}>`;
47074
+ 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)}>`;
47069
47075
  },
47070
47076
  post: () => `</${tagName$i}>`
47071
47077
  };
@@ -47599,12 +47605,13 @@ const tagName$5 = 'div';
47599
47605
  const getRowExpansionActionTmpl = (attrs) => {
47600
47606
  const tag = attrs.get('widget-type') === 'anchor' ? 'a' : 'button';
47601
47607
  const directive = attrs.get('widget-type') === 'anchor' ? 'wmAnchor' : 'wmButton';
47608
+ const title = attrs.get('display-name') || attrs.get('title') || 'Collapse/Expand';
47602
47609
  return `<ng-template #rowExpansionActionTmpl let-row="row">
47603
47610
  <${tag} ${directive}
47604
47611
  ${getRowActionAttrs(attrs)}
47605
47612
  class="${attrs.get('class')} row-expansion-button"
47606
47613
  iconclass="${attrs.get('collapseicon')}"
47607
- type="button"></${tag}>
47614
+ type="button" aria-label="${title}"></${tag}>
47608
47615
  </ng-template>`;
47609
47616
  };
47610
47617
  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,42 +42716,41 @@ 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, variable) => {
42719
+ const processFilterExpBindNode = (context, filterExpressions) => {
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
- };
42752
42723
  if (stringStartsWith(obj[targetNodeKey], 'bind:')) {
42753
42724
  // [Todo-CSP]: needs a check, where is this used
42754
- destroyFn($watch(obj[targetNodeKey].replace('bind:', ''), context, {}, variable ? variable.invokeOnFiltertExpressionChange.bind(variable, obj, targetNodeKey) : listener, undefined, false, { arrayType: _.includes(['in', 'notin'], obj.matchMode) }));
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) }));
42755
42754
  }
42756
42755
  };
42757
42756
  const traverseFilterExpressions = expressions => {
@@ -42860,6 +42859,13 @@ const addForIdAttributes = (element) => {
42860
42859
  setAttr(labelEl[0], 'for', widgetId);
42861
42860
  }
42862
42861
  }
42862
+ /*Adding aria-labelledby to radioset, checkboxset widgets*/
42863
+ const ulEl = element.querySelectorAll('ul');
42864
+ if (labelEl.length && ulEl.length && (ulEl[0].getAttribute('role') === 'radiogroup' || ulEl[0].getAttribute('role') === 'group')) {
42865
+ const widgetId = 'wm-group-label-' + generateGUId();
42866
+ setAttr(ulEl[0], 'aria-labelledby', widgetId);
42867
+ setAttr(labelEl[0], 'id', widgetId);
42868
+ }
42863
42869
  };
42864
42870
  /**
42865
42871
  * This method is used to adjust the container position
@@ -45515,7 +45521,7 @@ register('wm-panel', () => {
45515
45521
  return {
45516
45522
  pre: (attrs) => {
45517
45523
  const counter = idGen$j.nextUid();
45518
- return `<${tagName$1c} wmPanel #${counter}="wmPanel" partialContainer [attr.aria-label]="${counter}.hint || 'Panel'" wm-navigable-element="true" ${getAttrMarkup(attrs)}>`;
45524
+ return `<${tagName$1c} wmPanel #${counter}="wmPanel" partialContainer wm-navigable-element="true" ${getAttrMarkup(attrs)}>`;
45519
45525
  },
45520
45526
  post: () => `</${tagName$1c}>`
45521
45527
  };
@@ -46044,7 +46050,7 @@ const registerFormField = (isFormField) => {
46044
46050
  const widgetType = attrs.get('widget') || FormWidgetType.TEXT;
46045
46051
  const dataRole = isFormField ? 'form-field' : 'filter-field';
46046
46052
  const validationMsg = isFormField ? `<p *ngIf="${counter}._control?.invalid && ${counter}._control?.touched && ${pCounter}.isUpdateMode"
46047
- class="help-block text-danger" aria-hidden="false" [attr.aria-label]="${counter}.validationmessage" role="alert"
46053
+ class="help-block text-danger" aria-hidden="false" role="alert"
46048
46054
  aria-live="assertive" [textContent]="${counter}.validationmessage"></p>` : '';
46049
46055
  const eventsTmpl = widgetType === FormWidgetType.UPLOAD ? '' : getEventsTemplate(attrs);
46050
46056
  const controlLayout = isMobileApp() ? 'col-xs-12' : 'col-sm-12';
@@ -46065,7 +46071,7 @@ const registerFormField = (isFormField) => {
46065
46071
  [ngStyle]="{width: ${pCounter}.captionsize}" [ngClass]="{'text-danger': ${counter}._control?.invalid && ${counter}._control?.touched && ${pCounter}.isUpdateMode,
46066
46072
  required: ${pCounter}.isUpdateMode && ${counter}.required}" [textContent]="${counter}.displayname"> </label>
46067
46073
  <div [ngClass]="${counter}.displayname ? ${pCounter}._widgetClass : '${controlLayout}'">
46068
- <label class="form-control-static app-label"
46074
+ <label class="form-control-static app-label" *ngIf="!(${pCounter}.isUpdateMode || ${counter}.viewmodewidget === 'default' || ${counter}.widgettype === 'upload')"
46069
46075
  [hidden]="${pCounter}.isUpdateMode || ${counter}.viewmodewidget === 'default' || ${counter}.widgettype === 'upload'" [innerHTML]="${getCaptionByWidget(attrs, widgetType, counter)}"></label>
46070
46076
  ${getTemplate(attrs, widgetType, eventsTmpl, counter, pCounter, isInList)}
46071
46077
  <span aria-hidden="true" *ngIf="${counter}.showPendingSpinner" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span>
@@ -46380,7 +46386,7 @@ var checkbox_build$1 = /*#__PURE__*/Object.freeze({
46380
46386
  const tagName$N = 'ul';
46381
46387
  register('wm-checkboxset', () => {
46382
46388
  return {
46383
- pre: attrs => `<${tagName$N} wmCheckboxset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46389
+ pre: attrs => `<${tagName$N} role="group" wmCheckboxset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46384
46390
  post: () => `</${tagName$N}>`
46385
46391
  };
46386
46392
  });
@@ -46422,7 +46428,7 @@ var number_build$1 = /*#__PURE__*/Object.freeze({
46422
46428
  const tagName$K = 'ul';
46423
46429
  register('wm-radioset', () => {
46424
46430
  return {
46425
- pre: attrs => `<${tagName$K} wmRadioset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46431
+ pre: attrs => `<${tagName$K} role="radiogroup" wmRadioset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46426
46432
  post: () => `</${tagName$K}>`
46427
46433
  };
46428
46434
  });
@@ -46947,7 +46953,7 @@ register('wm-page', () => {
46947
46953
  },
46948
46954
  pre: (attrs) => {
46949
46955
  const counter = idGen$8.nextUid();
46950
- return `<${tagName$p} wmPage #${counter}="wmPage" data-role="pageContainer" [attr.aria-label]="${counter}.hint || 'Main page content'" ${getAttrMarkup(attrs)}>`;
46956
+ return `<${tagName$p} wmPage #${counter}="wmPage" data-role="pageContainer" [attr.aria-label]="${counter}.hint" ${getAttrMarkup(attrs)}>`;
46951
46957
  },
46952
46958
  post: () => `</${tagName$p}>`
46953
46959
  };
@@ -47065,7 +47071,7 @@ register('wm-left-panel', () => {
47065
47071
  return {
47066
47072
  pre: (attrs) => {
47067
47073
  const counter = idGen$4.nextUid();
47068
- 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)}>`;
47074
+ 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)}>`;
47069
47075
  },
47070
47076
  post: () => `</${tagName$i}>`
47071
47077
  };
@@ -47599,12 +47605,13 @@ const tagName$5 = 'div';
47599
47605
  const getRowExpansionActionTmpl = (attrs) => {
47600
47606
  const tag = attrs.get('widget-type') === 'anchor' ? 'a' : 'button';
47601
47607
  const directive = attrs.get('widget-type') === 'anchor' ? 'wmAnchor' : 'wmButton';
47608
+ const title = attrs.get('display-name') || attrs.get('title') || 'Collapse/Expand';
47602
47609
  return `<ng-template #rowExpansionActionTmpl let-row="row">
47603
47610
  <${tag} ${directive}
47604
47611
  ${getRowActionAttrs(attrs)}
47605
47612
  class="${attrs.get('class')} row-expansion-button"
47606
47613
  iconclass="${attrs.get('collapseicon')}"
47607
- type="button"></${tag}>
47614
+ type="button" aria-label="${title}"></${tag}>
47608
47615
  </ng-template>`;
47609
47616
  };
47610
47617
  const ɵ0$1$2 = getRowExpansionActionTmpl;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "11.2.0-next.141305",
3
+ "version": "11.2.0-next.141561",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {