@opra/common 1.0.0-alpha.6 → 1.0.0-alpha.8

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 (82) hide show
  1. package/browser.js +5454 -5437
  2. package/cjs/document/common/document-element.js +2 -1
  3. package/cjs/document/data-type/api-field.js +2 -1
  4. package/cjs/document/data-type/complex-type-base.js +2 -1
  5. package/cjs/document/data-type/complex-type.js +4 -2
  6. package/cjs/document/data-type/data-type.js +2 -1
  7. package/cjs/document/data-type/enum-type.js +3 -2
  8. package/cjs/document/data-type/extended-types/field-path.type.js +1 -3
  9. package/cjs/document/data-type/extended-types/filter.type.js +15 -17
  10. package/cjs/document/data-type/mapped-type.js +9 -5
  11. package/cjs/document/data-type/mixin-type.js +2 -1
  12. package/cjs/document/data-type/simple-type.js +8 -9
  13. package/cjs/document/data-type/utils/create-mapped-class.js +2 -1
  14. package/cjs/document/decorators/http-operation.decorator.js +8 -4
  15. package/cjs/document/factory/api-document.factory.js +1 -3
  16. package/cjs/document/factory/data-type.factory.js +37 -19
  17. package/cjs/document/factory/http-api.factory.js +3 -1
  18. package/cjs/document/http/http-controller.js +6 -2
  19. package/cjs/document/http/http-media-type.js +4 -2
  20. package/cjs/document/http/http-operation-response.js +2 -1
  21. package/cjs/document/http/http-operation.js +6 -0
  22. package/cjs/document/http/http-status-range.js +1 -2
  23. package/cjs/document/index.js +5 -5
  24. package/cjs/exception/index.js +5 -5
  25. package/cjs/filter/antlr/OpraFilterParser.js +28 -82
  26. package/cjs/filter/ast/index.js +1 -1
  27. package/cjs/filter/build.js +1 -3
  28. package/cjs/filter/filter-rules.js +4 -2
  29. package/cjs/filter/opra-filter.ns.js +2 -2
  30. package/cjs/filter/parse.js +1 -3
  31. package/cjs/helpers/mixin-utils.js +2 -1
  32. package/cjs/helpers/monkey-patches.js +4 -2
  33. package/cjs/helpers/parse-fields-projection.js +1 -3
  34. package/cjs/helpers/responsive-map.js +5 -4
  35. package/cjs/i18n/i18n.js +4 -3
  36. package/cjs/i18n/index.js +1 -1
  37. package/cjs/index.js +1 -1
  38. package/esm/document/common/document-element.js +2 -1
  39. package/esm/document/data-type/api-field.js +2 -1
  40. package/esm/document/data-type/complex-type-base.js +2 -1
  41. package/esm/document/data-type/complex-type.js +4 -2
  42. package/esm/document/data-type/data-type.js +2 -1
  43. package/esm/document/data-type/enum-type.js +3 -2
  44. package/esm/document/data-type/extended-types/field-path.type.js +1 -3
  45. package/esm/document/data-type/extended-types/filter.type.js +15 -17
  46. package/esm/document/data-type/mapped-type.js +9 -5
  47. package/esm/document/data-type/mixin-type.js +2 -1
  48. package/esm/document/data-type/simple-type.js +8 -9
  49. package/esm/document/data-type/utils/create-mapped-class.js +2 -1
  50. package/esm/document/decorators/http-operation.decorator.js +8 -4
  51. package/esm/document/factory/api-document.factory.js +1 -3
  52. package/esm/document/factory/data-type.factory.js +37 -19
  53. package/esm/document/factory/http-api.factory.js +3 -1
  54. package/esm/document/http/http-controller.js +6 -2
  55. package/esm/document/http/http-media-type.js +4 -2
  56. package/esm/document/http/http-operation-response.js +2 -1
  57. package/esm/document/http/http-operation.js +5 -0
  58. package/esm/document/http/http-status-range.js +1 -2
  59. package/esm/document/index.js +5 -5
  60. package/esm/exception/index.js +5 -5
  61. package/esm/filter/antlr/OpraFilterParser.js +28 -82
  62. package/esm/filter/ast/index.js +1 -1
  63. package/esm/filter/build.js +1 -3
  64. package/esm/filter/filter-rules.js +4 -2
  65. package/esm/filter/opra-filter.ns.js +2 -2
  66. package/esm/filter/parse.js +1 -3
  67. package/esm/helpers/mixin-utils.js +2 -1
  68. package/esm/helpers/monkey-patches.js +4 -2
  69. package/esm/helpers/parse-fields-projection.js +1 -3
  70. package/esm/helpers/responsive-map.js +5 -4
  71. package/esm/i18n/i18n.js +4 -3
  72. package/esm/i18n/index.js +1 -1
  73. package/esm/index.js +1 -1
  74. package/package.json +5 -4
  75. package/types/document/http/http-controller.d.ts +1 -0
  76. package/types/document/http/http-operation.d.ts +1 -0
  77. package/types/document/index.d.ts +5 -5
  78. package/types/exception/index.d.ts +5 -5
  79. package/types/filter/ast/index.d.ts +1 -1
  80. package/types/filter/opra-filter.ns.d.ts +2 -2
  81. package/types/i18n/i18n.d.ts +21 -19
  82. package/types/index.d.ts +1 -1
@@ -1,26 +1,28 @@
1
- import { Type } from 'ts-gems';
2
- import { FallbackLng, Formatter as I18nextFormatter, i18n, InitOptions as I18nextInitOptions, Resource as I18nextResource, TFunction as I18nextTFunction, TOptions } from '@browsery/i18next';
1
+ import { FallbackLng as I18nextFallbackLng, Formatter as I18nextFormatter, i18n, InitOptions as I18nextInitOptions, Resource as I18nextResource, TFunction as I18nextTFunction, TOptions } from '@browsery/i18next';
3
2
  import * as I18next from '@browsery/i18next';
3
+ import { Type } from 'ts-gems';
4
4
  export interface BaseI18n extends Type<I18next.i18n> {
5
5
  }
6
- export declare const BaseI18n: BaseI18n;
7
- export type DeepTranslateOptions = TOptions & {
8
- ignore?: (input: any, inst: i18n) => boolean;
9
- };
10
- export type InitCallback = I18next.Callback;
11
- export type TranslateFunction = I18nextTFunction;
12
- export type Formatter = I18nextFormatter;
13
- export type LanguageResource = I18nextResource;
14
- export type { FallbackLng };
15
- export interface InitOptions extends I18nextInitOptions {
16
- resourceDirs?: string[];
6
+ export declare namespace I18n {
7
+ interface InitOptions extends I18nextInitOptions {
8
+ resourceDirs?: string[];
9
+ }
10
+ type DeepTranslateOptions = TOptions & {
11
+ ignore?: (input: any, inst: i18n) => boolean;
12
+ };
13
+ type InitCallback = I18next.Callback;
14
+ type TranslateFunction = I18nextTFunction;
15
+ type Formatter = I18nextFormatter;
16
+ type LanguageResource = I18nextResource;
17
+ type FallbackLng = I18nextFallbackLng;
17
18
  }
19
+ export declare const BaseI18n: BaseI18n;
18
20
  export declare class I18n extends BaseI18n {
19
- init(callback?: InitCallback): Promise<TranslateFunction>;
20
- init(options: InitOptions, callback?: InitCallback): Promise<TranslateFunction>;
21
- deep(input: any, options?: DeepTranslateOptions): any;
22
- createInstance(options: {} | undefined, callback: any): I18n;
23
- static createInstance(options?: InitOptions, callback?: InitCallback): I18n;
24
- protected _deepTranslate(input: any, objectStack: WeakMap<object, any>, options?: DeepTranslateOptions): any;
21
+ init(callback?: I18n.InitCallback): Promise<I18n.TranslateFunction>;
22
+ init(options: I18n.InitOptions, callback?: I18n.InitCallback): Promise<I18n.TranslateFunction>;
23
+ deep(input: any, options?: I18n.DeepTranslateOptions): any;
24
+ createInstance(options?: I18n.InitOptions, callback?: I18n.InitCallback): I18n;
25
+ static createInstance(options?: I18n.InitOptions, callback?: I18n.InitCallback): I18n;
26
+ protected _deepTranslate(input: any, objectStack: WeakMap<object, any>, options?: I18n.DeepTranslateOptions): any;
25
27
  static get defaultInstance(): I18n;
26
28
  }
package/types/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export * from './types.js';
2
1
  export * from './document/index.js';
3
2
  export * from './exception/index.js';
4
3
  export * from './filter/index.js';
@@ -6,4 +5,5 @@ export * from './helpers/index.js';
6
5
  export * from './http/index.js';
7
6
  export * from './i18n/index.js';
8
7
  export * from './schema/index.js';
8
+ export * from './types.js';
9
9
  export { uid } from 'uid';