tnx-shared 5.1.7 → 5.1.11

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.
Files changed (72) hide show
  1. package/assets/docker/Dockerfile +1 -1
  2. package/assets/docker/docker-entrypoint.sh +22 -0
  3. package/assets/gulpfile.js +26 -25
  4. package/bundles/tnx-shared.umd.js +738 -158
  5. package/bundles/tnx-shared.umd.js.map +1 -1
  6. package/bundles/tnx-shared.umd.min.js +1 -1
  7. package/bundles/tnx-shared.umd.min.js.map +1 -1
  8. package/classes/base/data-list-base.d.ts +4 -0
  9. package/classes/base/data-list-base.d.ts.map +1 -1
  10. package/classes/public-function.d.ts +4 -0
  11. package/classes/public-function.d.ts.map +1 -1
  12. package/components/crud/crud-list/crud-list.component.d.ts +7 -0
  13. package/components/crud/crud-list/crud-list.component.d.ts.map +1 -1
  14. package/components/tn-tabview/tn-tabview.component.d.ts +3 -2
  15. package/components/tn-tabview/tn-tabview.component.d.ts.map +1 -1
  16. package/components/universal-link-processor/universal-link-processor.component.d.ts +11 -0
  17. package/components/universal-link-processor/universal-link-processor.component.d.ts.map +1 -0
  18. package/components/universal-link-processor/universal-link-processor.component.ngfactory.d.ts.map +1 -0
  19. package/components/universal-link-processor/universal-link-processor.component.scss.shim.ngstyle.d.ts.map +1 -0
  20. package/congviec/congviec/congviec-dinhkem/congviec-dinhkem.component.d.ts +28 -0
  21. package/congviec/congviec/congviec-dinhkem/congviec-dinhkem.component.d.ts.map +1 -0
  22. package/congviec/congviec/congviec-dinhkem/congviec-dinhkem.component.ngfactory.d.ts.map +1 -0
  23. package/congviec/congviec/congviec-dinhkem/congviec-dinhkem.component.scss.shim.ngstyle.d.ts.map +1 -0
  24. package/congviec/congviec/congviec-dinhkem-form/congviec-dinhkem-form.component.d.ts +9 -0
  25. package/congviec/congviec/congviec-dinhkem-form/congviec-dinhkem-form.component.d.ts.map +1 -0
  26. package/congviec/congviec/congviec-dinhkem-form/congviec-dinhkem-form.component.ngfactory.d.ts.map +1 -0
  27. package/congviec/congviec/congviec-dinhkem-form/congviec-dinhkem-form.component.scss.shim.ngstyle.d.ts.map +1 -0
  28. package/congviec/congviec/congviec.component.d.ts.map +1 -1
  29. package/congviec/congviec/services/congviec-dinhkem.service.d.ts +16 -0
  30. package/congviec/congviec/services/congviec-dinhkem.service.d.ts.map +1 -0
  31. package/congviec/congviec/services/congviec-dinhkem.service.ngfactory.d.ts.map +1 -0
  32. package/congviec/dm-loai-congviec/services/dm-loai-congviec.service.d.ts.map +1 -1
  33. package/esm2015/classes/base/data-list-base.js +73 -2
  34. package/esm2015/classes/public-function.js +6 -1
  35. package/esm2015/components/crud/advance-search/advance-search.component.js +1 -1
  36. package/esm2015/components/crud/crud-list/crud-list.component.js +34 -2
  37. package/esm2015/components/paging-next-back-only/paging-next-back-only.component.js +2 -2
  38. package/esm2015/components/qr-code-generator/qr-code-generator.component.js +2 -2
  39. package/esm2015/components/query-builders/query-builder/query-builder.component.js +1 -1
  40. package/esm2015/components/tn-tabview/tn-tabview.component.js +9 -6
  41. package/esm2015/components/universal-link-processor/universal-link-processor.component.js +47 -0
  42. package/esm2015/components/user-picker/user-picker-box/user-picker-box.component.js +1 -1
  43. package/esm2015/components/vanban-picker/vanban-den-picker/vanban-den-picker.component.js +2 -2
  44. package/esm2015/components/vanban-picker/vanban-di-picker/vanban-di-picker.component.js +2 -2
  45. package/esm2015/components/vanban-picker/vanban-picker-dialog/vanban-picker-dialog.component.js +2 -2
  46. package/esm2015/components/workflow/workflow-picker/workflow-picker.component.js +1 -1
  47. package/esm2015/components/workflow/workflow-setting-new/workflow-setting-new.component.js +1 -1
  48. package/esm2015/congviec/congviec/congviec-dinhkem/congviec-dinhkem.component.js +183 -0
  49. package/esm2015/congviec/congviec/congviec-dinhkem-form/congviec-dinhkem-form.component.js +26 -0
  50. package/esm2015/congviec/congviec/congviec-view/congviec-view.component.js +2 -2
  51. package/esm2015/congviec/congviec/congviec.component.js +3 -1
  52. package/esm2015/congviec/congviec/services/congviec-dinhkem.service.js +47 -0
  53. package/esm2015/congviec/dm-loai-congviec/services/dm-loai-congviec.service.js +6 -1
  54. package/esm2015/congviec/dm-priority/dm-priority.component.js +2 -2
  55. package/esm2015/services/base.service.js +33 -17
  56. package/esm2015/services/common.service.js +1 -1
  57. package/esm2015/services/storage.service.js +1 -1
  58. package/esm2015/services/tn-client.service.js +22 -17
  59. package/esm2015/tnx-shared.js +90 -86
  60. package/esm2015/tnx-shared.module.js +8 -2
  61. package/fesm2015/tnx-shared.js +471 -52
  62. package/fesm2015/tnx-shared.js.map +1 -1
  63. package/package.json +3 -3
  64. package/services/base.service.d.ts.map +1 -1
  65. package/services/common.service.d.ts.map +1 -1
  66. package/services/tn-client.service.d.ts.map +1 -1
  67. package/tnx-shared.d.ts +89 -85
  68. package/tnx-shared.d.ts.map +1 -1
  69. package/tnx-shared.metadata.json +1 -1
  70. package/tnx-shared.module.d.ts +4 -1
  71. package/tnx-shared.module.d.ts.map +1 -1
  72. package/tnx-shared.module.ngfactory.d.ts.map +1 -1
@@ -3,5 +3,5 @@ FROM euniversitytnapi/tn.clientbase.angular
3
3
  RUN rm -rf /usr/share/nginx/html/*
4
4
  COPY ./dist/build /usr/share/nginx/html
5
5
 
6
-
6
+ ENTRYPOINT ["/docker-entrypoint.sh"]
7
7
  CMD ["nginx", "-g", "daemon off;"]
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env sh
2
+ set -eu
3
+
4
+ # Inject environment variables into NGINX configuration
5
+ # List all variables to be substituted to avoid clashing with
6
+ # NGINX own variables: https://serverfault.com/questions/577370
7
+ envsubst \
8
+ '${BASE_HREF}' \
9
+ </etc/nginx/nginx.conf.template \
10
+ >/etc/nginx/nginx.conf
11
+ cat /etc/nginx/nginx.conf
12
+
13
+ # Set correct HTML base tag, so static resources are fetched
14
+ # from the right path instead of the root path.
15
+ # NOTE: Trailing and leading slashes in base href are important!
16
+ # Using `~` separator to avoid problems with forward slashes
17
+ sed --in-place \
18
+ 's~<base href="/">~<base href="'$BASE_HREF'/"><script type="text/javascript"> window.baseHref = "'$BASE_HREF'";</script>~' \
19
+ /usr/share/nginx/html/index.html
20
+
21
+ cat /usr/share/nginx/html/index.html
22
+ exec "$@"
@@ -205,30 +205,30 @@ task('updateNextVersionService', function (done) {
205
205
  });
206
206
 
207
207
  task('updateDepdendServiceToLatest', function (done) {
208
- let serviceName = argv.serviceName;
209
- try {
210
- if (!serviceName.startsWith('tnx-')) {
211
- serviceName = 'tnx-' + serviceName;
212
- }
213
- getCurrentVersion({}, serviceName, (version) => {
214
- if (version) {
215
- console.log(`latest version of service ${serviceName} is ${version.versionString}`);
216
- modifyFile(pathPackageJson, rootProjectPath, (content) => {
217
- const json = JSON.parse(content);
218
- json.dependencies[serviceName] = version.versionString;
219
- return JSON.stringify(json);
220
- });
221
- }
222
- else {
223
- console.log(`cannot get version or does not existed of service ${serviceName}`);
224
- }
225
- done();
226
- });
208
+ let serviceName = argv.serviceName;
209
+ try {
210
+ if (!serviceName.startsWith('tnx-')) {
211
+ serviceName = 'tnx-' + serviceName;
227
212
  }
228
- catch (e) {
229
- console.log(`error on update service to latest ${serviceName}`, e);
213
+ getCurrentVersion({}, serviceName, (version) => {
214
+ if (version) {
215
+ console.log(`latest version of service ${serviceName} is ${version.versionString}`);
216
+ modifyFile(pathPackageJson, rootProjectPath, (content) => {
217
+ const json = JSON.parse(content);
218
+ json.dependencies[serviceName] = version.versionString;
219
+ return JSON.stringify(json);
220
+ });
221
+ }
222
+ else {
223
+ console.log(`cannot get version or does not existed of service ${serviceName}`);
224
+ }
230
225
  done();
231
- }
226
+ });
227
+ }
228
+ catch (e) {
229
+ console.log(`error on update service to latest ${serviceName}`, e);
230
+ done();
231
+ }
232
232
  });
233
233
 
234
234
  function resetPackageJson() {
@@ -756,9 +756,10 @@ function processNextVersion(packageName, type, callback) {
756
756
  getCurrentVersion(obj, packageName, (currentVersion) => {
757
757
  if (currentVersion) {
758
758
  obj.versionPrev = currentVersion.versionString;
759
-
760
759
  const nextVersion = getNextVersion(currentVersion, type);
760
+
761
761
  obj.version = nextVersion.versionString;
762
+ obj[`version${angularSchemaObj.clientVersion}`] = obj.version;
762
763
  console.log(`version moi cua package ${packageName} se la ${obj.version}`);
763
764
 
764
765
  resolve(JSON.stringify(obj));
@@ -790,7 +791,7 @@ function getNextVersion(currentVersion, nextVersionType) {
790
791
  return currentVersion;
791
792
  }
792
793
 
793
- function getCurrentVersion(pkgObj, packageName, onGetVersion, ) {
794
+ function getCurrentVersion(pkgObj, packageName, onGetVersion,) {
794
795
  if (!packageName.startsWith('tnx-')) {
795
796
  packageName = 'tnx-' + packageName;
796
797
  }
@@ -802,7 +803,7 @@ function getCurrentVersion(pkgObj, packageName, onGetVersion, ) {
802
803
  if (body) {
803
804
  const bodyObj = JSON.parse(body);
804
805
  versionStr = bodyObj[`version${angularSchemaObj.clientVersion}`];
805
- if (pkgObj.version) {
806
+ if (!versionStr && pkgObj.version) {
806
807
  versionStr = `${angularSchemaObj.clientVersion}.0`;
807
808
  }
808
809
  }