@rws-framework/client 2.20.1 → 2.20.2
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.
- package/.bin/emerge.sh +15 -15
- package/builder/vite/index.ts +4 -4
- package/builder/vite/rws.vite.config.ts +132 -132
- package/builder/vite/rws_scss_plugin.ts +61 -61
- package/builder/webpack/index.js +10 -10
- package/builder/webpack/rws.webpack.config.js +161 -161
- package/builder/webpack/rws_scss_plugin.js +90 -90
- package/builder/webpack/rws_webpack_plugin.js +137 -137
- package/cfg/_default.cfg.js +26 -26
- package/cfg/_storage.d.ts +22 -22
- package/cfg/_storage.js +42 -42
- package/cfg/tsconfigSetup.js +146 -146
- package/docs/assets/26e93147f10415a0ed4a.svg +6 -6
- package/docs/assets/75c9471662e97ee24f29.svg +7 -7
- package/docs/assets/db90e4df2373980c497d.svg +9 -9
- package/docs/assets/highlight.css +127 -127
- package/docs/assets/main.js +59 -59
- package/docs/assets/style.css +1414 -1414
- package/docs/classes/ApiServiceInstance.html +25 -25
- package/docs/classes/ConfigServiceInstance.html +21 -21
- package/docs/classes/DOMServiceInstance.html +17 -17
- package/docs/classes/NotifyServiceInstance.html +15 -15
- package/docs/classes/RWSClientInstance.html +45 -45
- package/docs/classes/RWSPlugin.html +13 -13
- package/docs/classes/RWSService.html +10 -10
- package/docs/classes/RWSViewComponent.html +1022 -1022
- package/docs/classes/ServiceWorkerServiceInstance.html +13 -13
- package/docs/classes/UtilsServiceInstance.html +13 -13
- package/docs/functions/attr.html +5 -5
- package/docs/functions/observable.html +3 -3
- package/docs/index.html +179 -179
- package/docs/interfaces/HTMLTag.html +3 -3
- package/docs/interfaces/IRWSConfig.html +20 -20
- package/docs/interfaces/IRWSDecoratorOptions.html +5 -5
- package/docs/interfaces/IRWSHttpRoute.html +2 -2
- package/docs/interfaces/IRWSPrefixedHTTProutes.html +2 -2
- package/docs/interfaces/IRWSUser.html +5 -5
- package/docs/modules.html +45 -45
- package/foundation/index.js +1 -1
- package/foundation/rws-foundation.d.ts +7 -7
- package/foundation/rws-foundation.js +7 -7
- package/package.json +1 -1
- package/service_worker/src/_service_worker.ts +83 -83
- package/service_worker/tsconfig.json +20 -20
- package/service_worker/webpack.config.js +66 -66
- package/src/client/components.ts +67 -67
- package/src/client/config.ts +175 -175
- package/src/client/hotReload.ts +22 -22
- package/src/client/services.ts +27 -27
- package/src/client.ts +208 -208
- package/src/components/_component.ts +247 -247
- package/src/components/_container.ts +15 -15
- package/src/components/_decorator.ts +122 -122
- package/src/components/_definitions.ts +64 -64
- package/src/components/_event_handling.ts +40 -40
- package/src/components/index.ts +25 -25
- package/src/index.ts +86 -86
- package/src/plugins/_builder.js +31 -31
- package/src/plugins/_plugin.ts +60 -60
- package/src/services/ApiService.ts +105 -105
- package/src/services/ConfigService.ts +125 -125
- package/src/services/DOMService.ts +93 -93
- package/src/services/NotifyService.ts +47 -47
- package/src/services/ServiceWorkerService.ts +60 -60
- package/src/services/UtilsService.ts +60 -60
- package/src/services/_service.ts +64 -64
- package/src/styles/README.md +157 -157
- package/src/styles/_darkreader.scss +30 -30
- package/src/styles/_grid.scss +75 -75
- package/src/styles/_grid_legacy.scss +49 -49
- package/src/styles/_misc.scss +8 -8
- package/src/styles/_scrollbars.scss +40 -40
- package/src/styles/includes.scss +6 -6
- package/src/types/IBackendCore.ts +11 -11
- package/src/types/IRWSConfig.ts +29 -29
- package/src/types/IRWSPlugin.ts +23 -23
- package/src/types/IRWSResource.ts +4 -4
- package/src/types/IRWSUser.ts +6 -6
- package/src/types/IRWSViewComponent.ts +36 -36
- package/src/types/IReFormerField.ts +4 -4
- package/src/types/RWSNotify.ts +6 -6
- package/src/types/RWSWindow.ts +41 -41
- package/types/declarations.d.ts +8 -8
- package/types/docs-typings.d.ts +15 -15
package/src/styles/_grid.scss
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
$mediaQuerySteps: (
|
|
2
|
-
'md': var(--rws-md-width, 1200px),
|
|
3
|
-
'sm': var(--rws-sm-width, 992px),
|
|
4
|
-
'xs': var(--rws-xs-width, 768px)
|
|
5
|
-
);
|
|
6
|
-
|
|
7
|
-
// Mixin for the grid container
|
|
8
|
-
@mixin grid-container() {
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-wrap: wrap;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@mixin grid-container-gap($gap) {
|
|
14
|
-
gap: $gap;
|
|
15
|
-
margin-right: -#{$gap};
|
|
16
|
-
margin-left: -#{$gap};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Mixin for grid columns
|
|
20
|
-
|
|
21
|
-
@mixin internal-grid-column($columns: 12) {
|
|
22
|
-
flex: 0 0 calc(100% / 12 * $columns);
|
|
23
|
-
max-width: calc(100% / 12 * $columns);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@mixin grid-column($columns: 12) {
|
|
27
|
-
@include internal-grid-column($columns);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@mixin grid-column($columns: 12, $mdColumns: 12) {
|
|
31
|
-
@include internal-grid-column($columns);
|
|
32
|
-
|
|
33
|
-
@media screen and (max-width: map.get($mediaQuerySteps, 'md')) {
|
|
34
|
-
@include internal-grid-column($mdColumns);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@mixin grid-column($columns: 12, $mdColumns: 12, $smColumns: 12) {
|
|
39
|
-
@include internal-grid-column($columns);
|
|
40
|
-
|
|
41
|
-
@media screen and (max-width: map.get($mediaQuerySteps, 'md')) {
|
|
42
|
-
@include internal-grid-column($mdColumns);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@media screen and (max-width: map.get($mediaQuerySteps, 'sm')) {
|
|
46
|
-
@include internal-grid-column($smColumns);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
@mixin grid-column($columns: 12, $mdColumns: 12, $smColumns: 12, $xsColumns: 12) {
|
|
51
|
-
@include internal-grid-column($columns);
|
|
52
|
-
|
|
53
|
-
@media screen and (max-width: map.get($mediaQuerySteps, 'md')) {
|
|
54
|
-
@include internal-grid-column($mdColumns);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@media screen and (max-width: map.get($mediaQuerySteps, 'sm')) {
|
|
58
|
-
@include internal-grid-column($smColumns);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
@media screen and (max-width: map.get($mediaQuerySteps, 'xs')) {
|
|
62
|
-
@include internal-grid-column($xsColumns);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Mixins for grid alignment
|
|
67
|
-
|
|
68
|
-
@mixin grid-flex-align-items($horizontal, $vertical: top) {
|
|
69
|
-
justify-content: $horizontal;
|
|
70
|
-
align-items: $vertical;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
@mixin center-container() {
|
|
74
|
-
margin-left: auto;
|
|
75
|
-
margin-right: auto;
|
|
1
|
+
$mediaQuerySteps: (
|
|
2
|
+
'md': var(--rws-md-width, 1200px),
|
|
3
|
+
'sm': var(--rws-sm-width, 992px),
|
|
4
|
+
'xs': var(--rws-xs-width, 768px)
|
|
5
|
+
);
|
|
6
|
+
|
|
7
|
+
// Mixin for the grid container
|
|
8
|
+
@mixin grid-container() {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-wrap: wrap;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@mixin grid-container-gap($gap) {
|
|
14
|
+
gap: $gap;
|
|
15
|
+
margin-right: -#{$gap};
|
|
16
|
+
margin-left: -#{$gap};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Mixin for grid columns
|
|
20
|
+
|
|
21
|
+
@mixin internal-grid-column($columns: 12) {
|
|
22
|
+
flex: 0 0 calc(100% / 12 * $columns);
|
|
23
|
+
max-width: calc(100% / 12 * $columns);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@mixin grid-column($columns: 12) {
|
|
27
|
+
@include internal-grid-column($columns);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@mixin grid-column($columns: 12, $mdColumns: 12) {
|
|
31
|
+
@include internal-grid-column($columns);
|
|
32
|
+
|
|
33
|
+
@media screen and (max-width: map.get($mediaQuerySteps, 'md')) {
|
|
34
|
+
@include internal-grid-column($mdColumns);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@mixin grid-column($columns: 12, $mdColumns: 12, $smColumns: 12) {
|
|
39
|
+
@include internal-grid-column($columns);
|
|
40
|
+
|
|
41
|
+
@media screen and (max-width: map.get($mediaQuerySteps, 'md')) {
|
|
42
|
+
@include internal-grid-column($mdColumns);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@media screen and (max-width: map.get($mediaQuerySteps, 'sm')) {
|
|
46
|
+
@include internal-grid-column($smColumns);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@mixin grid-column($columns: 12, $mdColumns: 12, $smColumns: 12, $xsColumns: 12) {
|
|
51
|
+
@include internal-grid-column($columns);
|
|
52
|
+
|
|
53
|
+
@media screen and (max-width: map.get($mediaQuerySteps, 'md')) {
|
|
54
|
+
@include internal-grid-column($mdColumns);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@media screen and (max-width: map.get($mediaQuerySteps, 'sm')) {
|
|
58
|
+
@include internal-grid-column($smColumns);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@media screen and (max-width: map.get($mediaQuerySteps, 'xs')) {
|
|
62
|
+
@include internal-grid-column($xsColumns);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Mixins for grid alignment
|
|
67
|
+
|
|
68
|
+
@mixin grid-flex-align-items($horizontal, $vertical: top) {
|
|
69
|
+
justify-content: $horizontal;
|
|
70
|
+
align-items: $vertical;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@mixin center-container() {
|
|
74
|
+
margin-left: auto;
|
|
75
|
+
margin-right: auto;
|
|
76
76
|
}
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
// Import the new grid system (if needed - depends on your build setup)
|
|
2
|
-
// @import 'grid';
|
|
3
|
-
|
|
4
|
-
// Keep the legacy breakpoints for backward compatibility
|
|
5
|
-
$mediaQuerySteps: $breakpoints;
|
|
6
|
-
|
|
7
|
-
// Legacy mixins using new system
|
|
8
|
-
|
|
9
|
-
// Mixin for the grid container
|
|
10
|
-
@mixin grid-container() {
|
|
11
|
-
@include rws-gr;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@mixin grid-container-gap($gap) {
|
|
15
|
-
@include rws-gr-gap($gap);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Internal helper kept for backward compatibility
|
|
19
|
-
@mixin internal-grid-column($columns: 12) {
|
|
20
|
-
@include _gr-col-calc($columns);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// Legacy column mixins using new system
|
|
24
|
-
@mixin grid-column($columns: 12) {
|
|
25
|
-
@include rws-gr-col($columns);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// Two breakpoint version
|
|
29
|
-
@mixin grid-column($columns: 12, $mdColumns: 12) {
|
|
30
|
-
@include rws-gr-col($columns, $mdColumns);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Three breakpoint version
|
|
34
|
-
@mixin grid-column($columns: 12, $mdColumns: 12, $smColumns: 12) {
|
|
35
|
-
@include rws-gr-col($columns, $mdColumns, $smColumns);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Four breakpoint version
|
|
39
|
-
@mixin grid-column($columns: 12, $mdColumns: 12, $smColumns: 12, $xsColumns: 12) {
|
|
40
|
-
@include rws-gr-col($columns, $mdColumns, $smColumns, $xsColumns);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Mixins for grid alignment
|
|
44
|
-
@mixin grid-flex-align-items($horizontal, $vertical: top) {
|
|
45
|
-
@include rws-gr-align($horizontal, $vertical);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@mixin center-container() {
|
|
49
|
-
@include rws-gr-center;
|
|
1
|
+
// Import the new grid system (if needed - depends on your build setup)
|
|
2
|
+
// @import 'grid';
|
|
3
|
+
|
|
4
|
+
// Keep the legacy breakpoints for backward compatibility
|
|
5
|
+
$mediaQuerySteps: $breakpoints;
|
|
6
|
+
|
|
7
|
+
// Legacy mixins using new system
|
|
8
|
+
|
|
9
|
+
// Mixin for the grid container
|
|
10
|
+
@mixin grid-container() {
|
|
11
|
+
@include rws-gr;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@mixin grid-container-gap($gap) {
|
|
15
|
+
@include rws-gr-gap($gap);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Internal helper kept for backward compatibility
|
|
19
|
+
@mixin internal-grid-column($columns: 12) {
|
|
20
|
+
@include _gr-col-calc($columns);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Legacy column mixins using new system
|
|
24
|
+
@mixin grid-column($columns: 12) {
|
|
25
|
+
@include rws-gr-col($columns);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Two breakpoint version
|
|
29
|
+
@mixin grid-column($columns: 12, $mdColumns: 12) {
|
|
30
|
+
@include rws-gr-col($columns, $mdColumns);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Three breakpoint version
|
|
34
|
+
@mixin grid-column($columns: 12, $mdColumns: 12, $smColumns: 12) {
|
|
35
|
+
@include rws-gr-col($columns, $mdColumns, $smColumns);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Four breakpoint version
|
|
39
|
+
@mixin grid-column($columns: 12, $mdColumns: 12, $smColumns: 12, $xsColumns: 12) {
|
|
40
|
+
@include rws-gr-col($columns, $mdColumns, $smColumns, $xsColumns);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Mixins for grid alignment
|
|
44
|
+
@mixin grid-flex-align-items($horizontal, $vertical: top) {
|
|
45
|
+
@include rws-gr-align($horizontal, $vertical);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@mixin center-container() {
|
|
49
|
+
@include rws-gr-center;
|
|
50
50
|
}
|
package/src/styles/_misc.scss
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
@function px-to-em($pixels, $base-font-size: 16) {
|
|
2
|
-
@return #{calc($pixels / $base-font-size)}em;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
@mixin vars($variables) {
|
|
6
|
-
@each $name, $value in $variables {
|
|
7
|
-
--#{$name}: #{$value};
|
|
8
|
-
}
|
|
1
|
+
@function px-to-em($pixels, $base-font-size: 16) {
|
|
2
|
+
@return #{calc($pixels / $base-font-size)}em;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
@mixin vars($variables) {
|
|
6
|
+
@each $name, $value in $variables {
|
|
7
|
+
--#{$name}: #{$value};
|
|
8
|
+
}
|
|
9
9
|
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
@mixin customScrollbars($width: 10px, $trackColor: #f1f1f1, $thumbColor: #888) {
|
|
2
|
-
|
|
3
|
-
/* WebKit (Safari/Chrome) */
|
|
4
|
-
&::-webkit-scrollbar {
|
|
5
|
-
width: $width;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
&::-webkit-scrollbar-track {
|
|
9
|
-
background: $trackColor;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&::-webkit-scrollbar-thumb {
|
|
13
|
-
background: $thumbColor;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/* Firefox */
|
|
17
|
-
&::-moz-scrollbar {
|
|
18
|
-
width: $width;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&::-moz-scrollbar-track {
|
|
22
|
-
background: $trackColor;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&::-moz-scrollbar-thumb {
|
|
26
|
-
background: $thumbColor;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/* IE/Edge */
|
|
30
|
-
&::-ms-scrollbar {
|
|
31
|
-
width: $width;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&::-ms-scrollbar-track {
|
|
35
|
-
background: $trackColor;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&::-ms-scrollbar-thumb {
|
|
39
|
-
background: $thumbColor;
|
|
40
|
-
}
|
|
1
|
+
@mixin customScrollbars($width: 10px, $trackColor: #f1f1f1, $thumbColor: #888) {
|
|
2
|
+
|
|
3
|
+
/* WebKit (Safari/Chrome) */
|
|
4
|
+
&::-webkit-scrollbar {
|
|
5
|
+
width: $width;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&::-webkit-scrollbar-track {
|
|
9
|
+
background: $trackColor;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&::-webkit-scrollbar-thumb {
|
|
13
|
+
background: $thumbColor;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Firefox */
|
|
17
|
+
&::-moz-scrollbar {
|
|
18
|
+
width: $width;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&::-moz-scrollbar-track {
|
|
22
|
+
background: $trackColor;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&::-moz-scrollbar-thumb {
|
|
26
|
+
background: $thumbColor;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* IE/Edge */
|
|
30
|
+
&::-ms-scrollbar {
|
|
31
|
+
width: $width;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&::-ms-scrollbar-track {
|
|
35
|
+
background: $trackColor;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&::-ms-scrollbar-thumb {
|
|
39
|
+
background: $thumbColor;
|
|
40
|
+
}
|
|
41
41
|
}
|
package/src/styles/includes.scss
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
|
|
3
|
-
@import "_misc";
|
|
4
|
-
@import "_scrollbars";
|
|
5
|
-
@import "_grid";
|
|
6
|
-
@import "_darkreader";
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
@import "_misc";
|
|
4
|
+
@import "_scrollbars";
|
|
5
|
+
@import "_grid";
|
|
6
|
+
@import "_darkreader";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export interface IKDBTypeInfo {
|
|
2
|
-
fieldName: string;
|
|
3
|
-
type: string;
|
|
4
|
-
boundModel?: string
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface IKDBTypesResponse {
|
|
8
|
-
success: boolean;
|
|
9
|
-
data: {
|
|
10
|
-
types: IKDBTypeInfo[];
|
|
11
|
-
};
|
|
1
|
+
export interface IKDBTypeInfo {
|
|
2
|
+
fieldName: string;
|
|
3
|
+
type: string;
|
|
4
|
+
boundModel?: string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface IKDBTypesResponse {
|
|
8
|
+
success: boolean;
|
|
9
|
+
data: {
|
|
10
|
+
types: IKDBTypeInfo[];
|
|
11
|
+
};
|
|
12
12
|
}
|
package/src/types/IRWSConfig.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import RWSViewComponent from '../components/_component';
|
|
2
|
-
import { IPluginSpawnOption } from './IRWSPlugin';
|
|
3
|
-
|
|
4
|
-
export type IFrontRoutes = Record<string, unknown>;
|
|
5
|
-
export default interface IRWSConfig {
|
|
6
|
-
[key: string]: any
|
|
7
|
-
dev?: boolean
|
|
8
|
-
defaultLayout?: typeof RWSViewComponent
|
|
9
|
-
backendUrl?: string
|
|
10
|
-
wsUrl?: string
|
|
11
|
-
backendRoutes?: any[]
|
|
12
|
-
apiPrefix?: string
|
|
13
|
-
routes?: IFrontRoutes
|
|
14
|
-
transports?: string[]
|
|
15
|
-
user?: any
|
|
16
|
-
ignoreRWSComponents?: boolean
|
|
17
|
-
pubUrl?: string
|
|
18
|
-
pubUrlFilePrefix?: string
|
|
19
|
-
partedDirUrlPrefix?: string
|
|
20
|
-
dontPushToSW?: boolean
|
|
21
|
-
parted?: boolean,
|
|
22
|
-
rwsDefines?: {[key: string]: any}
|
|
23
|
-
partedFileDir?: string
|
|
24
|
-
partedPrefix?: string
|
|
25
|
-
hotReload?: boolean,
|
|
26
|
-
hotReloadPort?: number,
|
|
27
|
-
plugins?: IPluginSpawnOption<any>[]
|
|
28
|
-
routing_enabled?: boolean
|
|
29
|
-
_noLoad?: boolean
|
|
1
|
+
import RWSViewComponent from '../components/_component';
|
|
2
|
+
import { IPluginSpawnOption } from './IRWSPlugin';
|
|
3
|
+
|
|
4
|
+
export type IFrontRoutes = Record<string, unknown>;
|
|
5
|
+
export default interface IRWSConfig {
|
|
6
|
+
[key: string]: any
|
|
7
|
+
dev?: boolean
|
|
8
|
+
defaultLayout?: typeof RWSViewComponent
|
|
9
|
+
backendUrl?: string
|
|
10
|
+
wsUrl?: string
|
|
11
|
+
backendRoutes?: any[]
|
|
12
|
+
apiPrefix?: string
|
|
13
|
+
routes?: IFrontRoutes
|
|
14
|
+
transports?: string[]
|
|
15
|
+
user?: any
|
|
16
|
+
ignoreRWSComponents?: boolean
|
|
17
|
+
pubUrl?: string
|
|
18
|
+
pubUrlFilePrefix?: string
|
|
19
|
+
partedDirUrlPrefix?: string
|
|
20
|
+
dontPushToSW?: boolean
|
|
21
|
+
parted?: boolean,
|
|
22
|
+
rwsDefines?: {[key: string]: any}
|
|
23
|
+
partedFileDir?: string
|
|
24
|
+
partedPrefix?: string
|
|
25
|
+
hotReload?: boolean,
|
|
26
|
+
hotReloadPort?: number,
|
|
27
|
+
plugins?: IPluginSpawnOption<any>[]
|
|
28
|
+
routing_enabled?: boolean
|
|
29
|
+
_noLoad?: boolean
|
|
30
30
|
}
|
package/src/types/IRWSPlugin.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { DefaultRWSPluginOptionsType, RWSPlugin } from "../plugins/_plugin";
|
|
2
|
-
import IRWSUser from "./IRWSUser";
|
|
3
|
-
import { Container } from "../components/_container";
|
|
4
|
-
import RWSWindow from "./RWSWindow";
|
|
5
|
-
import { RWSInfoType } from "../client/components";
|
|
6
|
-
|
|
7
|
-
export abstract class IRWSPlugin<T extends DefaultRWSPluginOptionsType> {
|
|
8
|
-
abstract onClientStart(): Promise<void>;
|
|
9
|
-
abstract onPartedComponentsLoad(componentParts: RWSInfoType): Promise<void>;
|
|
10
|
-
abstract onComponentsDeclare(): Promise<void>;
|
|
11
|
-
abstract onSetUser(user: IRWSUser): Promise<void>;
|
|
12
|
-
protected abstract options: T;
|
|
13
|
-
protected abstract container: Container;
|
|
14
|
-
protected abstract window: RWSWindow;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface IStaticRWSPlugin<T extends DefaultRWSPluginOptionsType> {
|
|
18
|
-
new (options: T): RWSPlugin<T>;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface IPluginSpawnOption<T extends DefaultRWSPluginOptionsType = DefaultRWSPluginOptionsType> {
|
|
22
|
-
pluginEntry: IStaticRWSPlugin<T>;
|
|
23
|
-
options?: T;
|
|
1
|
+
import { DefaultRWSPluginOptionsType, RWSPlugin } from "../plugins/_plugin";
|
|
2
|
+
import IRWSUser from "./IRWSUser";
|
|
3
|
+
import { Container } from "../components/_container";
|
|
4
|
+
import RWSWindow from "./RWSWindow";
|
|
5
|
+
import { RWSInfoType } from "../client/components";
|
|
6
|
+
|
|
7
|
+
export abstract class IRWSPlugin<T extends DefaultRWSPluginOptionsType> {
|
|
8
|
+
abstract onClientStart(): Promise<void>;
|
|
9
|
+
abstract onPartedComponentsLoad(componentParts: RWSInfoType): Promise<void>;
|
|
10
|
+
abstract onComponentsDeclare(): Promise<void>;
|
|
11
|
+
abstract onSetUser(user: IRWSUser): Promise<void>;
|
|
12
|
+
protected abstract options: T;
|
|
13
|
+
protected abstract container: Container;
|
|
14
|
+
protected abstract window: RWSWindow;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface IStaticRWSPlugin<T extends DefaultRWSPluginOptionsType> {
|
|
18
|
+
new (options: T): RWSPlugin<T>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface IPluginSpawnOption<T extends DefaultRWSPluginOptionsType = DefaultRWSPluginOptionsType> {
|
|
22
|
+
pluginEntry: IStaticRWSPlugin<T>;
|
|
23
|
+
options?: T;
|
|
24
24
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export interface IRWSResourceQuery {
|
|
2
|
-
fieldName: string,
|
|
3
|
-
type: String,
|
|
4
|
-
boundModel: string
|
|
1
|
+
export interface IRWSResourceQuery {
|
|
2
|
+
fieldName: string,
|
|
3
|
+
type: String,
|
|
4
|
+
boundModel: string
|
|
5
5
|
}
|
package/src/types/IRWSUser.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export default interface IRWSUser {
|
|
2
|
-
email: string;
|
|
3
|
-
mongoId: string;
|
|
4
|
-
name: string;
|
|
5
|
-
message: string;
|
|
6
|
-
jwt_token: string,
|
|
1
|
+
export default interface IRWSUser {
|
|
2
|
+
email: string;
|
|
3
|
+
mongoId: string;
|
|
4
|
+
name: string;
|
|
5
|
+
message: string;
|
|
6
|
+
jwt_token: string,
|
|
7
7
|
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { ViewTemplate } from '@microsoft/fast-element';
|
|
2
|
-
import { DOMOutputType } from '../services/DOMService';
|
|
3
|
-
|
|
4
|
-
type IAssetShowOptions = Record<string, any>;
|
|
5
|
-
|
|
6
|
-
interface IRWSViewComponent extends Node {
|
|
7
|
-
__isLoading: boolean;
|
|
8
|
-
routeParams: Record<string, string>;
|
|
9
|
-
trashIterator: number;
|
|
10
|
-
fileAssets: { [key: string]: ViewTemplate };
|
|
11
|
-
|
|
12
|
-
connectedCallback(): void;
|
|
13
|
-
|
|
14
|
-
passRouteParams(routeParams?: Record<string, string>): void;
|
|
15
|
-
|
|
16
|
-
showAsset(assetName: string, options?: IAssetShowOptions): ViewTemplate<any>;
|
|
17
|
-
|
|
18
|
-
on<T>(type: string, listener: (event: CustomEvent<T>) => any): void;
|
|
19
|
-
|
|
20
|
-
$emitDown<T>(eventName: string, payload: T): void;
|
|
21
|
-
|
|
22
|
-
parse$<T extends Element>(input: NodeListOf<T>, directReturn?: boolean): DOMOutputType<T>;
|
|
23
|
-
|
|
24
|
-
$<T extends Element>(selectors: string, directReturn?: boolean): DOMOutputType<T>;
|
|
25
|
-
|
|
26
|
-
loadingString<T, C>(item: T, addContent: (cnt: C | { output: string }, paste?: boolean, error?: boolean) => void, shouldStop: (stopItem: T, addContent: (cnt: C | { output: string }, paste?: boolean,error?: boolean) => void) => Promise<boolean>): Promise<void>
|
|
27
|
-
|
|
28
|
-
onDOMLoad(): Promise<void>;
|
|
29
|
-
|
|
30
|
-
forceReload(): void;
|
|
31
|
-
|
|
32
|
-
hotReplacedCallback(): void;
|
|
33
|
-
|
|
34
|
-
sendEventToOutside<T>(eventName: string, data: T): void;
|
|
35
|
-
}
|
|
36
|
-
|
|
1
|
+
import { ViewTemplate } from '@microsoft/fast-element';
|
|
2
|
+
import { DOMOutputType } from '../services/DOMService';
|
|
3
|
+
|
|
4
|
+
type IAssetShowOptions = Record<string, any>;
|
|
5
|
+
|
|
6
|
+
interface IRWSViewComponent extends Node {
|
|
7
|
+
__isLoading: boolean;
|
|
8
|
+
routeParams: Record<string, string>;
|
|
9
|
+
trashIterator: number;
|
|
10
|
+
fileAssets: { [key: string]: ViewTemplate };
|
|
11
|
+
|
|
12
|
+
connectedCallback(): void;
|
|
13
|
+
|
|
14
|
+
passRouteParams(routeParams?: Record<string, string>): void;
|
|
15
|
+
|
|
16
|
+
showAsset(assetName: string, options?: IAssetShowOptions): ViewTemplate<any>;
|
|
17
|
+
|
|
18
|
+
on<T>(type: string, listener: (event: CustomEvent<T>) => any): void;
|
|
19
|
+
|
|
20
|
+
$emitDown<T>(eventName: string, payload: T): void;
|
|
21
|
+
|
|
22
|
+
parse$<T extends Element>(input: NodeListOf<T>, directReturn?: boolean): DOMOutputType<T>;
|
|
23
|
+
|
|
24
|
+
$<T extends Element>(selectors: string, directReturn?: boolean): DOMOutputType<T>;
|
|
25
|
+
|
|
26
|
+
loadingString<T, C>(item: T, addContent: (cnt: C | { output: string }, paste?: boolean, error?: boolean) => void, shouldStop: (stopItem: T, addContent: (cnt: C | { output: string }, paste?: boolean,error?: boolean) => void) => Promise<boolean>): Promise<void>
|
|
27
|
+
|
|
28
|
+
onDOMLoad(): Promise<void>;
|
|
29
|
+
|
|
30
|
+
forceReload(): void;
|
|
31
|
+
|
|
32
|
+
hotReplacedCallback(): void;
|
|
33
|
+
|
|
34
|
+
sendEventToOutside<T>(eventName: string, data: T): void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
37
|
export {IRWSViewComponent, IAssetShowOptions};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export interface IReFormerField {
|
|
2
|
-
name: string,
|
|
3
|
-
defaultValue?: any,
|
|
4
|
-
setForm: (field: string, value: any) => Promise<void>
|
|
1
|
+
export interface IReFormerField {
|
|
2
|
+
name: string,
|
|
3
|
+
defaultValue?: any,
|
|
4
|
+
setForm: (field: string, value: any) => Promise<void>
|
|
5
5
|
}
|
package/src/types/RWSNotify.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
type NotifyUiType = 'alert' | 'notification' | 'silent';
|
|
2
|
-
type NotifyLogType = 'info' | 'error' | 'warning';
|
|
3
|
-
|
|
4
|
-
type RWSNotify = (message: string, logType?: NotifyLogType, uiType?: NotifyUiType, onConfirm?: (params?: any) => void, notifierOptions?: any) => any;
|
|
5
|
-
|
|
6
|
-
export default RWSNotify;
|
|
1
|
+
type NotifyUiType = 'alert' | 'notification' | 'silent';
|
|
2
|
+
type NotifyLogType = 'info' | 'error' | 'warning';
|
|
3
|
+
|
|
4
|
+
type RWSNotify = (message: string, logType?: NotifyLogType, uiType?: NotifyUiType, onConfirm?: (params?: any) => void, notifierOptions?: any) => any;
|
|
5
|
+
|
|
6
|
+
export default RWSNotify;
|
|
7
7
|
export { NotifyUiType, NotifyLogType };
|