@wavemaker/angular-codegen 11.2.0-rc.5231 → 11.2.0-rc.5233

Sign up to get free protection for your applications and to get access to all the features.
@@ -69,7 +69,7 @@
69
69
  "tslib": "^2.0.0",
70
70
  "x2js": "3.2.6",
71
71
  "zone.js": "~0.11.4",
72
- "@wavemaker/app-ng-runtime": "11.2.0-rc.5231"
72
+ "@wavemaker/app-ng-runtime": "11.2.0-rc.5233"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@ampproject/rollup-plugin-closure-compiler": "0.8.5",
@@ -46781,6 +46781,13 @@ const addForIdAttributes = (element) => {
46781
46781
  setAttr(labelEl[0], 'for', widgetId);
46782
46782
  }
46783
46783
  }
46784
+ /*Adding aria-labelledby to radioset widget*/
46785
+ const ulEl = element.querySelectorAll('ul');
46786
+ if (labelEl.length && ulEl.length && ulEl[0].getAttribute('role') === 'radiogroup') {
46787
+ const widgetId = 'wm-radioset-label-' + generateGUId();
46788
+ setAttr(ulEl[0], 'aria-labelledby', widgetId);
46789
+ setAttr(labelEl[0], 'id', widgetId);
46790
+ }
46784
46791
  };
46785
46792
  /**
46786
46793
  * This method is used to adjust the container position
@@ -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>`;
@@ -42859,6 +42859,13 @@ const addForIdAttributes = (element) => {
42859
42859
  setAttr(labelEl[0], 'for', widgetId);
42860
42860
  }
42861
42861
  }
42862
+ /*Adding aria-labelledby to radioset widget*/
42863
+ const ulEl = element.querySelectorAll('ul');
42864
+ if (labelEl.length && ulEl.length && ulEl[0].getAttribute('role') === 'radiogroup') {
42865
+ const widgetId = 'wm-radioset-label-' + generateGUId();
42866
+ setAttr(ulEl[0], 'aria-labelledby', widgetId);
42867
+ setAttr(labelEl[0], 'id', widgetId);
42868
+ }
42862
42869
  };
42863
42870
  /**
42864
42871
  * This method is used to adjust the container position
@@ -45508,7 +45515,7 @@ register('wm-panel', () => {
45508
45515
  return {
45509
45516
  pre: (attrs) => {
45510
45517
  const counter = idGen$j.nextUid();
45511
- return `<${tagName$1c} wmPanel #${counter}="wmPanel" partialContainer [attr.aria-label]="${counter}.hint || 'Panel'" wm-navigable-element="true" ${getAttrMarkup(attrs)}>`;
45518
+ return `<${tagName$1c} wmPanel #${counter}="wmPanel" partialContainer wm-navigable-element="true" ${getAttrMarkup(attrs)}>`;
45512
45519
  },
45513
45520
  post: () => `</${tagName$1c}>`
45514
45521
  };
@@ -46058,7 +46065,7 @@ const registerFormField = (isFormField) => {
46058
46065
  [ngStyle]="{width: ${pCounter}.captionsize}" [ngClass]="{'text-danger': ${counter}._control?.invalid && ${counter}._control?.touched && ${pCounter}.isUpdateMode,
46059
46066
  required: ${pCounter}.isUpdateMode && ${counter}.required}" [textContent]="${counter}.displayname"> </label>
46060
46067
  <div [ngClass]="${counter}.displayname ? ${pCounter}._widgetClass : '${controlLayout}'">
46061
- <label class="form-control-static app-label"
46068
+ <label class="form-control-static app-label" *ngIf="!(${pCounter}.isUpdateMode || ${counter}.viewmodewidget === 'default' || ${counter}.widgettype === 'upload')"
46062
46069
  [hidden]="${pCounter}.isUpdateMode || ${counter}.viewmodewidget === 'default' || ${counter}.widgettype === 'upload'" [innerHTML]="${getCaptionByWidget(attrs, widgetType, counter)}"></label>
46063
46070
  ${getTemplate(attrs, widgetType, eventsTmpl, counter, pCounter, isInList)}
46064
46071
  <span aria-hidden="true" *ngIf="${counter}.showPendingSpinner" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span>
@@ -46415,7 +46422,7 @@ var number_build$1 = /*#__PURE__*/Object.freeze({
46415
46422
  const tagName$K = 'ul';
46416
46423
  register('wm-radioset', () => {
46417
46424
  return {
46418
- pre: attrs => `<${tagName$K} wmRadioset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46425
+ pre: attrs => `<${tagName$K} role="radiogroup" wmRadioset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46419
46426
  post: () => `</${tagName$K}>`
46420
46427
  };
46421
46428
  });
@@ -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>`;
@@ -42859,6 +42859,13 @@ const addForIdAttributes = (element) => {
42859
42859
  setAttr(labelEl[0], 'for', widgetId);
42860
42860
  }
42861
42861
  }
42862
+ /*Adding aria-labelledby to radioset widget*/
42863
+ const ulEl = element.querySelectorAll('ul');
42864
+ if (labelEl.length && ulEl.length && ulEl[0].getAttribute('role') === 'radiogroup') {
42865
+ const widgetId = 'wm-radioset-label-' + generateGUId();
42866
+ setAttr(ulEl[0], 'aria-labelledby', widgetId);
42867
+ setAttr(labelEl[0], 'id', widgetId);
42868
+ }
42862
42869
  };
42863
42870
  /**
42864
42871
  * This method is used to adjust the container position
@@ -45508,7 +45515,7 @@ register('wm-panel', () => {
45508
45515
  return {
45509
45516
  pre: (attrs) => {
45510
45517
  const counter = idGen$j.nextUid();
45511
- return `<${tagName$1c} wmPanel #${counter}="wmPanel" partialContainer [attr.aria-label]="${counter}.hint || 'Panel'" wm-navigable-element="true" ${getAttrMarkup(attrs)}>`;
45518
+ return `<${tagName$1c} wmPanel #${counter}="wmPanel" partialContainer wm-navigable-element="true" ${getAttrMarkup(attrs)}>`;
45512
45519
  },
45513
45520
  post: () => `</${tagName$1c}>`
45514
45521
  };
@@ -46058,7 +46065,7 @@ const registerFormField = (isFormField) => {
46058
46065
  [ngStyle]="{width: ${pCounter}.captionsize}" [ngClass]="{'text-danger': ${counter}._control?.invalid && ${counter}._control?.touched && ${pCounter}.isUpdateMode,
46059
46066
  required: ${pCounter}.isUpdateMode && ${counter}.required}" [textContent]="${counter}.displayname"> </label>
46060
46067
  <div [ngClass]="${counter}.displayname ? ${pCounter}._widgetClass : '${controlLayout}'">
46061
- <label class="form-control-static app-label"
46068
+ <label class="form-control-static app-label" *ngIf="!(${pCounter}.isUpdateMode || ${counter}.viewmodewidget === 'default' || ${counter}.widgettype === 'upload')"
46062
46069
  [hidden]="${pCounter}.isUpdateMode || ${counter}.viewmodewidget === 'default' || ${counter}.widgettype === 'upload'" [innerHTML]="${getCaptionByWidget(attrs, widgetType, counter)}"></label>
46063
46070
  ${getTemplate(attrs, widgetType, eventsTmpl, counter, pCounter, isInList)}
46064
46071
  <span aria-hidden="true" *ngIf="${counter}.showPendingSpinner" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span>
@@ -46415,7 +46422,7 @@ var number_build$1 = /*#__PURE__*/Object.freeze({
46415
46422
  const tagName$K = 'ul';
46416
46423
  register('wm-radioset', () => {
46417
46424
  return {
46418
- pre: attrs => `<${tagName$K} wmRadioset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46425
+ pre: attrs => `<${tagName$K} role="radiogroup" wmRadioset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46419
46426
  post: () => `</${tagName$K}>`
46420
46427
  };
46421
46428
  });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "11.2.0-rc.5231",
3
+ "version": "11.2.0-rc.5233",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {