@etsoo/appscript 1.1.3 → 1.1.7

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 (43) hide show
  1. package/.github/workflows/main.yml +1 -1
  2. package/README.md +63 -13
  3. package/lib/cjs/address/AddressUtils.d.ts +1 -1
  4. package/lib/cjs/address/AddressUtils.js +7 -10
  5. package/lib/cjs/app/AppSettings.d.ts +1 -1
  6. package/lib/cjs/app/CoreApp.d.ts +21 -6
  7. package/lib/cjs/app/CoreApp.js +32 -6
  8. package/lib/cjs/app/ExternalSettings.d.ts +1 -1
  9. package/lib/cjs/business/BusinessTax.d.ts +66 -0
  10. package/lib/cjs/business/BusinessTax.js +61 -0
  11. package/lib/cjs/business/BusinessUtils.js +2 -3
  12. package/lib/cjs/dto/IdDto.d.ts +1 -1
  13. package/lib/cjs/dto/IdLabelDto.d.ts +1 -1
  14. package/lib/cjs/dto/UpdateDto.d.ts +1 -1
  15. package/lib/cjs/index.d.ts +1 -0
  16. package/lib/cjs/index.js +1 -0
  17. package/lib/mjs/address/AddressUtils.d.ts +1 -1
  18. package/lib/mjs/address/AddressUtils.js +8 -11
  19. package/lib/mjs/app/AppSettings.d.ts +1 -1
  20. package/lib/mjs/app/CoreApp.d.ts +21 -6
  21. package/lib/mjs/app/CoreApp.js +32 -6
  22. package/lib/mjs/app/ExternalSettings.d.ts +1 -1
  23. package/lib/mjs/business/BusinessTax.d.ts +66 -0
  24. package/lib/mjs/business/BusinessTax.js +57 -0
  25. package/lib/mjs/business/BusinessUtils.js +3 -4
  26. package/lib/mjs/dto/IdDto.d.ts +1 -1
  27. package/lib/mjs/dto/IdLabelDto.d.ts +1 -1
  28. package/lib/mjs/dto/UpdateDto.d.ts +1 -1
  29. package/lib/mjs/index.d.ts +1 -0
  30. package/lib/mjs/index.js +1 -0
  31. package/package.json +14 -14
  32. package/src/address/AddressUtils.ts +3 -3
  33. package/src/app/AppSettings.ts +1 -1
  34. package/src/app/CoreApp.ts +44 -7
  35. package/src/app/ExternalSettings.ts +1 -1
  36. package/src/business/BusinessTax.ts +86 -0
  37. package/src/business/BusinessUtils.ts +2 -2
  38. package/src/dto/IdDto.ts +1 -1
  39. package/src/dto/IdLabelDto.ts +1 -1
  40. package/src/dto/UpdateDto.ts +1 -1
  41. package/src/index.ts +1 -0
  42. package/tsconfig.cjs.json +1 -1
  43. package/tsconfig.json +1 -1
@@ -1,4 +1,4 @@
1
- import { Utils } from '@etsoo/shared';
1
+ import { DataTypes } from '@etsoo/shared';
2
2
  import { IdLabelDto } from '../dto/IdLabelDto';
3
3
  import { ICultureGet } from '../state/Culture';
4
4
  import { ProductUnit } from './ProductUnit';
@@ -47,7 +47,7 @@ export namespace BusinessUtils {
47
47
  * @returns Units
48
48
  */
49
49
  export function getUnits(func: ICultureGet): IdLabelDto[] {
50
- return Utils.getEnumKeys(ProductUnit).map((key) => ({
50
+ return DataTypes.getEnumKeys(ProductUnit).map((key) => ({
51
51
  id: ProductUnit[key as keyof typeof ProductUnit],
52
52
  label: getUnitLabelByKey(func, key)
53
53
  }));
package/src/dto/IdDto.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Id Dto
2
+ * Dto with id field
3
3
  */
4
4
  export type IdDto<T = number> = {
5
5
  /**
@@ -1,7 +1,7 @@
1
1
  import { DataTypes } from '@etsoo/shared';
2
2
 
3
3
  /**
4
- * Id & label data
4
+ * Dto with id and label field
5
5
  */
6
6
  export type IdLabelDto = {
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  import { IdDto } from './IdDto';
2
2
 
3
3
  /**
4
- * Update Dto
4
+ * Dto with id and changedFields
5
5
  */
6
6
  export type UpdateDto<T = number> = IdDto<T> & {
7
7
  /**
package/src/index.ts CHANGED
@@ -14,6 +14,7 @@ export * from './bridges/IAppData';
14
14
  export * from './bridges/IBridge';
15
15
 
16
16
  // business
17
+ export * from './business/BusinessTax';
17
18
  export * from './business/BusinessUtils';
18
19
  export * from './business/ProductUnit';
19
20
 
package/tsconfig.cjs.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
- "target": "ES2019",
4
+ "target": "ES2020",
5
5
  "module": "commonjs",
6
6
  "moduleResolution": "node",
7
7
  "isolatedModules": true,
package/tsconfig.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
- "target": "ES2019",
4
+ "target": "ES2020",
5
5
  "module": "ESNext",
6
6
  "moduleResolution": "node",
7
7
  "isolatedModules": true,