@anglr/common 17.0.0-beta.20230815112307 → 17.0.0-beta.20230817112330

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/changelog.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## Version 17.0.0 (2023-08-15)
3
+ ## Version 17.0.0 (2023-08-17)
4
4
 
5
5
  ### Features
6
6
 
@@ -82,8 +82,9 @@
82
82
  - minimal supported version of `moment` is `2.29.4`
83
83
  - minimal supported version of `date-fns` is `2.30.0`
84
84
  - minimal supported version of `@floating-ui/dom` is `1.4.4`
85
- - minimal supported version of `tslib` is `2.6.0`
85
+ - minimal supported version of `tslib` is `2.6.1`
86
86
  - dropped support of `NodeJs` lower than `16.14`
87
+ - reworked styles, now using same technique as `@anglr/datetime` using mixins and functions to define theme
87
88
  - pipe `LocalizePipe` renamed to `LocalizeSAPipe`
88
89
  - pipe `IsNaNPipe` renamed to `IsNaNSAPipe`
89
90
  - pipe `IsPresentPipe` renamed to `IsPresentSAPipe`
@@ -122,9 +123,10 @@
122
123
  - removed `PositionModule` module, use `PositionToSADirective` directly
123
124
  - *subpackage* `@anglr/common/numeral`
124
125
  - pipe `NumeralPipe` renamed to `NumeralSAPipe`
126
+ - removed `NumeralModule` module, use `NumeralSAPipe` directly
125
127
  - *subpackage* `@anglr/common/structured-log`
126
128
  - updated `ConsoleLogModule` module
127
- - removed `forRoot` method, instead use new `provideConsoleComponentSink` function
129
+ - removed `forRoot` method, instead use new `provideConsoleComponentSink` function and you also have to provide logger using `provideLogger(StructuredLogLogger)`
128
130
  - removed `STRUCTURED_LOG_LOGGER` from public API, instead use new `provideLogger` with `StructuredLogLogger` type
129
131
  - *subpackage* `@anglr/common/floating-ui`
130
132
  - removed `FLOATING_UI_POSITION` from public API, instead use new `providePosition` with `FloatingUiPosition` type
@@ -1,3 +1,2 @@
1
1
  export * from './pipes/numeral.pipe';
2
- export * from './modules/numeral.module';
3
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../numeral/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './pipes/numeral.pipe';\nexport * from './modules/numeral.module';"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../numeral/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './pipes/numeral.pipe';\n"]}
@@ -1,3 +1,2 @@
1
1
  export * from './pipes/numeral.pipe';
2
- export * from './modules/numeral.module';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anglr/common",
3
- "version": "17.0.0-beta.20230815112307",
3
+ "version": "17.0.0-beta.20230817112330",
4
4
  "description": "Angular module for common angular stuff",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -112,7 +112,7 @@
112
112
  "date-fns": "^2.30.0",
113
113
  "positions": "^1.6.2",
114
114
  "@floating-ui/dom": "^1.4.4",
115
- "tslib": "^2.6.0"
115
+ "tslib": "^2.6.1"
116
116
  },
117
117
  "devDependencies": {
118
118
  "@angular/core": "^16.0.3",
@@ -142,14 +142,14 @@
142
142
  "@angular/language-service": "^16.0.3",
143
143
  "@microsoft/api-extractor": "7.36.1",
144
144
  "@microsoft/api-documenter": "7.22.24",
145
- "tslib": "2.6.0",
145
+ "tslib": "2.6.1",
146
146
  "eslint": "7.32.0",
147
147
  "@typescript-eslint/eslint-plugin": "4.33.0",
148
148
  "@typescript-eslint/parser": "4.33.0",
149
149
  "eslint-plugin-ressurectit": "0.1.0",
150
150
  "rimraf": "3.0.2",
151
151
  "copyfiles": "2.4.1",
152
- "replace-in-file": "6.3.2",
152
+ "replace-in-file": "6.3.5",
153
153
  "path-exists-cli": "2.0.0",
154
154
  "typescript": "5.0.4",
155
155
  "npm-git-version": "2.0.0"
@@ -160,11 +160,11 @@
160
160
  "./package.json": {
161
161
  "default": "./package.json"
162
162
  },
163
- "./src/style.scss": {
164
- "sass": "./src/style.scss"
163
+ "./styles": {
164
+ "sass": "./styles/index.scss"
165
165
  },
166
- "./styles/*": {
167
- "sass": "./styles/*.scss"
166
+ "./styles/themes/*": {
167
+ "sass": "./styles/themes/*.scss"
168
168
  },
169
169
  "./typings/*": {
170
170
  "types": "./typings/*/index.d.ts"
@@ -0,0 +1,19 @@
1
+ @mixin css
2
+ {
3
+ multi-button
4
+ {
5
+ .sub-buttons
6
+ {
7
+ box-shadow: 0 8px 10px 1px var(--common-multiButton-subButton-shadow), 0 3px 14px 2px var(--common-multiButton-subButton-shadow), 0 5px 5px -3px var(--common-multiButton-subButton-shadow);
8
+ background-color: var(--common-multiButton-subButton-background);
9
+ border: 1px solid var(--common-multiButton-subButton-border);
10
+
11
+ button
12
+ {
13
+ background-color: var(--common-multiButton-subButton-background);
14
+ color: var(--common-multiButton-subButton-foreground);
15
+ border-color: transparent;
16
+ }
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,9 @@
1
+ @mixin css
2
+ {
3
+ tooltip-popup
4
+ {
5
+ background-color: var(--common-tooltip-background);
6
+ color: var(--common-tooltip-foreground);
7
+ box-shadow: 0 0 2px var(--common-tooltip-foreground);
8
+ }
9
+ }
@@ -0,0 +1,11 @@
1
+ @use 'sass:map';
2
+
3
+ @use 'theme';
4
+
5
+ @function defineTheme($colors, $font)
6
+ {
7
+ $theme: map.deep-merge(theme.$defaultTheme, $colors);
8
+ $theme: map.set($theme, 'font', $font);
9
+
10
+ @return $theme;
11
+ }
@@ -0,0 +1,3 @@
1
+ @mixin misc
2
+ {
3
+ }
@@ -0,0 +1,73 @@
1
+ @use 'sass:meta';
2
+ @use 'sass:map';
3
+
4
+ @use 'misc';
5
+ @use '../components/multi-button' as multiButton;
6
+ @use '../components/tooltip' as tooltip;
7
+
8
+ @mixin buildThemeColorsTooltip($theme)
9
+ {
10
+ @if $theme
11
+ {
12
+ --common-tooltip-background: #{map.get(map.get($theme, 'tooltip'), 'background')};
13
+ --common-tooltip-foreground: #{map.get(map.get($theme, 'tooltip'), 'foreground')};
14
+ --common-tooltip-shadow: #{map.get(map.get($theme, 'tooltip'), 'shadow')};
15
+ }
16
+ }
17
+
18
+ @mixin buildThemeColorsMultiButton($theme)
19
+ {
20
+ @if $theme
21
+ {
22
+ --common-multiButton-subButton-background: #{map.get(map.get(map.get($theme, 'multiButton'), 'subButton'), 'background')};
23
+ --common-multiButton-subButton-foreground: #{map.get(map.get(map.get($theme, 'multiButton'), 'subButton'), 'foreground')};
24
+ --common-multiButton-subButton-border: #{map.get(map.get(map.get($theme, 'multiButton'), 'subButton'), 'border')};
25
+ --common-multiButton-subButton-shadow: #{map.get(map.get(map.get($theme, 'multiButton'), 'subButton'), 'shadow')};
26
+ }
27
+ }
28
+
29
+ @mixin buildThemeColors($theme)
30
+ {
31
+ @include buildThemeColorsTooltip($theme);
32
+ @include buildThemeColorsMultiButton($theme);
33
+ }
34
+
35
+ @mixin buildThemeCssMisc
36
+ {
37
+ @include misc.misc;
38
+ }
39
+
40
+ @mixin buildThemeCssTooltip
41
+ {
42
+ @include tooltip.css;
43
+ }
44
+
45
+ @mixin buildThemeCssMultiButton
46
+ {
47
+ @include multiButton.css;
48
+ }
49
+
50
+ @mixin buildThemeCss
51
+ {
52
+ @include buildThemeCssMisc;
53
+ @include buildThemeCssTooltip;
54
+ @include buildThemeCssMultiButton;
55
+ }
56
+
57
+ @mixin buildThemeTooltip($theme)
58
+ {
59
+ @include buildThemeColorsTooltip($theme);
60
+ @include buildThemeCssTooltip();
61
+ }
62
+
63
+ @mixin buildThemeMultiButton($theme)
64
+ {
65
+ @include buildThemeColorsMultiButton($theme);
66
+ @include buildThemeCssMultiButton();
67
+ }
68
+
69
+ @mixin buildTheme($theme)
70
+ {
71
+ @include buildThemeColors($theme);
72
+ @include buildThemeCss;
73
+ }
@@ -0,0 +1,19 @@
1
+ $defaultTheme:
2
+ (
3
+ tooltip:
4
+ (
5
+ background: #151515,
6
+ foreground: #F5F5F5,
7
+ shadow: #C0C0C0,
8
+ ),
9
+ multiButton:
10
+ (
11
+ subButton:
12
+ (
13
+ background: #fff,
14
+ foreground: #333,
15
+ border: #fff,
16
+ shadow: #f0f0f0,
17
+ ),
18
+ ),
19
+ );
@@ -0,0 +1,2 @@
1
+ @forward './core/functions';
2
+ @forward './core/mixins';
@@ -0,0 +1,38 @@
1
+ @use 'sass:map';
2
+ @use '../core/functions';
3
+ @use '../core/mixins';
4
+
5
+ $_darkDefaultTheme:
6
+ (
7
+ multiButton:
8
+ (
9
+ subButton:
10
+ (
11
+ background: #333,
12
+ foreground: #FFF,
13
+ border: #333,
14
+ ),
15
+ ),
16
+ );
17
+
18
+ @function defineTheme($colors: (), $font: 'Inter')
19
+ {
20
+ $colors: map.deep-merge($_darkDefaultTheme, $colors);
21
+
22
+ @return functions.defineTheme($colors, $font);
23
+ }
24
+
25
+ @mixin buildThemeTooltip()
26
+ {
27
+ @include mixins.buildThemeTooltip(defineTheme());
28
+ }
29
+
30
+ @mixin buildThemeMultiButton()
31
+ {
32
+ @include mixins.buildThemeMultiButton(defineTheme());
33
+ }
34
+
35
+ @mixin buildTheme()
36
+ {
37
+ @include mixins.buildTheme(defineTheme());
38
+ }
@@ -0,0 +1,35 @@
1
+ @use 'sass:map';
2
+ @use '../core/functions';
3
+ @use '../core/mixins';
4
+
5
+ $_lightDefaultTheme:
6
+ (
7
+ tooltip:
8
+ (
9
+ background: #FAFAFA,
10
+ foreground: #444,
11
+ shadow: #333,
12
+ ),
13
+ );
14
+
15
+ @function defineTheme($colors: (), $font: 'Inter')
16
+ {
17
+ $colors: map.deep-merge($_lightDefaultTheme, $colors);
18
+
19
+ @return functions.defineTheme($colors, $font);
20
+ }
21
+
22
+ @mixin buildThemeTooltip()
23
+ {
24
+ @include mixins.buildThemeTooltip(defineTheme());
25
+ }
26
+
27
+ @mixin buildThemeMultiButton()
28
+ {
29
+ @include mixins.buildThemeMultiButton(defineTheme());
30
+ }
31
+
32
+ @mixin buildTheme()
33
+ {
34
+ @include mixins.buildTheme(defineTheme());
35
+ }
package/version.bak CHANGED
@@ -1 +1 @@
1
- 17.0.0-beta.20230815112307
1
+ 17.0.0-beta.20230817112330
@@ -1,20 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { NumeralSAPipe } from './../pipes/numeral.pipe';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Module for components, pipes and directives that are using numeral library
6
- */
7
- class NumeralModule {
8
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: NumeralModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
9
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: NumeralModule, imports: [NumeralSAPipe], exports: [NumeralSAPipe] });
10
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: NumeralModule });
11
- }
12
- export { NumeralModule };
13
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: NumeralModule, decorators: [{
14
- type: NgModule,
15
- args: [{
16
- imports: [NumeralSAPipe],
17
- exports: [NumeralSAPipe]
18
- }]
19
- }] });
20
- //# sourceMappingURL=numeral.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"numeral.module.js","sourceRoot":"","sources":["../../../../numeral/src/modules/numeral.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;;AAEtD;;GAEG;AACH,MAKa,aAAa;uGAAb,aAAa;wGAAb,aAAa,YAHZ,aAAa,aACb,aAAa;wGAEd,aAAa;;SAAb,aAAa;2FAAb,aAAa;kBALzB,QAAQ;mBACT;oBACI,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,OAAO,EAAE,CAAC,aAAa,CAAC;iBAC3B","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {NumeralSAPipe} from './../pipes/numeral.pipe';\n\n/**\n * Module for components, pipes and directives that are using numeral library\n */\n@NgModule(\n{\n imports: [NumeralSAPipe],\n exports: [NumeralSAPipe]\n})\nexport class NumeralModule\n{\n}"]}
@@ -1,11 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "../pipes/numeral.pipe";
3
- /**
4
- * Module for components, pipes and directives that are using numeral library
5
- */
6
- export declare class NumeralModule {
7
- static ɵfac: i0.ɵɵFactoryDeclaration<NumeralModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<NumeralModule, never, [typeof i1.NumeralSAPipe], [typeof i1.NumeralSAPipe]>;
9
- static ɵinj: i0.ɵɵInjectorDeclaration<NumeralModule>;
10
- }
11
- //# sourceMappingURL=numeral.module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"numeral.module.d.ts","sourceRoot":"","sources":["numeral.module.ts"],"names":[],"mappings":";;AAIA;;GAEG;AACH,qBAKa,aAAa;yCAAb,aAAa;0CAAb,aAAa;0CAAb,aAAa;CAEzB"}
@@ -1 +0,0 @@
1
- @forward 'multibutton/dark-colors-vars';
@@ -1 +0,0 @@
1
- @forward 'multibutton/light-colors-vars';
package/styles/dark.scss DELETED
@@ -1 +0,0 @@
1
- @forward 'multibutton/dark';
package/styles/light.scss DELETED
@@ -1 +0,0 @@
1
- @forward 'multibutton/light';
@@ -1,8 +0,0 @@
1
- @use "dark-colors" as theme;
2
-
3
- .multibutton-dark-theme
4
- {
5
- --multibutton-subbuttons-background: #{theme.$multibuttonSubbuttonsBackground};
6
- --multibutton-subbuttons-foreground: #{theme.$multibuttonSubbuttonsForeground};
7
- --multibutton-subbuttons-shadow: #{theme.$multibuttonSubbuttonsShadow};
8
- }
@@ -1,3 +0,0 @@
1
- $multibuttonSubbuttonsBackground: #333;
2
- $multibuttonSubbuttonsForeground: #FFF;
3
- $multibuttonSubbuttonsShadow: 240 240 240;
@@ -1,18 +0,0 @@
1
- @use "dark-colors" as theme;
2
-
3
- multi-button
4
- {
5
- .sub-buttons
6
- {
7
- box-shadow: 0 8px 10px 1px rgb(var(--multibutton-subbuttons-shadow, theme.$multibuttonSubbuttonsShadow) / 14%), 0 3px 14px 2px rgb(var(--multibutton-subbuttons-shadow, theme.$multibuttonSubbuttonsShadow) / 12%), 0 5px 5px -3px rgb(var(--multibutton-subbuttons-shadow, theme.$multibuttonSubbuttonsShadow) / 20%);
8
- background-color: var(--multibutton-subbuttons-background, theme.$multibuttonSubbuttonsBackground);
9
- border: 1px solid var(--multibutton-subbuttons-background, theme.$multibuttonSubbuttonsBackground);
10
-
11
- button
12
- {
13
- background-color: var(--multibutton-subbuttons-background, theme.$multibuttonSubbuttonsBackground);
14
- color: var(--multibutton-subbuttons-foreground, theme.$multibuttonSubbuttonsForeground);
15
- border-color: transparent;
16
- }
17
- }
18
- }
@@ -1,8 +0,0 @@
1
- @use "light-colors" as theme;
2
-
3
- .multibutton-light-theme
4
- {
5
- --multibutton-subbuttons-background: #{theme.$multibuttonSubbuttonsBackground};
6
- --multibutton-subbuttons-foreground: #{theme.$multibuttonSubbuttonsForeground};
7
- --multibutton-subbuttons-shadow: #{theme.$multibuttonSubbuttonsShadow};
8
- }
@@ -1,3 +0,0 @@
1
- $multibuttonSubbuttonsBackground: #fff;
2
- $multibuttonSubbuttonsForeground: #333;
3
- $multibuttonSubbuttonsShadow: 0 0 0;
@@ -1,18 +0,0 @@
1
- @use "light-colors" as theme;
2
-
3
- multi-button
4
- {
5
- .sub-buttons
6
- {
7
- box-shadow: 0 8px 10px 1px rgb(var(--multibutton-subbuttons-shadow, theme.$multibuttonSubbuttonsShadow) / 14%), 0 3px 14px 2px rgb(var(--multibutton-subbuttons-shadow, theme.$multibuttonSubbuttonsShadow) / 12%), 0 5px 5px -3px rgb(var(--multibutton-subbuttons-shadow, theme.$multibuttonSubbuttonsShadow) / 20%);
8
- background-color: var(--multibutton-subbuttons-background, theme.$multibuttonSubbuttonsBackground);
9
- border: 1px solid var(--multibutton-subbuttons-background, theme.$multibuttonSubbuttonsBackground);
10
-
11
- button
12
- {
13
- background-color: var(--multibutton-subbuttons-background, theme.$multibuttonSubbuttonsBackground);
14
- color: var(--multibutton-subbuttons-foreground, theme.$multibuttonSubbuttonsForeground);
15
- border-color: transparent;
16
- }
17
- }
18
- }
@@ -1,6 +0,0 @@
1
- tooltip-popup
2
- {
3
- background-color: #151515;
4
- color: #F5F5F5;
5
- box-shadow: 0 0 2px #C0C0C0;
6
- }
@@ -1,6 +0,0 @@
1
- tooltip-popup
2
- {
3
- background-color: #FAFAFA;
4
- color: #444;
5
- box-shadow: 0 0 2px #333;
6
- }