@wavemaker/angular-codegen 11.2.5-next.23546 → 11.2.5-next.23548

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.
@@ -70,7 +70,7 @@
70
70
  "tslib": "^2.0.0",
71
71
  "x2js": "3.2.6",
72
72
  "zone.js": "~0.11.4",
73
- "@wavemaker/app-ng-runtime": "11.2.5-next.23546"
73
+ "@wavemaker/app-ng-runtime": "11.2.5-next.23548"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@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, 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
+ }
46784
46791
  };
46785
46792
  /**
46786
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>`;
@@ -42859,6 +42859,13 @@ const addForIdAttributes = (element) => {
42859
42859
  setAttr(labelEl[0], 'for', widgetId);
42860
42860
  }
42861
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
+ }
42862
42869
  };
42863
42870
  /**
42864
42871
  * This method is used to adjust the container position
@@ -45514,7 +45521,7 @@ register('wm-panel', () => {
45514
45521
  return {
45515
45522
  pre: (attrs) => {
45516
45523
  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)}>`;
45524
+ return `<${tagName$1c} wmPanel #${counter}="wmPanel" partialContainer wm-navigable-element="true" ${getAttrMarkup(attrs)}>`;
45518
45525
  },
45519
45526
  post: () => `</${tagName$1c}>`
45520
45527
  };
@@ -46042,12 +46049,14 @@ const registerFormField = (isFormField) => {
46042
46049
  const pCounter = (parent && parent.get('form_reference')) || 'form';
46043
46050
  const widgetType = attrs.get('widget') || FormWidgetType.TEXT;
46044
46051
  const dataRole = isFormField ? 'form-field' : 'filter-field';
46052
+ const formFieldErrorMsgId = 'wmform-field-error-' + generateGUId();
46045
46053
  const validationMsg = isFormField ? `<p *ngIf="${counter}._control?.invalid && ${counter}._control?.touched && ${pCounter}.isUpdateMode"
46046
46054
  class="help-block text-danger" aria-hidden="false" role="alert"
46047
- aria-live="assertive" [textContent]="${counter}.validationmessage"></p>` : '';
46055
+ aria-live="assertive" [attr.aria-label]="${counter}.validationmessage" id="${formFieldErrorMsgId}"><span aria-hidden="true" [textContent]="${counter}.validationmessage"></span></p>` : '';
46048
46056
  const eventsTmpl = widgetType === FormWidgetType.UPLOAD ? '' : getEventsTemplate(attrs);
46049
46057
  const controlLayout = isMobileApp() ? 'col-xs-12' : 'col-sm-12';
46050
46058
  const isInList = pCounter === (parentList && parentList.get('parent_form_reference'));
46059
+ attrs.set('__errormsg', formFieldErrorMsgId);
46051
46060
  attrs.set('__widgetType', widgetType);
46052
46061
  attrs.delete('widget');
46053
46062
  shared.set('counter', counter);
@@ -46064,7 +46073,7 @@ const registerFormField = (isFormField) => {
46064
46073
  [ngStyle]="{width: ${pCounter}.captionsize}" [ngClass]="{'text-danger': ${counter}._control?.invalid && ${counter}._control?.touched && ${pCounter}.isUpdateMode,
46065
46074
  required: ${pCounter}.isUpdateMode && ${counter}.required}" [textContent]="${counter}.displayname"> </label>
46066
46075
  <div [ngClass]="${counter}.displayname ? ${pCounter}._widgetClass : '${controlLayout}'">
46067
- <label class="form-control-static app-label"
46076
+ <label class="form-control-static app-label" *ngIf="!(${pCounter}.isUpdateMode || ${counter}.viewmodewidget === 'default' || ${counter}.widgettype === 'upload')"
46068
46077
  [hidden]="${pCounter}.isUpdateMode || ${counter}.viewmodewidget === 'default' || ${counter}.widgettype === 'upload'" [innerHTML]="${getCaptionByWidget(attrs, widgetType, counter)}"></label>
46069
46078
  ${getTemplate(attrs, widgetType, eventsTmpl, counter, pCounter, isInList)}
46070
46079
  <span aria-hidden="true" *ngIf="${counter}.showPendingSpinner" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span>
@@ -46379,7 +46388,7 @@ var checkbox_build$1 = /*#__PURE__*/Object.freeze({
46379
46388
  const tagName$N = 'ul';
46380
46389
  register('wm-checkboxset', () => {
46381
46390
  return {
46382
- pre: attrs => `<${tagName$N} wmCheckboxset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46391
+ pre: attrs => `<${tagName$N} role="group" wmCheckboxset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46383
46392
  post: () => `</${tagName$N}>`
46384
46393
  };
46385
46394
  });
@@ -46421,7 +46430,7 @@ var number_build$1 = /*#__PURE__*/Object.freeze({
46421
46430
  const tagName$K = 'ul';
46422
46431
  register('wm-radioset', () => {
46423
46432
  return {
46424
- pre: attrs => `<${tagName$K} wmRadioset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46433
+ pre: attrs => `<${tagName$K} role="radiogroup" wmRadioset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46425
46434
  post: () => `</${tagName$K}>`
46426
46435
  };
46427
46436
  });
@@ -47064,7 +47073,7 @@ register('wm-left-panel', () => {
47064
47073
  return {
47065
47074
  pre: (attrs) => {
47066
47075
  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)}>`;
47076
+ 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
47077
  },
47069
47078
  post: () => `</${tagName$i}>`
47070
47079
  };
@@ -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>`;
@@ -42859,6 +42859,13 @@ const addForIdAttributes = (element) => {
42859
42859
  setAttr(labelEl[0], 'for', widgetId);
42860
42860
  }
42861
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
+ }
42862
42869
  };
42863
42870
  /**
42864
42871
  * This method is used to adjust the container position
@@ -45514,7 +45521,7 @@ register('wm-panel', () => {
45514
45521
  return {
45515
45522
  pre: (attrs) => {
45516
45523
  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)}>`;
45524
+ return `<${tagName$1c} wmPanel #${counter}="wmPanel" partialContainer wm-navigable-element="true" ${getAttrMarkup(attrs)}>`;
45518
45525
  },
45519
45526
  post: () => `</${tagName$1c}>`
45520
45527
  };
@@ -46042,12 +46049,14 @@ const registerFormField = (isFormField) => {
46042
46049
  const pCounter = (parent && parent.get('form_reference')) || 'form';
46043
46050
  const widgetType = attrs.get('widget') || FormWidgetType.TEXT;
46044
46051
  const dataRole = isFormField ? 'form-field' : 'filter-field';
46052
+ const formFieldErrorMsgId = 'wmform-field-error-' + generateGUId();
46045
46053
  const validationMsg = isFormField ? `<p *ngIf="${counter}._control?.invalid && ${counter}._control?.touched && ${pCounter}.isUpdateMode"
46046
46054
  class="help-block text-danger" aria-hidden="false" role="alert"
46047
- aria-live="assertive" [textContent]="${counter}.validationmessage"></p>` : '';
46055
+ aria-live="assertive" [attr.aria-label]="${counter}.validationmessage" id="${formFieldErrorMsgId}"><span aria-hidden="true" [textContent]="${counter}.validationmessage"></span></p>` : '';
46048
46056
  const eventsTmpl = widgetType === FormWidgetType.UPLOAD ? '' : getEventsTemplate(attrs);
46049
46057
  const controlLayout = isMobileApp() ? 'col-xs-12' : 'col-sm-12';
46050
46058
  const isInList = pCounter === (parentList && parentList.get('parent_form_reference'));
46059
+ attrs.set('__errormsg', formFieldErrorMsgId);
46051
46060
  attrs.set('__widgetType', widgetType);
46052
46061
  attrs.delete('widget');
46053
46062
  shared.set('counter', counter);
@@ -46064,7 +46073,7 @@ const registerFormField = (isFormField) => {
46064
46073
  [ngStyle]="{width: ${pCounter}.captionsize}" [ngClass]="{'text-danger': ${counter}._control?.invalid && ${counter}._control?.touched && ${pCounter}.isUpdateMode,
46065
46074
  required: ${pCounter}.isUpdateMode && ${counter}.required}" [textContent]="${counter}.displayname"> </label>
46066
46075
  <div [ngClass]="${counter}.displayname ? ${pCounter}._widgetClass : '${controlLayout}'">
46067
- <label class="form-control-static app-label"
46076
+ <label class="form-control-static app-label" *ngIf="!(${pCounter}.isUpdateMode || ${counter}.viewmodewidget === 'default' || ${counter}.widgettype === 'upload')"
46068
46077
  [hidden]="${pCounter}.isUpdateMode || ${counter}.viewmodewidget === 'default' || ${counter}.widgettype === 'upload'" [innerHTML]="${getCaptionByWidget(attrs, widgetType, counter)}"></label>
46069
46078
  ${getTemplate(attrs, widgetType, eventsTmpl, counter, pCounter, isInList)}
46070
46079
  <span aria-hidden="true" *ngIf="${counter}.showPendingSpinner" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span>
@@ -46379,7 +46388,7 @@ var checkbox_build$1 = /*#__PURE__*/Object.freeze({
46379
46388
  const tagName$N = 'ul';
46380
46389
  register('wm-checkboxset', () => {
46381
46390
  return {
46382
- pre: attrs => `<${tagName$N} wmCheckboxset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46391
+ pre: attrs => `<${tagName$N} role="group" wmCheckboxset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46383
46392
  post: () => `</${tagName$N}>`
46384
46393
  };
46385
46394
  });
@@ -46421,7 +46430,7 @@ var number_build$1 = /*#__PURE__*/Object.freeze({
46421
46430
  const tagName$K = 'ul';
46422
46431
  register('wm-radioset', () => {
46423
46432
  return {
46424
- pre: attrs => `<${tagName$K} wmRadioset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46433
+ pre: attrs => `<${tagName$K} role="radiogroup" wmRadioset ${getFormMarkupAttr(attrs)} ${getChildAttrs(attrs)} ${getNgModelAttr(attrs)}>`,
46425
46434
  post: () => `</${tagName$K}>`
46426
46435
  };
46427
46436
  });
@@ -47064,7 +47073,7 @@ register('wm-left-panel', () => {
47064
47073
  return {
47065
47074
  pre: (attrs) => {
47066
47075
  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)}>`;
47076
+ 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
47077
  },
47069
47078
  post: () => `</${tagName$i}>`
47070
47079
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "11.2.5-next.23546",
3
+ "version": "11.2.5-next.23548",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {