@wavemaker/angular-codegen 11.0.0-next.139404 → 11.0.0-next.139405

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.
@@ -128,28 +128,49 @@ const addScriptForWMStylesPath = () => {
128
128
  </script>`);
129
129
  }
130
130
 
131
+ /**
132
+ * Read the console arguments and prepare the key value pairs.
133
+ * @returns Object console arguments as key value pairs
134
+ */
135
+ const getArgs = (customArgs) => {
136
+ const args = {};
137
+ let arguments = customArgs || process.argv;
138
+ arguments.slice(2, process.argv.length)
139
+ .forEach(arg => {
140
+ if (arg.slice(0, 2) === '--') {
141
+ const longArg = arg.split('=');
142
+ const longArgFlag = longArg[0].slice(2, longArg[0].length);
143
+ const longArgValue = longArg.length > 2 ? longArg.slice(1, longArg.length).join('=') : longArg[1];
144
+ args[longArgFlag] = longArgValue;
145
+ }
146
+ });
147
+ return args;
148
+ }
149
+
150
+ const args = getArgs();
151
+
131
152
  // Files that are moved out of ng-bundle and hence not to be updated.
132
153
  const SKIP_UPDATE = ['index.html', 'manifest.json'];
133
- // Suffix to be appended to all file names except the ones to skip.
134
- const SUFFIX = './ng-bundle';
135
154
 
136
155
  /**
137
156
  * Checks if a file's name has been changed during the build process
138
157
  * and if changed, returns an updated file path.
139
158
  *
159
+ * @param {string} deployUrl deployment url
140
160
  * @param {string} url an absolute url to check if its filename has changed
141
161
  * @param {object} updatedFileNames a map from old filenames to new filenames
142
162
  * @returns {string} an updated file path
143
163
  */
144
- const getUpdatedFileName = (url, updatedFileNames) => {
164
+ const getUpdatedFileName = (deployUrl, url, updatedFileNames) => {
145
165
  const absUrl = url.substring(1); // remove leading '/'
146
166
  if (SKIP_UPDATE.includes(absUrl)) {
147
- return `.${url}`;
167
+ return absUrl;
148
168
  }
169
+
149
170
  if (absUrl in updatedFileNames) {
150
- return `${SUFFIX}/${updatedFileNames[absUrl]}` // add the leading '/' back
171
+ return `${deployUrl}/${updatedFileNames[absUrl]}` // add the leading '/' back
151
172
  }
152
- return `${SUFFIX}${url}`;
173
+ return `${deployUrl}${url}`;
153
174
  }
154
175
 
155
176
  /**
@@ -168,34 +189,58 @@ const getUpdatedFileHashes = (url, oldHash, updatedFileHashes) => {
168
189
  return oldHash;
169
190
  }
170
191
 
192
+ /**
193
+ * Get the path of the icon without '/ng-bundle'
194
+ *
195
+ * @param {string} iconPath path with '/ng-bundle'
196
+ * @returns {string} path of the icon without '/ng-bundle'
197
+ */
198
+ const getIconPath = (iconPath) => {
199
+ var index = iconPath.indexOf("/", iconPath.indexOf("/") + 1);
200
+ return iconPath.substring(index + 1);
201
+ }
202
+
171
203
  /**
172
204
  * Updates name, location and content of PWA related assets.
173
205
  *
206
+ * @param {string} deployUrl deployment url
174
207
  * @param {object} updatedFileNames a map from old filenames to new filenames
175
208
  * @returns {void}
176
209
  */
177
- const updatePwaAssets = (updatedFileNames, updatedFileHashes) => {
210
+ const updatePwaAssets = (deployUrl, updatedFileNames, updatedFileHashes) => {
211
+ const ngswPath = './dist/ngsw.json';
212
+ const manifestPath = './dist/manifest.json';
213
+
178
214
  // copy service worker and its config to root directory
179
215
  fs.copyFileSync('./dist/ng-bundle/ngsw-worker.js', './dist/ngsw-worker.js');
180
- fs.copyFileSync('./dist/ng-bundle/ngsw.json', './dist/ngsw.json');
181
- fs.copyFileSync('./dist/ng-bundle/manifest.json', './dist/manifest.json');
216
+ fs.copyFileSync('./dist/ng-bundle/wmsw-worker.js', './dist/wmsw-worker.js');
217
+ fs.copyFileSync('./dist/ng-bundle/ngsw.json', ngswPath);
218
+ fs.copyFileSync('./dist/ng-bundle/manifest.json', manifestPath);
219
+
220
+ // update the icons url in manifest.json
221
+ const manifest = JSON.parse(fs.readFileSync(manifestPath).toString());
222
+ const updatedManifest = {
223
+ ...manifest,
224
+ icons: manifest.icons.map(icon => ({ ...icon, src: `${deployUrl}/${getIconPath(icon.src)}` })),
225
+ }
226
+ const manifestContent = JSON.stringify(updatedManifest, null, 4);
227
+ fs.writeFileSync(manifestPath, manifestContent);
228
+ updatedFileHashes['manifest.json'] = generateSha1(manifestContent);
182
229
 
183
230
  // edit service worker config to include ./ng-bundle to the path of files to be cached
184
231
  // also update the urls to files whose names are modified to include file hash (wm-styles)
185
- const fileName = './dist/ngsw.json';
186
- const ngswData = JSON.parse(fs.readFileSync(fileName).toString());
187
-
232
+ const ngswData = JSON.parse(fs.readFileSync(ngswPath).toString());
188
233
  ngswData.assetGroups = ngswData.assetGroups.map(group => ({
189
234
  ...group,
190
- urls: group.urls.map(url => getUpdatedFileName(url, updatedFileNames))
235
+ urls: group.urls.map(url => getUpdatedFileName(deployUrl, url, updatedFileNames))
191
236
  }));
192
237
  ngswData.hashTable = Object.keys(ngswData.hashTable).reduce((prev, current) => ({
193
238
  ...prev,
194
- [getUpdatedFileName(current, updatedFileNames)]: getUpdatedFileHashes(current, ngswData.hashTable[current], updatedFileHashes),
195
- }), { });
239
+ [getUpdatedFileName(deployUrl, current, updatedFileNames)]: getUpdatedFileHashes(current, ngswData.hashTable[current], updatedFileHashes),
240
+ }), {});
196
241
 
197
242
  const ngswContent = JSON.stringify(ngswData, null, 4);
198
- fs.writeFileSync(fileName, ngswContent);
243
+ fs.writeFileSync(ngswPath, ngswContent);
199
244
  }
200
245
 
201
246
  /**
@@ -213,10 +258,11 @@ const generateSha1 = (content) => {
213
258
  try {
214
259
  const angularJson = require(`${process.cwd()}/angular.json`);
215
260
  const build = angularJson['projects']['angular-app']['architect']['build'];
216
- let deployUrl = build['options']['deployUrl'];
261
+ let deployUrl = args['deploy-url'] || build['options']['deployUrl'];
217
262
  if (deployUrl.endsWith('/')) {
218
- deployUrl = deployUrl.substr(0, deployUrl.length - 1);
263
+ deployUrl = deployUrl.slice(0, deployUrl.length - 1);
219
264
  }
265
+
220
266
  fs.copyFileSync('./dist/ng-bundle/index.html', './dist/index.html');
221
267
  const contents = await readFile(`./dist/index.html`, `utf8`);
222
268
  $ = cheerio.load(contents);
@@ -243,8 +289,8 @@ const generateSha1 = (content) => {
243
289
  }
244
290
  // if service worker is enabled the app is a PWA
245
291
  const serviceWorkerEnabled = build['configurations']['production']['serviceWorker'];
246
- const updatedFilenames = { }
247
- const updatedFileHashes = { }
292
+ const updatedFilenames = {}
293
+ const updatedFileHashes = {}
248
294
 
249
295
  if (isMobileProject) {
250
296
  await addMobileSpecificStyles(deployUrl);
@@ -273,7 +319,7 @@ const generateSha1 = (content) => {
273
319
  if (serviceWorkerEnabled) {
274
320
  // re-generate hash for index.html since its been modified
275
321
  updatedFileHashes['index.html'] = generateSha1(htmlContent);
276
- updatePwaAssets(updatedFilenames, updatedFileHashes);
322
+ updatePwaAssets(deployUrl, updatedFilenames, updatedFileHashes);
277
323
  }
278
324
  } catch (e) {
279
325
  console.error(`Error in Post ng build Script | ${e}`);
@@ -68,7 +68,7 @@
68
68
  "tslib": "^2.0.0",
69
69
  "x2js": "3.2.6",
70
70
  "zone.js": "~0.10.3",
71
- "@wavemaker/app-ng-runtime": "11.0.0-next.139404"
71
+ "@wavemaker/app-ng-runtime": "11.0.0-next.139405"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@ampproject/rollup-plugin-closure-compiler": "0.8.5",
@@ -17,7 +17,14 @@ const { downloadNPMPackage } = require('./download-packages');
17
17
 
18
18
  const { executeSyncCmd, args, MSG_NG_RUNTIME_LOG, MSG_NG_RUNTIME_SUCCESS } = require('./build-util');
19
19
 
20
-
20
+ /**
21
+ * @TODO: This is a temporary workaround to extract deploy-url from 'ngBuildParams', need to be replaced in future.
22
+ */
23
+ const getDeployUrl = (ngBuildParams) => {
24
+ let buildArgs = ngBuildParams.split(' ');
25
+ const deployParam = buildArgs.find(i => i.startsWith("--deploy-url="));
26
+ return deployParam ? deployParam.split("=")[1] : 'ng-bundle/';
27
+ };
21
28
 
22
29
  /**
23
30
  * Download the app runtime package
@@ -34,27 +41,26 @@ const init = () => {
34
41
  infoMsg: MSG_NG_RUNTIME_LOG
35
42
 
36
43
  }
37
-
44
+
38
45
  try {
39
46
  // Symlink to reuse the existing node_modules
40
- if(args.optimizeUIBuild === 'true') {
47
+ if (args.optimizeUIBuild === 'true') {
41
48
  // Download app-ng-runtime node modules
42
49
  let pathNGRuntimePackage = downloadNPMPackage(packageInfo);
43
50
  fs.symlinkSync(pathNGRuntimePackage + '/node_modules', args.appTarget + '/node_modules', 'dir');
44
51
  } else {
45
52
  fs.copyFileSync(packageInfo.packageJsonFile, args.appTarget + '/package.json');
46
- executeSyncCmd('cd ' + args.appTarget + ' && npm install', null, MSG_NG_RUNTIME_LOG);
53
+ executeSyncCmd('cd ' + args.appTarget + ' && npm install', null, MSG_NG_RUNTIME_LOG);
47
54
  }
48
55
  } catch (err) {
49
56
  console.log(MSG_NG_RUNTIME_LOG + 'FAILED the symlink for the node_modules', err);
50
57
  process.exit(err.code || err.pid);
51
58
  }
52
59
 
60
+ const deployUrl = getDeployUrl(args.ngBuildParams);
53
61
  const NG_BUILD_MSG = 'NG BUILD MIGHT HAVE FAILED WITH HEAP OUT OF MEMORY, RE-EXECUTE THE BUILD BY INCREASING THE MAX-OLD-SPACE-SIZE ARGUMENT VALUE FOR BUILD.UI.NODE.ARGS PROPERTY IN DEPLOYMENT PROFILE';
54
62
  // Generating the angular build and post build process.
55
- executeSyncCmd('cd ' + args.appTarget + ' && node ' + args.nodeVMArgs + ' ' + './node_modules/@angular/cli/bin/ng build ' + args.ngBuildParams + ' && node build-scripts/post-build.js', null, MSG_NG_RUNTIME_LOG, false, NG_BUILD_MSG);
56
-
57
-
63
+ executeSyncCmd('cd ' + args.appTarget + ' && node ' + args.nodeVMArgs + ' ' + './node_modules/@angular/cli/bin/ng build ' + args.ngBuildParams + ' && node build-scripts/post-build.js --deploy-url=' + deployUrl, null, MSG_NG_RUNTIME_LOG, false, NG_BUILD_MSG);
58
64
  }
59
65
 
60
66
  init();
@@ -40192,14 +40192,14 @@ const scopeComponentStyles = (componentName, componentType, styles = '') => {
40192
40192
 
40193
40193
  const carouselTagName = 'carousel';
40194
40194
  const dataSetKey$5 = 'dataset';
40195
- const idGen$p = new IDGenerator('wm_carousel_ref_');
40195
+ const idGen$q = new IDGenerator('wm_carousel_ref_');
40196
40196
  const isDynamicCarousel = node => node.attrs.find(attr => attr.name === 'type' && attr.value === 'dynamic');
40197
40197
  const ɵ0$c$1 = isDynamicCarousel;
40198
40198
  register('wm-carousel', () => {
40199
40199
  return {
40200
40200
  pre: (attrs, shared) => {
40201
40201
  // generating unique Id for the carousel
40202
- const counter = idGen$p.nextUid();
40202
+ const counter = idGen$q.nextUid();
40203
40203
  shared.set('carousel_ref', counter);
40204
40204
  return `<div class="app-carousel carousel"><${carouselTagName} wmCarousel #${counter}="wmCarousel" ${getAttrMarkup(attrs)} interval="0" [ngClass]="${counter}.navigationClass">`;
40205
40205
  },
@@ -40300,11 +40300,11 @@ var marquee_build$1 = /*#__PURE__*/Object.freeze({
40300
40300
  });
40301
40301
 
40302
40302
  const tagName$1w = 'a';
40303
- const idGen$o = new IDGenerator('wm_anchor');
40303
+ const idGen$p = new IDGenerator('wm_anchor');
40304
40304
  register('wm-anchor', () => {
40305
40305
  return {
40306
40306
  pre: (attrs) => {
40307
- const counter = idGen$o.nextUid();
40307
+ const counter = idGen$p.nextUid();
40308
40308
  return `<${tagName$1w} wmAnchor #${counter}="wmAnchor" role="link" data-identifier="anchor" [attr.aria-label]="${counter}.hint || ${counter}.caption || 'Link'" ${getAttrMarkup(attrs)}>`;
40309
40309
  },
40310
40310
  post: () => `</${tagName$1w}>`
@@ -40332,11 +40332,11 @@ var audio_build$1 = /*#__PURE__*/Object.freeze({
40332
40332
  });
40333
40333
 
40334
40334
  const tagName$1u = 'div';
40335
- const idGen$n = new IDGenerator('wm_html');
40335
+ const idGen$o = new IDGenerator('wm_html');
40336
40336
  register('wm-html', () => {
40337
40337
  return {
40338
40338
  pre: (attrs) => {
40339
- const counter = idGen$n.nextUid();
40339
+ const counter = idGen$o.nextUid();
40340
40340
  return `<${tagName$1u} wmHtml #${counter}="wmHtml" [attr.aria-label]="${counter}.hint || 'HTML content'" ${getAttrMarkup(attrs)}>`;
40341
40341
  },
40342
40342
  post: () => `</${tagName$1u}>`
@@ -40378,11 +40378,11 @@ var iframe_build$1 = /*#__PURE__*/Object.freeze({
40378
40378
  });
40379
40379
 
40380
40380
  const tagName$1r = 'label';
40381
- const idGen$m = new IDGenerator('wm_label');
40381
+ const idGen$n = new IDGenerator('wm_label');
40382
40382
  register('wm-label', () => {
40383
40383
  return {
40384
40384
  pre: (attrs) => {
40385
- const counter = idGen$m.nextUid();
40385
+ const counter = idGen$n.nextUid();
40386
40386
  return `<${tagName$1r} wmLabel #${counter}="wmLabel" [attr.aria-label]="${counter}.hint || 'Label text'" ${getAttrMarkup(attrs)}>`;
40387
40387
  },
40388
40388
  post: () => `</${tagName$1r}>`
@@ -40396,11 +40396,11 @@ var label_build$1 = /*#__PURE__*/Object.freeze({
40396
40396
  });
40397
40397
 
40398
40398
  const tagName$1q = 'img';
40399
- const idGen$l = new IDGenerator('wm_picture');
40399
+ const idGen$m = new IDGenerator('wm_picture');
40400
40400
  register('wm-picture', () => {
40401
40401
  return {
40402
40402
  pre: (attrs) => {
40403
- const counter = idGen$l.nextUid();
40403
+ const counter = idGen$m.nextUid();
40404
40404
  return `<${tagName$1q} wmPicture #${counter}="wmPicture" alt="image" wmImageCache="${attrs.get('offline') || 'true'}" [attr.aria-label]="${counter}.hint || 'Image'" ${getAttrMarkup(attrs)}>`;
40405
40405
  }
40406
40406
  };
@@ -40413,11 +40413,11 @@ var picture_build$1 = /*#__PURE__*/Object.freeze({
40413
40413
  });
40414
40414
 
40415
40415
  const tagName$1p = 'div';
40416
- const idGen$k = new IDGenerator('wm_spinner');
40416
+ const idGen$l = new IDGenerator('wm_spinner');
40417
40417
  register('wm-spinner', () => {
40418
40418
  return {
40419
40419
  pre: (attrs) => {
40420
- const counter = idGen$k.nextUid();
40420
+ const counter = idGen$l.nextUid();
40421
40421
  return `<${tagName$1p} wmSpinner #${counter}="wmSpinner" role="alert" [attr.aria-label]="${counter}.hint || 'Loading...'" aria-live="assertive" aria-busy="true" ${getAttrMarkup(attrs)}>`;
40422
40422
  },
40423
40423
  post: () => `</${tagName$1p}>`
@@ -40490,11 +40490,11 @@ var progressCircle_build$1 = /*#__PURE__*/Object.freeze({
40490
40490
  });
40491
40491
 
40492
40492
  const tagName$1m = 'div';
40493
- const idGen$j = new IDGenerator('wm_richtexteditor');
40493
+ const idGen$k = new IDGenerator('wm_richtexteditor');
40494
40494
  register('wm-richtexteditor', () => {
40495
40495
  return {
40496
40496
  pre: (attrs) => {
40497
- const counter = idGen$j.nextUid();
40497
+ const counter = idGen$k.nextUid();
40498
40498
  return `<${tagName$1m} wmRichTextEditor #${counter}="wmRichTextEditor" role="textbox" [attr.aria-label]="${counter}.hint || 'Richtext editor'" ${getFormMarkupAttr(attrs)}>`;
40499
40499
  },
40500
40500
  post: () => `</${tagName$1m}>`
@@ -40607,14 +40607,14 @@ var chart_build$1 = /*#__PURE__*/Object.freeze({
40607
40607
 
40608
40608
  const tagName$1e = 'div';
40609
40609
  const dataSetKey$4 = 'dataset';
40610
- const idGen$i = new IDGenerator('wm_accordion_ref_');
40610
+ const idGen$j = new IDGenerator('wm_accordion_ref_');
40611
40611
  const isDynamicAccordion = node => node.attrs.find(attr => attr.name === 'type' && attr.value === 'dynamic');
40612
40612
  const ɵ0$a$1 = isDynamicAccordion;
40613
40613
  register('wm-accordion', () => {
40614
40614
  return {
40615
40615
  pre: (attrs, shared) => {
40616
40616
  // generating unique Id for the accordion
40617
- const counter = idGen$i.nextUid();
40617
+ const counter = idGen$j.nextUid();
40618
40618
  shared.set('accordion_ref', counter);
40619
40619
  return `<${tagName$1e} wmAccordion #${counter}="wmAccordion" role="tablist" aria-multiselectable="true" ${getAttrMarkup(attrs)}>`;
40620
40620
  },
@@ -40721,11 +40721,11 @@ var layoutGrid_build$1 = /*#__PURE__*/Object.freeze({
40721
40721
  });
40722
40722
 
40723
40723
  const tagName$18 = 'div';
40724
- const idGen$h = new IDGenerator('wm_panel');
40724
+ const idGen$i = new IDGenerator('wm_panel');
40725
40725
  register('wm-panel', () => {
40726
40726
  return {
40727
40727
  pre: (attrs) => {
40728
- const counter = idGen$h.nextUid();
40728
+ const counter = idGen$i.nextUid();
40729
40729
  return `<${tagName$18} wmPanel #${counter}="wmPanel" partialContainer [attr.aria-label]="${counter}.hint || 'Panel'" wm-navigable-element="true" ${getAttrMarkup(attrs)}>`;
40730
40730
  },
40731
40731
  post: () => `</${tagName$18}>`
@@ -40800,14 +40800,14 @@ var repeatTemplate_build$1 = /*#__PURE__*/Object.freeze({
40800
40800
 
40801
40801
  const tagName$15 = 'div';
40802
40802
  const dataSetKey$3 = 'dataset';
40803
- const idGen$g = new IDGenerator('wm_tabs_ref_');
40803
+ const idGen$h = new IDGenerator('wm_tabs_ref_');
40804
40804
  const isDynamicTabs = node => node.attrs.find(attr => attr.name === 'type' && attr.value === 'dynamic');
40805
40805
  const ɵ0$9$1 = isDynamicTabs;
40806
40806
  register('wm-tabs', () => {
40807
40807
  return {
40808
40808
  pre: (attrs, shared) => {
40809
40809
  // generating unique Id for the tabs
40810
- const counter = idGen$g.nextUid();
40810
+ const counter = idGen$h.nextUid();
40811
40811
  shared.set('tabs_ref', counter);
40812
40812
  return `<${tagName$15} wmTabs #${counter}="wmTabs" ${getAttrMarkup(attrs)}>`;
40813
40813
  },
@@ -40886,11 +40886,11 @@ var wizard_build$1 = /*#__PURE__*/Object.freeze({
40886
40886
  });
40887
40887
 
40888
40888
  const tagName$11 = 'form';
40889
- const idGen$f = new IDGenerator('wizard_step_id_');
40889
+ const idGen$g = new IDGenerator('wizard_step_id_');
40890
40890
  register('wm-wizardstep', () => {
40891
40891
  return {
40892
40892
  pre: attrs => {
40893
- const counter = idGen$f.nextUid();
40893
+ const counter = idGen$g.nextUid();
40894
40894
  return `<${tagName$11} wmWizardStep #${counter}="wmWizardStep" ${getAttrMarkup(attrs)}>
40895
40895
  <ng-template [ngIf]="${counter}.isInitialized">`;
40896
40896
  },
@@ -40905,11 +40905,11 @@ var wizardStep_build$1 = /*#__PURE__*/Object.freeze({
40905
40905
  });
40906
40906
 
40907
40907
  const tagName$10 = 'button';
40908
- const idGen$e = new IDGenerator('wm_barcodescanner');
40908
+ const idGen$f = new IDGenerator('wm_barcodescanner');
40909
40909
  register('wm-barcodescanner', () => {
40910
40910
  return {
40911
40911
  pre: (attrs) => {
40912
- const counter = idGen$e.nextUid();
40912
+ const counter = idGen$f.nextUid();
40913
40913
  return `<${tagName$10} wmBarcodescanner #${counter}="wmBarcodescanner" [attr.aria-label]="${counter}.hint || 'Barcode scanner'" ${getAttrMarkup(attrs)}>`;
40914
40914
  },
40915
40915
  post: () => `</${tagName$10}>`
@@ -40923,11 +40923,11 @@ var barcodeScanner_build$1 = /*#__PURE__*/Object.freeze({
40923
40923
  });
40924
40924
 
40925
40925
  const tagName$$ = 'button';
40926
- const idGen$d = new IDGenerator('wm_camera');
40926
+ const idGen$e = new IDGenerator('wm_camera');
40927
40927
  register('wm-camera', () => {
40928
40928
  return {
40929
40929
  pre: (attrs) => {
40930
- const counter = idGen$d.nextUid();
40930
+ const counter = idGen$e.nextUid();
40931
40931
  return `<${tagName$$} type='button' wmCamera #${counter}="wmCamera" [attr.aria-label]="${counter}.hint || 'Camera'" ${getAttrMarkup(attrs)}>`;
40932
40932
  },
40933
40933
  post: () => `</${tagName$$}>`
@@ -40985,7 +40985,7 @@ var dialogFooter_build$1 = /*#__PURE__*/Object.freeze({
40985
40985
  const tagName$X = 'div';
40986
40986
  register('wm-dialog', () => {
40987
40987
  return {
40988
- pre: attrs => `<${tagName$X} wmDialog ${getAttrMarkup(attrs)} wm-navigable-element="true"><ng-template #dialogBody>`,
40988
+ pre: attrs => `<${tagName$X} wmDialog ${getAttrMarkup(attrs)} aria-modal="true" role="dialog" wm-navigable-element="true"><ng-template #dialogBody>`,
40989
40989
  post: () => `</ng-template></${tagName$X}>`
40990
40990
  };
40991
40991
  });
@@ -41144,7 +41144,7 @@ const getEditModeWidget = colDef => {
41144
41144
  };
41145
41145
 
41146
41146
  const tagName$T = 'div';
41147
- const idGen$c = new IDGenerator('formfield_');
41147
+ const idGen$d = new IDGenerator('formfield_');
41148
41148
  const getEventsTemplate = (attrs) => {
41149
41149
  const eventAttrs = new Map();
41150
41150
  if (!attrs.has('focus.event')) {
@@ -41249,7 +41249,7 @@ const registerFormField = (isFormField) => {
41249
41249
  return {
41250
41250
  requires: ['wm-form', 'wm-liveform', 'wm-livefilter', 'wm-list'],
41251
41251
  pre: (attrs, shared, parentForm, parentLiveForm, parentFilter, parentList) => {
41252
- const counter = idGen$c.nextUid();
41252
+ const counter = idGen$d.nextUid();
41253
41253
  const parent = parentForm || parentLiveForm || parentFilter;
41254
41254
  const pCounter = (parent && parent.get('form_reference')) || 'form';
41255
41255
  const widgetType = attrs.get('widget') || FormWidgetType.TEXT;
@@ -41334,7 +41334,7 @@ var formAction_build$1 = /*#__PURE__*/Object.freeze({
41334
41334
  });
41335
41335
 
41336
41336
  const tagName$R = 'form';
41337
- const idGen$b = new IDGenerator('form_');
41337
+ const idGen$c = new IDGenerator('form_');
41338
41338
  const formWidgets$1 = new Set([
41339
41339
  'wm-text',
41340
41340
  'wm-textarea',
@@ -41404,7 +41404,7 @@ const buildTask = (directiveAttr = '') => {
41404
41404
  let tmpl;
41405
41405
  let dialogId;
41406
41406
  const role = parentLoginWidget && parentLoginWidget.get('isLogin') ? 'app-login' : '';
41407
- const counter = idGen$b.nextUid();
41407
+ const counter = idGen$c.nextUid();
41408
41408
  const dependsOn = attrs.get('dependson') ? `dependson="${attrs.get('dependson')}"` : '';
41409
41409
  const classProp = attrs.get('formlayout') === 'page' ? 'app-device-liveform panel liveform-inline' : '';
41410
41410
  const dialogAttributes = ['title', 'title.bind', 'iconclass', 'iconclass.bind', 'width'];
@@ -41557,11 +41557,11 @@ var buttonGroup_build$1 = /*#__PURE__*/Object.freeze({
41557
41557
  });
41558
41558
 
41559
41559
  const tagName$L = 'button';
41560
- const idGen$a = new IDGenerator('wm_button');
41560
+ const idGen$b = new IDGenerator('wm_button');
41561
41561
  register('wm-button', () => {
41562
41562
  return {
41563
41563
  pre: (attrs) => {
41564
- const counter = idGen$a.nextUid();
41564
+ const counter = idGen$b.nextUid();
41565
41565
  return `<${tagName$L} wmButton #${counter}="wmButton" [attr.aria-label]="${counter}.hint || ${counter}.caption || 'Button'" ${getAttrMarkup(attrs)}>`;
41566
41566
  },
41567
41567
  post: () => `</${tagName$L}>`
@@ -41659,11 +41659,11 @@ var select_build$1 = /*#__PURE__*/Object.freeze({
41659
41659
  });
41660
41660
 
41661
41661
  const tagName$E = 'div';
41662
- const idGen$9 = new IDGenerator('wm_switch');
41662
+ const idGen$a = new IDGenerator('wm_switch');
41663
41663
  register('wm-switch', () => {
41664
41664
  return {
41665
41665
  pre: (attrs) => {
41666
- const counter = idGen$9.nextUid();
41666
+ const counter = idGen$a.nextUid();
41667
41667
  return `<${tagName$E} wmSwitch #${counter}="wmSwitch" [attr.aria-label]="${counter}.hint || 'Switch button'" ${getFormMarkupAttr(attrs)} ${getNgModelAttr(attrs)}>`;
41668
41668
  },
41669
41669
  post: () => `</${tagName$E}>`
@@ -41943,11 +41943,11 @@ var list_build$1 = /*#__PURE__*/Object.freeze({
41943
41943
  });
41944
41944
 
41945
41945
  const tagName$t = 'div';
41946
- const idGen$8 = new IDGenerator('liveform_dialog_id_');
41946
+ const idGen$9 = new IDGenerator('liveform_dialog_id_');
41947
41947
  register('wm-livetable', () => {
41948
41948
  return {
41949
41949
  pre: (attrs, shared) => {
41950
- const counter = idGen$8.nextUid();
41950
+ const counter = idGen$9.nextUid();
41951
41951
  shared.set('counter', counter);
41952
41952
  return `<${tagName$t} wmLiveTable role="table" ${getAttrMarkup(attrs)} dialogid="${counter}">`;
41953
41953
  },
@@ -41967,9 +41967,13 @@ var liveTable_build$1 = /*#__PURE__*/Object.freeze({
41967
41967
  });
41968
41968
 
41969
41969
  const tagName$s = 'p';
41970
+ const idGen$8 = new IDGenerator('wm_message');
41970
41971
  register('wm-message', () => {
41971
41972
  return {
41972
- pre: attrs => `<${tagName$s} wmMessage aria-label="Notification Alerts" ${getAttrMarkup(attrs)}>`,
41973
+ pre: (attrs) => {
41974
+ const counter = idGen$8.nextUid();
41975
+ return `<${tagName$s} wmMessage tabindex="0" #${counter}="wmMessage" ${getAttrMarkup(attrs)}>`;
41976
+ },
41973
41977
  post: () => `</${tagName$s}>`
41974
41978
  };
41975
41979
  });
@@ -42380,7 +42384,7 @@ var partialParam_build$1 = /*#__PURE__*/Object.freeze({
42380
42384
  const tagName$8 = 'section';
42381
42385
  register('wm-prefab', () => {
42382
42386
  return {
42383
- pre: attrs => `<${tagName$8} wmPrefab data-role="perfab" ${getAttrMarkup(attrs)}>`,
42387
+ pre: attrs => `<${tagName$8} wmPrefab redrawable data-role="perfab" ${getAttrMarkup(attrs)}>`,
42384
42388
  post: () => `</${tagName$8}>`
42385
42389
  };
42386
42390
  });
@@ -42870,6 +42874,11 @@ register('wm-table', () => {
42870
42874
  });
42871
42875
  assignColumnIndex(node.children);
42872
42876
  shared.set('isdynamictable', isColumnsPresent ? 'false' : 'true');
42877
+ // If table have row expansion enabled, set isrowexpansionenabled to true
42878
+ const isRowsPresent = node.children.some(childNode => {
42879
+ return childNode.name === 'wm-table-row';
42880
+ });
42881
+ shared.set('isrowexpansionenabled', isRowsPresent ? 'true' : 'false');
42873
42882
  }
42874
42883
  else {
42875
42884
  shared.set('isdynamictable', 'true');
@@ -42889,6 +42898,7 @@ register('wm-table', () => {
42889
42898
  const counter = idGen.nextUid();
42890
42899
  shared.set('counter', counter);
42891
42900
  attrs.set('isdynamictable', shared.get('isdynamictable'));
42901
+ attrs.set('isrowexpansionenabled', shared.get('isrowexpansionenabled'));
42892
42902
  attrs.set('table_reference', counter);
42893
42903
  return `<${tagName$1} wmTable="${counter}" wmTableFilterSort wmTableCUD #${counter} data-identifier="table" role="table" ${getAttrMarkup(attrs)}>`;
42894
42904
  },
@@ -40192,14 +40192,14 @@ const scopeComponentStyles = (componentName, componentType, styles = '') => {
40192
40192
 
40193
40193
  const carouselTagName = 'carousel';
40194
40194
  const dataSetKey$5 = 'dataset';
40195
- const idGen$p = new IDGenerator('wm_carousel_ref_');
40195
+ const idGen$q = new IDGenerator('wm_carousel_ref_');
40196
40196
  const isDynamicCarousel = node => node.attrs.find(attr => attr.name === 'type' && attr.value === 'dynamic');
40197
40197
  const ɵ0$c$1 = isDynamicCarousel;
40198
40198
  register('wm-carousel', () => {
40199
40199
  return {
40200
40200
  pre: (attrs, shared) => {
40201
40201
  // generating unique Id for the carousel
40202
- const counter = idGen$p.nextUid();
40202
+ const counter = idGen$q.nextUid();
40203
40203
  shared.set('carousel_ref', counter);
40204
40204
  return `<div class="app-carousel carousel"><${carouselTagName} wmCarousel #${counter}="wmCarousel" ${getAttrMarkup(attrs)} interval="0" [ngClass]="${counter}.navigationClass">`;
40205
40205
  },
@@ -40300,11 +40300,11 @@ var marquee_build$1 = /*#__PURE__*/Object.freeze({
40300
40300
  });
40301
40301
 
40302
40302
  const tagName$1w = 'a';
40303
- const idGen$o = new IDGenerator('wm_anchor');
40303
+ const idGen$p = new IDGenerator('wm_anchor');
40304
40304
  register('wm-anchor', () => {
40305
40305
  return {
40306
40306
  pre: (attrs) => {
40307
- const counter = idGen$o.nextUid();
40307
+ const counter = idGen$p.nextUid();
40308
40308
  return `<${tagName$1w} wmAnchor #${counter}="wmAnchor" role="link" data-identifier="anchor" [attr.aria-label]="${counter}.hint || ${counter}.caption || 'Link'" ${getAttrMarkup(attrs)}>`;
40309
40309
  },
40310
40310
  post: () => `</${tagName$1w}>`
@@ -40332,11 +40332,11 @@ var audio_build$1 = /*#__PURE__*/Object.freeze({
40332
40332
  });
40333
40333
 
40334
40334
  const tagName$1u = 'div';
40335
- const idGen$n = new IDGenerator('wm_html');
40335
+ const idGen$o = new IDGenerator('wm_html');
40336
40336
  register('wm-html', () => {
40337
40337
  return {
40338
40338
  pre: (attrs) => {
40339
- const counter = idGen$n.nextUid();
40339
+ const counter = idGen$o.nextUid();
40340
40340
  return `<${tagName$1u} wmHtml #${counter}="wmHtml" [attr.aria-label]="${counter}.hint || 'HTML content'" ${getAttrMarkup(attrs)}>`;
40341
40341
  },
40342
40342
  post: () => `</${tagName$1u}>`
@@ -40378,11 +40378,11 @@ var iframe_build$1 = /*#__PURE__*/Object.freeze({
40378
40378
  });
40379
40379
 
40380
40380
  const tagName$1r = 'label';
40381
- const idGen$m = new IDGenerator('wm_label');
40381
+ const idGen$n = new IDGenerator('wm_label');
40382
40382
  register('wm-label', () => {
40383
40383
  return {
40384
40384
  pre: (attrs) => {
40385
- const counter = idGen$m.nextUid();
40385
+ const counter = idGen$n.nextUid();
40386
40386
  return `<${tagName$1r} wmLabel #${counter}="wmLabel" [attr.aria-label]="${counter}.hint || 'Label text'" ${getAttrMarkup(attrs)}>`;
40387
40387
  },
40388
40388
  post: () => `</${tagName$1r}>`
@@ -40396,11 +40396,11 @@ var label_build$1 = /*#__PURE__*/Object.freeze({
40396
40396
  });
40397
40397
 
40398
40398
  const tagName$1q = 'img';
40399
- const idGen$l = new IDGenerator('wm_picture');
40399
+ const idGen$m = new IDGenerator('wm_picture');
40400
40400
  register('wm-picture', () => {
40401
40401
  return {
40402
40402
  pre: (attrs) => {
40403
- const counter = idGen$l.nextUid();
40403
+ const counter = idGen$m.nextUid();
40404
40404
  return `<${tagName$1q} wmPicture #${counter}="wmPicture" alt="image" wmImageCache="${attrs.get('offline') || 'true'}" [attr.aria-label]="${counter}.hint || 'Image'" ${getAttrMarkup(attrs)}>`;
40405
40405
  }
40406
40406
  };
@@ -40413,11 +40413,11 @@ var picture_build$1 = /*#__PURE__*/Object.freeze({
40413
40413
  });
40414
40414
 
40415
40415
  const tagName$1p = 'div';
40416
- const idGen$k = new IDGenerator('wm_spinner');
40416
+ const idGen$l = new IDGenerator('wm_spinner');
40417
40417
  register('wm-spinner', () => {
40418
40418
  return {
40419
40419
  pre: (attrs) => {
40420
- const counter = idGen$k.nextUid();
40420
+ const counter = idGen$l.nextUid();
40421
40421
  return `<${tagName$1p} wmSpinner #${counter}="wmSpinner" role="alert" [attr.aria-label]="${counter}.hint || 'Loading...'" aria-live="assertive" aria-busy="true" ${getAttrMarkup(attrs)}>`;
40422
40422
  },
40423
40423
  post: () => `</${tagName$1p}>`
@@ -40490,11 +40490,11 @@ var progressCircle_build$1 = /*#__PURE__*/Object.freeze({
40490
40490
  });
40491
40491
 
40492
40492
  const tagName$1m = 'div';
40493
- const idGen$j = new IDGenerator('wm_richtexteditor');
40493
+ const idGen$k = new IDGenerator('wm_richtexteditor');
40494
40494
  register('wm-richtexteditor', () => {
40495
40495
  return {
40496
40496
  pre: (attrs) => {
40497
- const counter = idGen$j.nextUid();
40497
+ const counter = idGen$k.nextUid();
40498
40498
  return `<${tagName$1m} wmRichTextEditor #${counter}="wmRichTextEditor" role="textbox" [attr.aria-label]="${counter}.hint || 'Richtext editor'" ${getFormMarkupAttr(attrs)}>`;
40499
40499
  },
40500
40500
  post: () => `</${tagName$1m}>`
@@ -40607,14 +40607,14 @@ var chart_build$1 = /*#__PURE__*/Object.freeze({
40607
40607
 
40608
40608
  const tagName$1e = 'div';
40609
40609
  const dataSetKey$4 = 'dataset';
40610
- const idGen$i = new IDGenerator('wm_accordion_ref_');
40610
+ const idGen$j = new IDGenerator('wm_accordion_ref_');
40611
40611
  const isDynamicAccordion = node => node.attrs.find(attr => attr.name === 'type' && attr.value === 'dynamic');
40612
40612
  const ɵ0$a$1 = isDynamicAccordion;
40613
40613
  register('wm-accordion', () => {
40614
40614
  return {
40615
40615
  pre: (attrs, shared) => {
40616
40616
  // generating unique Id for the accordion
40617
- const counter = idGen$i.nextUid();
40617
+ const counter = idGen$j.nextUid();
40618
40618
  shared.set('accordion_ref', counter);
40619
40619
  return `<${tagName$1e} wmAccordion #${counter}="wmAccordion" role="tablist" aria-multiselectable="true" ${getAttrMarkup(attrs)}>`;
40620
40620
  },
@@ -40721,11 +40721,11 @@ var layoutGrid_build$1 = /*#__PURE__*/Object.freeze({
40721
40721
  });
40722
40722
 
40723
40723
  const tagName$18 = 'div';
40724
- const idGen$h = new IDGenerator('wm_panel');
40724
+ const idGen$i = new IDGenerator('wm_panel');
40725
40725
  register('wm-panel', () => {
40726
40726
  return {
40727
40727
  pre: (attrs) => {
40728
- const counter = idGen$h.nextUid();
40728
+ const counter = idGen$i.nextUid();
40729
40729
  return `<${tagName$18} wmPanel #${counter}="wmPanel" partialContainer [attr.aria-label]="${counter}.hint || 'Panel'" wm-navigable-element="true" ${getAttrMarkup(attrs)}>`;
40730
40730
  },
40731
40731
  post: () => `</${tagName$18}>`
@@ -40800,14 +40800,14 @@ var repeatTemplate_build$1 = /*#__PURE__*/Object.freeze({
40800
40800
 
40801
40801
  const tagName$15 = 'div';
40802
40802
  const dataSetKey$3 = 'dataset';
40803
- const idGen$g = new IDGenerator('wm_tabs_ref_');
40803
+ const idGen$h = new IDGenerator('wm_tabs_ref_');
40804
40804
  const isDynamicTabs = node => node.attrs.find(attr => attr.name === 'type' && attr.value === 'dynamic');
40805
40805
  const ɵ0$9$1 = isDynamicTabs;
40806
40806
  register('wm-tabs', () => {
40807
40807
  return {
40808
40808
  pre: (attrs, shared) => {
40809
40809
  // generating unique Id for the tabs
40810
- const counter = idGen$g.nextUid();
40810
+ const counter = idGen$h.nextUid();
40811
40811
  shared.set('tabs_ref', counter);
40812
40812
  return `<${tagName$15} wmTabs #${counter}="wmTabs" ${getAttrMarkup(attrs)}>`;
40813
40813
  },
@@ -40886,11 +40886,11 @@ var wizard_build$1 = /*#__PURE__*/Object.freeze({
40886
40886
  });
40887
40887
 
40888
40888
  const tagName$11 = 'form';
40889
- const idGen$f = new IDGenerator('wizard_step_id_');
40889
+ const idGen$g = new IDGenerator('wizard_step_id_');
40890
40890
  register('wm-wizardstep', () => {
40891
40891
  return {
40892
40892
  pre: attrs => {
40893
- const counter = idGen$f.nextUid();
40893
+ const counter = idGen$g.nextUid();
40894
40894
  return `<${tagName$11} wmWizardStep #${counter}="wmWizardStep" ${getAttrMarkup(attrs)}>
40895
40895
  <ng-template [ngIf]="${counter}.isInitialized">`;
40896
40896
  },
@@ -40905,11 +40905,11 @@ var wizardStep_build$1 = /*#__PURE__*/Object.freeze({
40905
40905
  });
40906
40906
 
40907
40907
  const tagName$10 = 'button';
40908
- const idGen$e = new IDGenerator('wm_barcodescanner');
40908
+ const idGen$f = new IDGenerator('wm_barcodescanner');
40909
40909
  register('wm-barcodescanner', () => {
40910
40910
  return {
40911
40911
  pre: (attrs) => {
40912
- const counter = idGen$e.nextUid();
40912
+ const counter = idGen$f.nextUid();
40913
40913
  return `<${tagName$10} wmBarcodescanner #${counter}="wmBarcodescanner" [attr.aria-label]="${counter}.hint || 'Barcode scanner'" ${getAttrMarkup(attrs)}>`;
40914
40914
  },
40915
40915
  post: () => `</${tagName$10}>`
@@ -40923,11 +40923,11 @@ var barcodeScanner_build$1 = /*#__PURE__*/Object.freeze({
40923
40923
  });
40924
40924
 
40925
40925
  const tagName$$ = 'button';
40926
- const idGen$d = new IDGenerator('wm_camera');
40926
+ const idGen$e = new IDGenerator('wm_camera');
40927
40927
  register('wm-camera', () => {
40928
40928
  return {
40929
40929
  pre: (attrs) => {
40930
- const counter = idGen$d.nextUid();
40930
+ const counter = idGen$e.nextUid();
40931
40931
  return `<${tagName$$} type='button' wmCamera #${counter}="wmCamera" [attr.aria-label]="${counter}.hint || 'Camera'" ${getAttrMarkup(attrs)}>`;
40932
40932
  },
40933
40933
  post: () => `</${tagName$$}>`
@@ -40985,7 +40985,7 @@ var dialogFooter_build$1 = /*#__PURE__*/Object.freeze({
40985
40985
  const tagName$X = 'div';
40986
40986
  register('wm-dialog', () => {
40987
40987
  return {
40988
- pre: attrs => `<${tagName$X} wmDialog ${getAttrMarkup(attrs)} wm-navigable-element="true"><ng-template #dialogBody>`,
40988
+ pre: attrs => `<${tagName$X} wmDialog ${getAttrMarkup(attrs)} aria-modal="true" role="dialog" wm-navigable-element="true"><ng-template #dialogBody>`,
40989
40989
  post: () => `</ng-template></${tagName$X}>`
40990
40990
  };
40991
40991
  });
@@ -41144,7 +41144,7 @@ const getEditModeWidget = colDef => {
41144
41144
  };
41145
41145
 
41146
41146
  const tagName$T = 'div';
41147
- const idGen$c = new IDGenerator('formfield_');
41147
+ const idGen$d = new IDGenerator('formfield_');
41148
41148
  const getEventsTemplate = (attrs) => {
41149
41149
  const eventAttrs = new Map();
41150
41150
  if (!attrs.has('focus.event')) {
@@ -41249,7 +41249,7 @@ const registerFormField = (isFormField) => {
41249
41249
  return {
41250
41250
  requires: ['wm-form', 'wm-liveform', 'wm-livefilter', 'wm-list'],
41251
41251
  pre: (attrs, shared, parentForm, parentLiveForm, parentFilter, parentList) => {
41252
- const counter = idGen$c.nextUid();
41252
+ const counter = idGen$d.nextUid();
41253
41253
  const parent = parentForm || parentLiveForm || parentFilter;
41254
41254
  const pCounter = (parent && parent.get('form_reference')) || 'form';
41255
41255
  const widgetType = attrs.get('widget') || FormWidgetType.TEXT;
@@ -41334,7 +41334,7 @@ var formAction_build$1 = /*#__PURE__*/Object.freeze({
41334
41334
  });
41335
41335
 
41336
41336
  const tagName$R = 'form';
41337
- const idGen$b = new IDGenerator('form_');
41337
+ const idGen$c = new IDGenerator('form_');
41338
41338
  const formWidgets$1 = new Set([
41339
41339
  'wm-text',
41340
41340
  'wm-textarea',
@@ -41404,7 +41404,7 @@ const buildTask = (directiveAttr = '') => {
41404
41404
  let tmpl;
41405
41405
  let dialogId;
41406
41406
  const role = parentLoginWidget && parentLoginWidget.get('isLogin') ? 'app-login' : '';
41407
- const counter = idGen$b.nextUid();
41407
+ const counter = idGen$c.nextUid();
41408
41408
  const dependsOn = attrs.get('dependson') ? `dependson="${attrs.get('dependson')}"` : '';
41409
41409
  const classProp = attrs.get('formlayout') === 'page' ? 'app-device-liveform panel liveform-inline' : '';
41410
41410
  const dialogAttributes = ['title', 'title.bind', 'iconclass', 'iconclass.bind', 'width'];
@@ -41557,11 +41557,11 @@ var buttonGroup_build$1 = /*#__PURE__*/Object.freeze({
41557
41557
  });
41558
41558
 
41559
41559
  const tagName$L = 'button';
41560
- const idGen$a = new IDGenerator('wm_button');
41560
+ const idGen$b = new IDGenerator('wm_button');
41561
41561
  register('wm-button', () => {
41562
41562
  return {
41563
41563
  pre: (attrs) => {
41564
- const counter = idGen$a.nextUid();
41564
+ const counter = idGen$b.nextUid();
41565
41565
  return `<${tagName$L} wmButton #${counter}="wmButton" [attr.aria-label]="${counter}.hint || ${counter}.caption || 'Button'" ${getAttrMarkup(attrs)}>`;
41566
41566
  },
41567
41567
  post: () => `</${tagName$L}>`
@@ -41659,11 +41659,11 @@ var select_build$1 = /*#__PURE__*/Object.freeze({
41659
41659
  });
41660
41660
 
41661
41661
  const tagName$E = 'div';
41662
- const idGen$9 = new IDGenerator('wm_switch');
41662
+ const idGen$a = new IDGenerator('wm_switch');
41663
41663
  register('wm-switch', () => {
41664
41664
  return {
41665
41665
  pre: (attrs) => {
41666
- const counter = idGen$9.nextUid();
41666
+ const counter = idGen$a.nextUid();
41667
41667
  return `<${tagName$E} wmSwitch #${counter}="wmSwitch" [attr.aria-label]="${counter}.hint || 'Switch button'" ${getFormMarkupAttr(attrs)} ${getNgModelAttr(attrs)}>`;
41668
41668
  },
41669
41669
  post: () => `</${tagName$E}>`
@@ -41943,11 +41943,11 @@ var list_build$1 = /*#__PURE__*/Object.freeze({
41943
41943
  });
41944
41944
 
41945
41945
  const tagName$t = 'div';
41946
- const idGen$8 = new IDGenerator('liveform_dialog_id_');
41946
+ const idGen$9 = new IDGenerator('liveform_dialog_id_');
41947
41947
  register('wm-livetable', () => {
41948
41948
  return {
41949
41949
  pre: (attrs, shared) => {
41950
- const counter = idGen$8.nextUid();
41950
+ const counter = idGen$9.nextUid();
41951
41951
  shared.set('counter', counter);
41952
41952
  return `<${tagName$t} wmLiveTable role="table" ${getAttrMarkup(attrs)} dialogid="${counter}">`;
41953
41953
  },
@@ -41967,9 +41967,13 @@ var liveTable_build$1 = /*#__PURE__*/Object.freeze({
41967
41967
  });
41968
41968
 
41969
41969
  const tagName$s = 'p';
41970
+ const idGen$8 = new IDGenerator('wm_message');
41970
41971
  register('wm-message', () => {
41971
41972
  return {
41972
- pre: attrs => `<${tagName$s} wmMessage aria-label="Notification Alerts" ${getAttrMarkup(attrs)}>`,
41973
+ pre: (attrs) => {
41974
+ const counter = idGen$8.nextUid();
41975
+ return `<${tagName$s} wmMessage tabindex="0" #${counter}="wmMessage" ${getAttrMarkup(attrs)}>`;
41976
+ },
41973
41977
  post: () => `</${tagName$s}>`
41974
41978
  };
41975
41979
  });
@@ -42380,7 +42384,7 @@ var partialParam_build$1 = /*#__PURE__*/Object.freeze({
42380
42384
  const tagName$8 = 'section';
42381
42385
  register('wm-prefab', () => {
42382
42386
  return {
42383
- pre: attrs => `<${tagName$8} wmPrefab data-role="perfab" ${getAttrMarkup(attrs)}>`,
42387
+ pre: attrs => `<${tagName$8} wmPrefab redrawable data-role="perfab" ${getAttrMarkup(attrs)}>`,
42384
42388
  post: () => `</${tagName$8}>`
42385
42389
  };
42386
42390
  });
@@ -42870,6 +42874,11 @@ register('wm-table', () => {
42870
42874
  });
42871
42875
  assignColumnIndex(node.children);
42872
42876
  shared.set('isdynamictable', isColumnsPresent ? 'false' : 'true');
42877
+ // If table have row expansion enabled, set isrowexpansionenabled to true
42878
+ const isRowsPresent = node.children.some(childNode => {
42879
+ return childNode.name === 'wm-table-row';
42880
+ });
42881
+ shared.set('isrowexpansionenabled', isRowsPresent ? 'true' : 'false');
42873
42882
  }
42874
42883
  else {
42875
42884
  shared.set('isdynamictable', 'true');
@@ -42889,6 +42898,7 @@ register('wm-table', () => {
42889
42898
  const counter = idGen.nextUid();
42890
42899
  shared.set('counter', counter);
42891
42900
  attrs.set('isdynamictable', shared.get('isdynamictable'));
42901
+ attrs.set('isrowexpansionenabled', shared.get('isrowexpansionenabled'));
42892
42902
  attrs.set('table_reference', counter);
42893
42903
  return `<${tagName$1} wmTable="${counter}" wmTableFilterSort wmTableCUD #${counter} data-identifier="table" role="table" ${getAttrMarkup(attrs)}>`;
42894
42904
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "11.0.0-next.139404",
3
+ "version": "11.0.0-next.139405",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,24 @@
1
+ importScripts("./ngsw-worker.js");
2
+
3
+ (function () {
4
+ "use strict";
5
+
6
+ self.addEventListener("notificationclick", (event) => {
7
+ const notificationUrl = event.notification.data?.url;
8
+ event.notification.close();
9
+ // Enumerate windows, and call window.focus(), or open a new one.
10
+ event.waitUntil(
11
+ clients.matchAll().then((matchedClients) => {
12
+ for (let client of matchedClients) {
13
+ if (!notificationUrl) {
14
+ return client.focus();
15
+ }
16
+ if (client.url === notificationUrl) {
17
+ return client.focus();
18
+ }
19
+ }
20
+ return clients.openWindow(notificationUrl);
21
+ })
22
+ );
23
+ });
24
+ })();
@@ -1 +1 @@
1
- const util=require("util"),fs=require("fs"),ncp=util.promisify(require("ncp").ncp),{writeFile:writeFile,readFileSync:readFileSync,codegenPath:codegenPath}=require("./wm-utils"),PWA_ICONS=["icon-512x512.png","icon-384x384.png","icon-192x192.png","icon-152x152.png","icon-144x144.png","icon-128x128.png","icon-96x96.png","icon-72x72.png"],generatePwaFiles=async(n,s,e)=>{await copyAssets(n,s),await updateManifestJson(s,e)},copyAssets=async(n,s)=>{await ncp(codegenPath+"/pwa-assets/ngsw-config.json",`${s}/ngsw-config.json`),await ncp(codegenPath+"/pwa-assets/manifest.json",`${s}/src/manifest.json`),await copyIcons(n,s)},copyIcons=async(n,s)=>{const e=`${s}/src/assets/icons`;let a;if(fs.existsSync(e)||fs.mkdirSync(e,{recursive:!0}),fs.existsSync(`${n}/pwa-icons`))for(const[s,c]of PWA_ICONS.entries()){const t=`${n}/pwa-icons/${c}`;if(fs.existsSync(t)){if(!a)for(i=0;i<s;i++)await ncp(t,`${e}/${PWA_ICONS[i]}`);a=t,await ncp(t,`${e}/${c}`)}else a&&await ncp(a,`${e}/${c}`)}a||await ncp(`${codegenPath}/pwa-assets/icons`,e)},updateManifestJson=async(n,s)=>{const e=`${n}/src/manifest.json`;let i=readFileSync(e,!0);i.name=s.displayName,i.short_name=s.displayName,await writeFile(e,JSON.stringify(i,null,4))};module.exports={generatePwaFiles:generatePwaFiles,copyIcons:copyIcons,PWA_ICONS:PWA_ICONS};
1
+ const util=require("util"),fs=require("fs"),ncp=util.promisify(require("ncp").ncp),{writeFile:writeFile,readFileSync:readFileSync,codegenPath:codegenPath}=require("./wm-utils"),PWA_ICONS=["icon-512x512.png","icon-384x384.png","icon-192x192.png","icon-152x152.png","icon-144x144.png","icon-128x128.png","icon-96x96.png","icon-72x72.png"],generatePwaFiles=async(s,n,e)=>{await copyAssets(s,n),await updateManifestJson(n,e)},copyAssets=async(s,n)=>{await ncp(codegenPath+"/pwa-assets/ngsw-config.json",`${n}/ngsw-config.json`),await ncp(codegenPath+"/pwa-assets/wmsw-worker.js",`${n}/src/wmsw-worker.js`),await ncp(codegenPath+"/pwa-assets/manifest.json",`${n}/src/manifest.json`),await copyIcons(s,n)},copyIcons=async(s,n)=>{const e=`${n}/src/assets/icons`;let a;if(fs.existsSync(e)||fs.mkdirSync(e,{recursive:!0}),fs.existsSync(`${s}/pwa-icons`))for(const[n,c]of PWA_ICONS.entries()){const t=`${s}/pwa-icons/${c}`;if(fs.existsSync(t)){if(!a)for(i=0;i<n;i++)await ncp(t,`${e}/${PWA_ICONS[i]}`);a=t,await ncp(t,`${e}/${c}`)}else a&&await ncp(a,`${e}/${c}`)}a||await ncp(`${codegenPath}/pwa-assets/icons`,e)},updateManifestJson=async(s,n)=>{const e=`${s}/src/manifest.json`;let i=readFileSync(e,!0);i.name=n.displayName,i.short_name=n.displayName,await writeFile(e,JSON.stringify(i,null,4))};module.exports={generatePwaFiles:generatePwaFiles,copyIcons:copyIcons,PWA_ICONS:PWA_ICONS};
@@ -1 +1 @@
1
- const cheerio=require("cheerio"),{writeFile:writeFile,readFileSync:readFileSync,readDir:readDir,isMobileProject:isMobileProject}=require("./wm-utils"),markScriptsAsLazy=e=>{const s=["./node_modules/d3/d3.min.js","./node_modules/@wavemaker.com/nvd3/build/nv.d3.min.js","./node_modules/fullcalendar/dist/fullcalendar.min.js","./node_modules/summernote/dist/summernote-lite.min.js",global._WM_PACKAGE_PATH+"/scripts/datatable/datatable.js","./node_modules/jquery-ui/ui/widgets/sortable.js","./node_modules/jquery-ui/ui/widgets/droppable.js","./node_modules/jquery-ui/ui/widgets/resizable.js","./node_modules/hammerjs/hammer.min.js","./node_modules/iscroll/build/iscroll.js"];let t=e.replace(/^(\.\/)/,"").replace(/\//g,"-");return t=t.substring(0,t.lastIndexOf(".")),t+="-NOHASH",s.includes(e)?{input:e,lazy:!0,bundleName:t}:e},setBuildCustomizations=async e=>{const s=e.projects["angular-app"].architect.build,t=s.options.scripts;s.options.scripts=t.map(e=>markScriptsAsLazy(e))},getLazyModules=(e=[],s=[],t)=>{const i=e.filter(e=>"PAGE"!=e.type).map(e=>`src/app/partials/${e.name}/${e.name}.module`);for(const e of s.keys()){i.push(`src/app/prefabs/${e}/${e}.module`);const s=t[e];for(var n=0;n<s.length;n++)i.push(`src/app/prefabs/${e}/partials/${s[n].name}/${s[n].name}.module`)}return i},addToScripts=async(e,s,t=[],i=[])=>{const n=`${s}/angular.json`;let a=readFileSync(n,!0);const o=a.projects["angular-app"].architect.build;let l=o.options.scripts;const r=`${s+"/src/app/extensions"}`,c=await readDir(r);c.length&&i.push("./src/app/extensions/"+c[0]),o.options.scripts=[...t,...l,...i],await writeFile(n,JSON.stringify(a,null,4))},updateAngularJSON=async(e,s,t,i,n,a,o,l,r)=>{const c=`${s}/angular.json`;let u=readFileSync(c,!0);const d=u.projects["angular-app"].architect.build;let p=d.options.lazyModules;p.length=0,p.push(...getLazyModules(i,n,l)),a&&a.trim().length>0&&(d.options.deployUrl=a);const m=d.options.styles;if(isMobileProject(t)){const e=m.findIndex(e=>{let s="object"==typeof e;if(s){return(s?e.input:e).includes("themes")}return!1}),s=m[e].input;m[e].bundleName="wm-android-styles",m[e].input=m[e].input.replace(new RegExp("/[a-z]*/style.css$"),`/${t.activeTheme}/android/style.css`);const i=Object.assign({},m[e]);i.input=s.replace(new RegExp("/[a-z]*/style.css$"),`/${t.activeTheme}/ios/style.css`),i.bundleName="wm-ios-styles",m.push(i);const n=m.findIndex(e=>{let s="object"==typeof e;if(s){return"src/assets/app.css"===(s?e.input:e)}return!1});m[n].bundleName="wm-android-styles";const a=Object.assign({},m[n]);a.bundleName="wm-ios-styles",m.push(a)}m.forEach((e,s)=>{let i="object"==typeof e,n=i?e.input:e;!n.includes("themes")||n.includes("/android/")||n.includes("/ios/")||(i?m[s].input=n.replace(new RegExp("/[a-z]*/style.css$"),`/${t.activeTheme}/style.css`):m[s]=n.replace(new RegExp("/[a-z]*/style.css$"),`/${t.activeTheme}/style.css`))}),await setBuildCustomizations(u);const y=d.configurations.production;if(y.aot=!1!==o.aot,y.buildOptimizer=!1!==o.buildOptimizer,r){d.options.assets.push("src/manifest.json"),y.serviceWorker=!0,y.ngswConfigPath="ngsw-config.json",delete d.options.customWebpackConfig}await writeFile(c,JSON.stringify(u,null,4))};module.exports={updateAngularJSON:updateAngularJSON,addToScripts:addToScripts};
1
+ const cheerio=require("cheerio"),{writeFile:writeFile,readFileSync:readFileSync,readDir:readDir,isMobileProject:isMobileProject}=require("./wm-utils"),markScriptsAsLazy=e=>{const s=["./node_modules/d3/d3.min.js","./node_modules/@wavemaker.com/nvd3/build/nv.d3.min.js","./node_modules/fullcalendar/dist/fullcalendar.min.js","./node_modules/summernote/dist/summernote-lite.min.js",global._WM_PACKAGE_PATH+"/scripts/datatable/datatable.js","./node_modules/jquery-ui/ui/widgets/sortable.js","./node_modules/jquery-ui/ui/widgets/droppable.js","./node_modules/jquery-ui/ui/widgets/resizable.js","./node_modules/hammerjs/hammer.min.js","./node_modules/iscroll/build/iscroll.js"];let t=e.replace(/^(\.\/)/,"").replace(/\//g,"-");return t=t.substring(0,t.lastIndexOf(".")),t+="-NOHASH",s.includes(e)?{input:e,lazy:!0,bundleName:t}:e},setBuildCustomizations=async e=>{const s=e.projects["angular-app"].architect.build,t=s.options.scripts;s.options.scripts=t.map(e=>markScriptsAsLazy(e))},getLazyModules=(e=[],s=[],t)=>{const i=e.filter(e=>"PAGE"!=e.type).map(e=>`src/app/partials/${e.name}/${e.name}.module`);for(const e of s.keys()){i.push(`src/app/prefabs/${e}/${e}.module`);const s=t[e];for(var n=0;n<s.length;n++)i.push(`src/app/prefabs/${e}/partials/${s[n].name}/${s[n].name}.module`)}return i},addToScripts=async(e,s,t=[],i=[])=>{const n=`${s}/angular.json`;let a=readFileSync(n,!0);const o=a.projects["angular-app"].architect.build;let r=o.options.scripts;const l=`${s+"/src/app/extensions"}`,c=await readDir(l);c.length&&i.push("./src/app/extensions/"+c[0]),o.options.scripts=[...t,...r,...i],await writeFile(n,JSON.stringify(a,null,4))},updateAngularJSON=async(e,s,t,i,n,a,o,r,l)=>{const c=`${s}/angular.json`;let u=readFileSync(c,!0);const d=u.projects["angular-app"].architect.build;let p=d.options.lazyModules;p.length=0,p.push(...getLazyModules(i,n,r)),a&&a.trim().length>0&&(d.options.deployUrl=a);const m=d.options.styles;if(isMobileProject(t)){const e=m.findIndex(e=>{let s="object"==typeof e;if(s){return(s?e.input:e).includes("themes")}return!1}),s=m[e].input;m[e].bundleName="wm-android-styles",m[e].input=m[e].input.replace(new RegExp("/[a-z]*/style.css$"),`/${t.activeTheme}/android/style.css`);const i=Object.assign({},m[e]);i.input=s.replace(new RegExp("/[a-z]*/style.css$"),`/${t.activeTheme}/ios/style.css`),i.bundleName="wm-ios-styles",m.push(i);const n=m.findIndex(e=>{let s="object"==typeof e;if(s){return"src/assets/app.css"===(s?e.input:e)}return!1});m[n].bundleName="wm-android-styles";const a=Object.assign({},m[n]);a.bundleName="wm-ios-styles",m.push(a)}m.forEach((e,s)=>{let i="object"==typeof e,n=i?e.input:e;!n.includes("themes")||n.includes("/android/")||n.includes("/ios/")||(i?m[s].input=n.replace(new RegExp("/[a-z]*/style.css$"),`/${t.activeTheme}/style.css`):m[s]=n.replace(new RegExp("/[a-z]*/style.css$"),`/${t.activeTheme}/style.css`))}),await setBuildCustomizations(u);const y=d.configurations.production;if(y.aot=!1!==o.aot,y.buildOptimizer=!1!==o.buildOptimizer,l){const e=d.options.assets;e.push("src/manifest.json"),e.push("src/wmsw-worker.js"),y.serviceWorker=!0,y.ngswConfigPath="ngsw-config.json",delete d.options.customWebpackConfig}await writeFile(c,JSON.stringify(u,null,4))};module.exports={updateAngularJSON:updateAngularJSON,addToScripts:addToScripts};
@@ -251,13 +251,13 @@ export const isPrefabInitialized = initPrefabConfig();
251
251
  AppCodeGenModule,
252
252
 
253
253
  {{#if isPwa}}
254
- ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production, registrationStrategy: 'registerImmediately' })
254
+ ServiceWorkerModule.register('wmsw-worker.js', { enabled: environment.production })
255
255
  {{/if}}
256
256
  ],
257
257
  providers: [
258
258
  {provide: AppJSProvider, useClass: AppJSProviderService},
259
259
  {provide: AppVariablesProvider, useClass: AppVariablesProviderService},
260
- {provide: AppExtensionProvider,useClass:AppExtensionProviderService},
260
+ {provide: AppExtensionProvider,useClass:AppExtensionProviderService},
261
261
  {provide: ComponentRefProvider, useClass: ComponentRefProviderService},
262
262
  {provide: PartialRefProvider, useClass: ComponentRefProviderService},
263
263
  {provide: PrefabConfigProvider, useClass: PrefabConfigProviderService},