@rws-framework/client 2.11.0 → 2.13.0

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 (55) hide show
  1. package/builder/vite/index.ts +5 -0
  2. package/builder/vite/rws.vite.config.ts +44 -0
  3. package/{webpack → builder/webpack}/index.js +3 -1
  4. package/{webpack → builder/webpack}/loaders/rws_fast_ts_loader.js +1 -1
  5. package/{rws.webpack.config.js → builder/webpack/rws.webpack.config.js} +18 -13
  6. package/cfg/build_steps/vite/_build_config.ts +106 -0
  7. package/cfg/build_steps/vite/_env_defines.ts +17 -0
  8. package/cfg/build_steps/vite/_loaders.ts +183 -0
  9. package/cfg/build_steps/vite/index.ts +3 -0
  10. package/cfg/build_steps/vite/loaders/html.ts +14 -0
  11. package/cfg/build_steps/vite/loaders/index.ts +9 -0
  12. package/cfg/build_steps/vite/loaders/loader.type.ts +4 -0
  13. package/cfg/build_steps/vite/loaders/scss.ts +20 -0
  14. package/cfg/build_steps/vite/loaders/ts.ts +19 -0
  15. package/cfg/build_steps/vite/rws_scss_plugin.ts +63 -0
  16. package/cfg/build_steps/vite/scss/_compiler.ts +101 -0
  17. package/cfg/build_steps/vite/scss/_fonts.ts +81 -0
  18. package/cfg/build_steps/vite/scss/_fs.ts +82 -0
  19. package/cfg/build_steps/vite/scss/_import.ts +185 -0
  20. package/cfg/build_steps/vite/types.ts +7 -0
  21. package/cfg/build_steps/webpack/_actions.js +0 -0
  22. package/cfg/build_steps/webpack/_build_config.js +0 -0
  23. package/cfg/build_steps/webpack/_component_handling.js +0 -0
  24. package/cfg/build_steps/webpack/_dev_servers.js +0 -0
  25. package/cfg/build_steps/webpack/_env_defines.js +2 -7
  26. package/cfg/build_steps/webpack/_loaders.js +0 -6
  27. package/cfg/build_steps/webpack/_plugins.js +0 -0
  28. package/cfg/build_steps/webpack/_webpack_config.js +6 -1
  29. package/package.json +3 -2
  30. package/src/client/config.ts +2 -2
  31. package/src/client.ts +1 -1
  32. package/src/components/_component.ts +4 -2
  33. package/src/components/_container.ts +2 -6
  34. package/src/components/_decorator.ts +1 -1
  35. package/src/components/_definitions.ts +0 -1
  36. package/src/components/_event_handling.ts +1 -1
  37. package/src/index.ts +60 -70
  38. package/src/services/ApiService.ts +1 -8
  39. package/src/services/_service.ts +2 -2
  40. package/src/styles/_grid.scss +16 -8
  41. package/src/styles/_scrollbars.scss +1 -0
  42. package/src/styles/includes.scss +0 -1
  43. package/src/types/IRWSConfig.ts +2 -2
  44. package/src/types/IRWSPlugin.ts +3 -5
  45. /package/{webpack → builder/webpack}/after/copy.js +0 -0
  46. /package/{webpack → builder/webpack}/after/sw.js +0 -0
  47. /package/{webpack → builder/webpack}/loaders/rws_fast_html_loader.js +0 -0
  48. /package/{webpack → builder/webpack}/loaders/rws_fast_scss_loader.js +0 -0
  49. /package/{webpack → builder/webpack}/loaders/ts/html_error.js +0 -0
  50. /package/{webpack → builder/webpack}/rws_scss_plugin.js +0 -0
  51. /package/{webpack → builder/webpack}/rws_webpack_plugin.js +0 -0
  52. /package/{webpack → builder/webpack}/scss/_compiler.js +0 -0
  53. /package/{webpack → builder/webpack}/scss/_fonts.js +0 -0
  54. /package/{webpack → builder/webpack}/scss/_fs.js +0 -0
  55. /package/{webpack → builder/webpack}/scss/_import.js +0 -0
package/src/index.ts CHANGED
@@ -1,104 +1,94 @@
1
- // Regular imports for classes and functions
2
- import { observable, attr } from '@microsoft/fast-element';
3
1
  import { Transformer as HTMLTagTransformerType, Tag as HTMLTag, Attributes as HTMLAttributes } from 'sanitize-html';
2
+ import { observable, attr } from '@microsoft/fast-element';
3
+ import type IRWSConfig from './types/IRWSConfig';
4
+ import type RWSNotify from './types/RWSNotify';
5
+ import type { NotifyUiType, NotifyLogType } from './types/RWSNotify';
4
6
  import RWSService from './services/_service';
5
7
  import ConfigService, { ConfigServiceInstance } from './services/ConfigService';
6
- import NotifyService, { NotifyServiceInstance } from './services/NotifyService';
8
+ import NotifyService, {NotifyServiceInstance} from './services/NotifyService';
7
9
  import DOMService, { DOMServiceInstance } from './services/DOMService';
10
+ import type { DOMOutputType, TagsProcessorType } from './services/DOMService';
8
11
  import ApiService, { ApiServiceInstance } from './services/ApiService';
9
- import UtilsService, { UtilsServiceInstance } from './services/UtilsService';
12
+ import type { IBackendRoute, IHTTProute, IPrefixedHTTProutes } from './services/ApiService';
13
+
14
+ import UtilsService, {UtilsServiceInstance} from './services/UtilsService';
10
15
  import ServiceWorkerService, { ServiceWorkerServiceInstance } from './services/ServiceWorkerService';
11
16
  import { sanitizedAttr } from './components/_attrs/sanitize-html';
12
17
  import { ngAttr } from './components/_attrs/angular-attr';
13
18
  import { externalObservable } from './components/_attrs/external-observable';
14
19
  import { externalAttr } from './components/_attrs/external-attr';
15
20
  import { RWSPlugin } from './plugins/_plugin';
21
+
22
+ import type { DefaultRWSPluginOptionsType } from './plugins/_plugin';
23
+
24
+ import type { IRWSPlugin, IStaticRWSPlugin } from './types/IRWSPlugin';
16
25
  import RWSClient, { RWSClientInstance } from './client';
26
+ import type { RWSPluginEntry } from './types/IRWSConfig';
27
+ import type IRWSUser from './types/IRWSUser';
17
28
  import RWSViewComponent from './components/_component';
29
+ import type { IAssetShowOptions } from './components/_component';
30
+
18
31
  import RWSContainer from './components/_container';
19
- import { RWSIgnore, RWSInject, RWSView } from './components/_decorator';
20
- import { declareRWSComponents } from './components';
21
32
 
22
- // Type imports
23
- import type { DOMOutputType, TagsProcessorType } from './services/DOMService';
24
- import type { IBackendRoute, IHTTProute, IPrefixedHTTProutes } from './services/ApiService';
25
- import type { DefaultRWSPluginOptionsType } from './plugins/_plugin';
26
- import type { IRWSPlugin, IStaticRWSPlugin } from './types/IRWSPlugin';
27
- import type { RWSPluginEntry } from './types/IRWSConfig';
28
- import type { NotifyUiType, NotifyLogType } from './types/RWSNotify';
29
33
  import type { RWSDecoratorOptions } from './components/_decorator';
30
- import type { IAssetShowOptions } from './components/_component';
31
- import type IRWSConfig from './types/IRWSConfig';
32
- import type IRWSUser from './types/IRWSUser';
33
- import type RWSNotify from './types/RWSNotify';
34
34
 
35
- // Default export
36
- export default RWSClient;
35
+ import { RWSIgnore, RWSInject, RWSView } from './components/_decorator';
36
+
37
+ import { declareRWSComponents } from './components';
37
38
 
38
- // Class and function exports
39
- export {
39
+ export default RWSClient;
40
+ export {
40
41
  RWSClient,
41
42
  RWSClientInstance,
43
+
42
44
  RWSPlugin,
43
- ApiService,
44
- UtilsService,
45
- DOMService,
46
- NotifyService,
47
- ConfigService,
48
- ServiceWorkerService,
49
- RWSService,
50
- RWSViewComponent,
51
- RWSContainer,
52
- RWSView,
53
- RWSIgnore,
54
- RWSInject,
55
- sanitizedAttr,
56
- externalObservable,
57
- externalAttr,
58
- observable,
59
- attr,
60
- ngAttr,
61
- declareRWSComponents,
45
+ RWSPluginEntry,
46
+ IRWSPlugin, IStaticRWSPlugin,
47
+ DefaultRWSPluginOptionsType,
62
48
 
63
- // Service instances
49
+ NotifyUiType,
50
+ NotifyLogType,
51
+
64
52
  ApiServiceInstance,
65
- UtilsServiceInstance,
53
+ ApiService,
54
+ UtilsServiceInstance,
55
+ UtilsService,
66
56
  DOMServiceInstance,
57
+ DOMService,
58
+ DOMOutputType,
67
59
  NotifyServiceInstance,
60
+ NotifyService,
68
61
  ConfigServiceInstance,
62
+ ConfigService,
69
63
  ServiceWorkerServiceInstance,
70
-
71
- // External types
72
- HTMLTagTransformerType,
73
- HTMLTag,
74
- HTMLAttributes
75
- };
64
+ ServiceWorkerService,
76
65
 
77
- // Type exports
78
- export type {
79
- // Plugin types
80
- RWSPluginEntry,
81
- IRWSPlugin,
82
- IStaticRWSPlugin,
83
- DefaultRWSPluginOptionsType,
84
-
85
- // Notification types
86
- NotifyUiType,
87
- NotifyLogType,
88
66
  RWSNotify,
89
-
90
- // Service and API types
91
- DOMOutputType,
92
- TagsProcessorType,
93
67
  IBackendRoute as IRWSBackendRoute,
94
- IHTTProute as IRWSHttpRoute,
95
- IPrefixedHTTProutes as IRWSPrefixedHTTProutes,
96
-
97
- // Component and decorator types
98
68
  RWSDecoratorOptions as IRWSDecoratorOptions,
69
+ IHTTProute as IRWSHttpRoute,
70
+ IPrefixedHTTProutes as IRWSPrefixedHTTProutes,
99
71
  IAssetShowOptions as IRWSAssetShowOptions,
100
-
101
- // Config and user types
102
72
  IRWSConfig,
103
- IRWSUser
73
+ IRWSUser,
74
+ TagsProcessorType,
75
+ HTMLTagTransformerType,
76
+ HTMLTag,
77
+ HTMLAttributes,
78
+
79
+ RWSView,
80
+ sanitizedAttr,
81
+ RWSIgnore,
82
+ RWSInject,
83
+ observable,
84
+ externalObservable,
85
+ externalAttr,
86
+ attr,
87
+ ngAttr,
88
+
89
+ RWSService,
90
+ RWSViewComponent,
91
+ declareRWSComponents,
92
+
93
+ RWSContainer
104
94
  };
@@ -1,7 +1,7 @@
1
1
  import TheService from './_service';
2
2
 
3
3
  //@4DI
4
- import ConfigService, { ConfigServiceInstance } from '../services/ConfigService';
4
+ import ConfigService, { ConfigServiceInstance } from './ConfigService';
5
5
 
6
6
  import { upload, UploadResponse } from 'upload';
7
7
 
@@ -80,11 +80,6 @@ class ApiService extends TheService {
80
80
  this.token = token;
81
81
  }
82
82
 
83
- getToken(): string
84
- {
85
- return this.token;
86
- }
87
-
88
83
  public async pureGet(url: string, options: IAPIOptions = {}): Promise<string> {
89
84
  try {
90
85
  const response = await fetch(url, {
@@ -198,8 +193,6 @@ class ApiService extends TheService {
198
193
  apiPath = apiPath.replace(`:${paramKey}`, paramValue);
199
194
  });
200
195
 
201
- console.log('bck', this.config.get('backendUrl'));
202
-
203
196
  return `${this.config.get('backendUrl')}${this.config.get('apiPrefix') || ''}${apiPath}`;
204
197
  }
205
198
 
@@ -1,6 +1,6 @@
1
- import RWSContainer from '../components/_container';
1
+ import RWSContainer, { DI, InterfaceSymbol, Key, Registration } from '../components/_container';
2
2
  import { loadRWSRichWindow } from '../types/RWSWindow';
3
- import { DI, InterfaceSymbol, Key,Registration } from '../../foundation/rws-foundation';
3
+
4
4
  export interface IWithDI<T> {
5
5
  new (...args: any[]): T;
6
6
  getSingleton: <T extends Key>(this: IWithDI<T>) => InterfaceSymbol<T>;
@@ -12,11 +12,12 @@ $mediaQuerySteps: (
12
12
 
13
13
  @mixin grid-container-gap($gap) {
14
14
  gap: $gap;
15
- margin-right: -#{$gap};
16
- margin-left: -#{$gap};
15
+ margin-right: -#{$gap};
16
+ margin-left: -#{$gap};
17
17
  }
18
18
 
19
19
  // Mixin for grid columns
20
+
20
21
  @mixin internal-grid-column($columns: 12) {
21
22
  flex: 0 0 calc(100% / 12 * $columns);
22
23
  max-width: calc(100% / 12 * $columns);
@@ -28,35 +29,42 @@ $mediaQuerySteps: (
28
29
 
29
30
  @mixin grid-column($columns: 12, $mdColumns: 12) {
30
31
  @include internal-grid-column($columns);
31
- @media screen and (max-width: map.get($mediaQuerySteps, 'md')) {
32
+
33
+ @media screen and (max-width: map-get($mediaQuerySteps, 'md')) {
32
34
  @include internal-grid-column($mdColumns);
33
35
  }
34
36
  }
35
37
 
36
38
  @mixin grid-column($columns: 12, $mdColumns: 12, $smColumns: 12) {
37
39
  @include internal-grid-column($columns);
38
- @media screen and (max-width: map.get($mediaQuerySteps, 'md')) {
40
+
41
+ @media screen and (max-width: map-get($mediaQuerySteps, 'md')) {
39
42
  @include internal-grid-column($mdColumns);
40
43
  }
41
- @media screen and (max-width: map.get($mediaQuerySteps, 'sm')) {
44
+
45
+ @media screen and (max-width: map-get($mediaQuerySteps, 'sm')) {
42
46
  @include internal-grid-column($smColumns);
43
47
  }
44
48
  }
45
49
 
46
50
  @mixin grid-column($columns: 12, $mdColumns: 12, $smColumns: 12, $xsColumns: 12) {
47
51
  @include internal-grid-column($columns);
48
- @media screen and (max-width: map.get($mediaQuerySteps, 'md')) {
52
+
53
+ @media screen and (max-width: map-get($mediaQuerySteps, 'md')) {
49
54
  @include internal-grid-column($mdColumns);
50
55
  }
51
- @media screen and (max-width: map.get($mediaQuerySteps, 'sm')) {
56
+
57
+ @media screen and (max-width: map-get($mediaQuerySteps, 'sm')) {
52
58
  @include internal-grid-column($smColumns);
53
59
  }
54
- @media screen and (max-width: map.get($mediaQuerySteps, 'xs')) {
60
+
61
+ @media screen and (max-width: map-get($mediaQuerySteps, 'xs')) {
55
62
  @include internal-grid-column($xsColumns);
56
63
  }
57
64
  }
58
65
 
59
66
  // Mixins for grid alignment
67
+
60
68
  @mixin grid-flex-align-items($horizontal, $vertical: top) {
61
69
  justify-content: $horizontal;
62
70
  align-items: $vertical;
@@ -1,4 +1,5 @@
1
1
  @mixin customScrollbars($width: 10px, $trackColor: #f1f1f1, $thumbColor: #888) {
2
+
2
3
  /* WebKit (Safari/Chrome) */
3
4
  &::-webkit-scrollbar {
4
5
  width: $width;
@@ -1,4 +1,3 @@
1
- @use "sass:map";
2
1
  @import "_misc";
3
2
  @import "_scrollbars";
4
3
  @import "_grid";
@@ -1,6 +1,6 @@
1
1
  import RWSViewComponent from '../components/_component';
2
2
  import { RWSPlugin, DefaultRWSPluginOptionsType } from '../plugins/_plugin';
3
- import { IStaticRWSPlugin } from '../types/IRWSPlugin';
3
+ import { IStaticRWSPlugin } from './IRWSPlugin';
4
4
 
5
5
  export type IFrontRoutes = Record<string, unknown>;
6
6
  export type RWSPluginEntry<T extends DefaultRWSPluginOptionsType = DefaultRWSPluginOptionsType> = new (...args: any[]) => RWSPlugin<T>;
@@ -25,7 +25,7 @@ export default interface IRWSConfig {
25
25
  rwsDefines?: {[key: string]: any}
26
26
  partedFileDir?: string
27
27
  partedPrefix?: string
28
- plugins?: IStaticRWSPlugin<DefaultRWSPluginOptionsType>[]
28
+ plugins?: IStaticRWSPlugin[]
29
29
  routing_enabled?: boolean
30
30
  _noLoad?: boolean
31
31
  }
@@ -1,7 +1,7 @@
1
1
  import { DefaultRWSPluginOptionsType } from "../plugins/_plugin";
2
2
  import IRWSUser from "./IRWSUser";
3
3
  import { Container } from "../components/_container";
4
- import RWSWindow from "../types/RWSWindow";
4
+ import RWSWindow from "./RWSWindow";
5
5
  import { RWSInfoType } from "../client/components";
6
6
 
7
7
 
@@ -12,10 +12,8 @@ export interface IRWSPlugin {
12
12
  onSetUser(user: IRWSUser): Promise<void>
13
13
  }
14
14
 
15
- type IStaticRWSPluginEntry<PluginOptions extends DefaultRWSPluginOptionsType = DefaultRWSPluginOptionsType> = {
15
+ export interface IStaticRWSPlugin<PluginOptions extends DefaultRWSPluginOptionsType = DefaultRWSPluginOptionsType> {
16
16
  new (...args: any[]): IRWSPlugin;
17
17
  container: Container;
18
18
  window: RWSWindow;
19
- }
20
-
21
- export type IStaticRWSPlugin<PluginOptions extends DefaultRWSPluginOptionsType> = IStaticRWSPluginEntry<PluginOptions> | [IStaticRWSPluginEntry<PluginOptions>, PluginOptions]
19
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes