@ukho/admiralty-angular 0.1.2 → 0.1.3--canary.63.2801049.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 (51) hide show
  1. package/.browserslistrc +16 -0
  2. package/.editorconfig +16 -0
  3. package/.vscode/extensions.json +4 -0
  4. package/.vscode/launch.json +20 -0
  5. package/.vscode/tasks.json +42 -0
  6. package/CHANGELOG.md +97 -0
  7. package/ng-package.json +9 -0
  8. package/package.json +3 -6
  9. package/{dist/index.d.ts → src/index.ts} +6 -0
  10. package/src/lib/app_initialise.ts +8 -0
  11. package/src/lib/design-system.module.ts +45 -0
  12. package/src/lib/stencil-generated/angular-component-lib/utils.ts +57 -0
  13. package/src/lib/stencil-generated/boolean-value-accessor.ts +27 -0
  14. package/src/lib/stencil-generated/components.ts +1106 -0
  15. package/src/lib/stencil-generated/index.ts +48 -0
  16. package/src/lib/stencil-generated/number-value-accessor.ts +29 -0
  17. package/src/lib/stencil-generated/radio-value-accessor.ts +24 -0
  18. package/src/lib/stencil-generated/select-value-accessor.ts +24 -0
  19. package/src/lib/stencil-generated/text-value-accessor.ts +24 -0
  20. package/src/lib/stencil-generated/value-accessor.ts +39 -0
  21. package/tsconfig.json +39 -0
  22. package/dist/README.md +0 -5
  23. package/dist/esm2020/index.mjs +0 -12
  24. package/dist/esm2020/lib/app_initialise.mjs +0 -9
  25. package/dist/esm2020/lib/design-system.module.mjs +0 -60
  26. package/dist/esm2020/lib/stencil-generated/angular-component-lib/utils.mjs +0 -51
  27. package/dist/esm2020/lib/stencil-generated/boolean-value-accessor.mjs +0 -40
  28. package/dist/esm2020/lib/stencil-generated/components.mjs +0 -1214
  29. package/dist/esm2020/lib/stencil-generated/index.mjs +0 -47
  30. package/dist/esm2020/lib/stencil-generated/number-value-accessor.mjs +0 -42
  31. package/dist/esm2020/lib/stencil-generated/radio-value-accessor.mjs +0 -37
  32. package/dist/esm2020/lib/stencil-generated/select-value-accessor.mjs +0 -37
  33. package/dist/esm2020/lib/stencil-generated/text-value-accessor.mjs +0 -37
  34. package/dist/esm2020/lib/stencil-generated/value-accessor.mjs +0 -42
  35. package/dist/esm2020/ukho-admiralty-angular.mjs +0 -5
  36. package/dist/fesm2015/ukho-admiralty-angular.mjs +0 -1748
  37. package/dist/fesm2015/ukho-admiralty-angular.mjs.map +0 -1
  38. package/dist/fesm2020/ukho-admiralty-angular.mjs +0 -1548
  39. package/dist/fesm2020/ukho-admiralty-angular.mjs.map +0 -1
  40. package/dist/lib/app_initialise.d.ts +0 -1
  41. package/dist/lib/design-system.module.d.ts +0 -17
  42. package/dist/lib/stencil-generated/angular-component-lib/utils.d.ts +0 -9
  43. package/dist/lib/stencil-generated/boolean-value-accessor.d.ts +0 -9
  44. package/dist/lib/stencil-generated/components.d.ts +0 -508
  45. package/dist/lib/stencil-generated/index.d.ts +0 -2
  46. package/dist/lib/stencil-generated/number-value-accessor.d.ts +0 -9
  47. package/dist/lib/stencil-generated/radio-value-accessor.d.ts +0 -8
  48. package/dist/lib/stencil-generated/select-value-accessor.d.ts +0 -8
  49. package/dist/lib/stencil-generated/text-value-accessor.d.ts +0 -8
  50. package/dist/lib/stencil-generated/value-accessor.d.ts +0 -18
  51. package/dist/package.json +0 -41
@@ -0,0 +1,16 @@
1
+ # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2
+ # For additional information regarding the format and rule options, please see:
3
+ # https://github.com/browserslist/browserslist#queries
4
+
5
+ # For the full list of supported browsers by the Angular framework, please see:
6
+ # https://angular.io/guide/browser-support
7
+
8
+ # You can see what browsers were selected by your queries by running:
9
+ # npx browserslist
10
+
11
+ last 1 Chrome version
12
+ last 1 Firefox version
13
+ last 2 Edge major versions
14
+ last 2 Safari major versions
15
+ last 2 iOS major versions
16
+ Firefox ESR
package/.editorconfig ADDED
@@ -0,0 +1,16 @@
1
+ # Editor configuration, see https://editorconfig.org
2
+ root = true
3
+
4
+ [*]
5
+ charset = utf-8
6
+ indent_style = space
7
+ indent_size = 2
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+
11
+ [*.ts]
12
+ quote_type = single
13
+
14
+ [*.md]
15
+ max_line_length = off
16
+ trim_trailing_whitespace = false
@@ -0,0 +1,4 @@
1
+ {
2
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3
+ "recommendations": ["angular.ng-template"]
4
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
3
+ "version": "0.2.0",
4
+ "configurations": [
5
+ {
6
+ "name": "ng serve",
7
+ "type": "pwa-chrome",
8
+ "request": "launch",
9
+ "preLaunchTask": "npm: start",
10
+ "url": "http://localhost:4200/"
11
+ },
12
+ {
13
+ "name": "ng test",
14
+ "type": "chrome",
15
+ "request": "launch",
16
+ "preLaunchTask": "npm: test",
17
+ "url": "http://localhost:9876/debug.html"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
3
+ "version": "2.0.0",
4
+ "tasks": [
5
+ {
6
+ "type": "npm",
7
+ "script": "start",
8
+ "isBackground": true,
9
+ "problemMatcher": {
10
+ "owner": "typescript",
11
+ "pattern": "$tsc",
12
+ "background": {
13
+ "activeOnStart": true,
14
+ "beginsPattern": {
15
+ "regexp": "(.*?)"
16
+ },
17
+ "endsPattern": {
18
+ "regexp": "bundle generation complete"
19
+ }
20
+ }
21
+ }
22
+ },
23
+ {
24
+ "type": "npm",
25
+ "script": "test",
26
+ "isBackground": true,
27
+ "problemMatcher": {
28
+ "owner": "typescript",
29
+ "pattern": "$tsc",
30
+ "background": {
31
+ "activeOnStart": true,
32
+ "beginsPattern": {
33
+ "regexp": "(.*?)"
34
+ },
35
+ "endsPattern": {
36
+ "regexp": "bundle generation complete"
37
+ }
38
+ }
39
+ }
40
+ }
41
+ ]
42
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,97 @@
1
+ # v0.1.1 (Wed Jun 28 2023)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Fixing the package version desync [#60](https://github.com/UKHO/admiralty-design-system/pull/60) ([@ecstaticrainbow](https://github.com/ecstaticrainbow))
6
+
7
+ #### Authors: 1
8
+
9
+ - Tom Barham ([@ecstaticrainbow](https://github.com/ecstaticrainbow))
10
+
11
+ ---
12
+
13
+ # v0.0.12 (Fri Jun 23 2023)
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - Fix angular form control value accessors not being available [#41](https://github.com/UKHO/admiralty-design-system/pull/41) ([@ecstaticrainbow](https://github.com/ecstaticrainbow))
18
+
19
+ #### Authors: 1
20
+
21
+ - Tom Barham ([@ecstaticrainbow](https://github.com/ecstaticrainbow))
22
+
23
+ ---
24
+
25
+ # v0.0.11 (Thu Jun 22 2023)
26
+
27
+ #### 🐛 Bug Fix
28
+
29
+ - Typeahead web component fixes [#40](https://github.com/UKHO/admiralty-design-system/pull/40) ([@martind-bjss](https://github.com/martind-bjss))
30
+
31
+ #### Authors: 1
32
+
33
+ - Martin Davies ([@martind-bjss](https://github.com/martind-bjss))
34
+
35
+ ---
36
+
37
+ # v0.0.9 (Wed Jun 21 2023)
38
+
39
+ #### 🐛 Bug Fix
40
+
41
+ - Readmore web component [#47](https://github.com/UKHO/admiralty-design-system/pull/47) ([@martind-bjss](https://github.com/martind-bjss))
42
+
43
+ #### Authors: 1
44
+
45
+ - Martin Davies ([@martind-bjss](https://github.com/martind-bjss))
46
+
47
+ ---
48
+
49
+ # v0.0.8 (Tue Jun 06 2023)
50
+
51
+ #### 🐛 Bug Fix
52
+
53
+ - New Tabgroup web component [#33](https://github.com/UKHO/admiralty-design-system/pull/33) ([@martind-bjss](https://github.com/martind-bjss))
54
+
55
+ #### Authors: 1
56
+
57
+ - Martin Davies ([@martind-bjss](https://github.com/martind-bjss))
58
+
59
+ ---
60
+
61
+ # v0.0.7 (Wed May 24 2023)
62
+
63
+ #### 📝 Documentation
64
+
65
+ - Improve READMEs [#6](https://github.com/UKHO/admiralty-design-system/pull/6) ([@UKHOGreg](https://github.com/UKHOGreg))
66
+
67
+ #### Authors: 1
68
+
69
+ - Greg Williams ([@UKHOGreg](https://github.com/UKHOGreg))
70
+
71
+ ---
72
+
73
+ # v0.0.5 (Tue May 16 2023)
74
+
75
+ #### 🐛 Bug Fix
76
+
77
+ - Made header component responsive [#3](https://github.com/UKHO/admiralty-design-system/pull/3) ([@martind-bjss](https://github.com/martind-bjss))
78
+
79
+ #### Authors: 1
80
+
81
+ - Martin Davies ([@martind-bjss](https://github.com/martind-bjss))
82
+
83
+ ---
84
+
85
+ # v0.0.1 (Fri May 12 2023)
86
+
87
+ #### 🐛 Bug Fix
88
+
89
+ - Fix release workflow [#1](https://github.com/UKHO/admiralty-design-system/pull/1) ([@ecstaticrainbow](https://github.com/ecstaticrainbow))
90
+
91
+ #### ⚠️ Pushed to `main`
92
+
93
+ - Initial Commit ([@ecstaticrainbow](https://github.com/ecstaticrainbow))
94
+
95
+ #### Authors: 1
96
+
97
+ - Tom Barham ([@ecstaticrainbow](https://github.com/ecstaticrainbow))
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "lib": {
4
+ "entryFile": "src/index.ts"
5
+ },
6
+ "allowedNonPeerDependencies": [
7
+ "@ukho/admiralty-core"
8
+ ]
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ukho/admiralty-angular",
3
- "version": "0.1.2",
3
+ "version": "0.1.3--canary.63.2801049.0",
4
4
  "typings": "dist/index.d.ts",
5
5
  "module": "dist/fesm2015/ukho-admiralty-angular.mjs",
6
6
  "es2020": "dist/fesm2020/ukho-admiralty-angular.mjs",
@@ -12,15 +12,12 @@
12
12
  "test": "jest --passWithNoTests",
13
13
  "test:watch": "jest --watch"
14
14
  },
15
- "files": [
16
- "dist/"
17
- ],
18
15
  "peerDependencies": {
19
16
  "@angular/common": "^15.2.5",
20
17
  "@angular/core": "^15.2.5"
21
18
  },
22
19
  "dependencies": {
23
- "@ukho/admiralty-core": "^0.1.2",
20
+ "@ukho/admiralty-core": "0.1.3--canary.63.2801049.0",
24
21
  "tslib": "^2.5.0"
25
22
  },
26
23
  "devDependencies": {
@@ -48,5 +45,5 @@
48
45
  "license": "MIT",
49
46
  "url": "https://github.com/UKHO/admiralty-design-system",
50
47
  "repository": "git://github.com/UKHO/admiralty-design-system.git",
51
- "gitHead": "495add528f8cbe58a66d8b9bfce1a3648ca662e8"
48
+ "gitHead": "28010495719cedc5b8341e0e914d02b8e9fbe20c"
52
49
  }
@@ -1,9 +1,15 @@
1
+ /*
2
+ * Public API Surface of component-library
3
+ */
4
+
1
5
  export * from './lib/design-system.module';
2
6
  export { DIRECTIVES } from './lib/stencil-generated';
3
7
  export * from './lib/stencil-generated/components';
8
+
4
9
  export { TextValueAccessor } from './lib/stencil-generated/text-value-accessor';
5
10
  export { RadioValueAccessor } from './lib/stencil-generated/radio-value-accessor';
6
11
  export { BooleanValueAccessor } from './lib/stencil-generated/boolean-value-accessor';
7
12
  export { NumericValueAccessor } from './lib/stencil-generated/number-value-accessor';
8
13
  export { SelectValueAccessor } from './lib/stencil-generated/select-value-accessor';
14
+
9
15
  export { CheckboxChangeEventDetail, SelectChangeEventDetail, RadioGroupChangeEventDetail } from '@ukho/admiralty-core';
@@ -0,0 +1,8 @@
1
+ import { applyPolyfills, defineCustomElements } from '@ukho/admiralty-core/loader';
2
+ export const appInitialise = () => {
3
+ return (): any => {
4
+ return applyPolyfills().then(() => {
5
+ return defineCustomElements();
6
+ });
7
+ };
8
+ };
@@ -0,0 +1,45 @@
1
+ import { APP_INITIALIZER, ModuleWithProviders, NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { appInitialise } from './app_initialise';
4
+ import { DIRECTIVES } from './stencil-generated';
5
+ import { TextValueAccessor } from './stencil-generated/text-value-accessor';
6
+ import { BooleanValueAccessor } from './stencil-generated/boolean-value-accessor';
7
+ import { NumericValueAccessor } from './stencil-generated/number-value-accessor';
8
+ import { RadioValueAccessor } from './stencil-generated/radio-value-accessor';
9
+ import { SelectValueAccessor } from './stencil-generated/select-value-accessor';
10
+
11
+ export interface UkhoDesignSystemConfig {}
12
+
13
+ @NgModule({
14
+ declarations: [
15
+ ...DIRECTIVES,
16
+ TextValueAccessor,
17
+ BooleanValueAccessor,
18
+ NumericValueAccessor,
19
+ RadioValueAccessor,
20
+ SelectValueAccessor,
21
+ ],
22
+ imports: [CommonModule],
23
+ exports: [
24
+ ...DIRECTIVES,
25
+ TextValueAccessor,
26
+ BooleanValueAccessor,
27
+ NumericValueAccessor,
28
+ RadioValueAccessor,
29
+ SelectValueAccessor,
30
+ ],
31
+ })
32
+ export class DesignSystemModule {
33
+ static forRoot(): ModuleWithProviders<DesignSystemModule> {
34
+ return {
35
+ ngModule: DesignSystemModule,
36
+ providers: [
37
+ {
38
+ provide: APP_INITIALIZER,
39
+ useFactory: appInitialise,
40
+ multi: true,
41
+ },
42
+ ],
43
+ };
44
+ }
45
+ }
@@ -0,0 +1,57 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ import { fromEvent } from 'rxjs';
4
+
5
+ export const proxyInputs = (Cmp: any, inputs: string[]) => {
6
+ const Prototype = Cmp.prototype;
7
+ inputs.forEach((item) => {
8
+ Object.defineProperty(Prototype, item, {
9
+ get() {
10
+ return this.el[item];
11
+ },
12
+ set(val: any) {
13
+ this.z.runOutsideAngular(() => (this.el[item] = val));
14
+ },
15
+ });
16
+ });
17
+ };
18
+
19
+ export const proxyMethods = (Cmp: any, methods: string[]) => {
20
+ const Prototype = Cmp.prototype;
21
+ methods.forEach((methodName) => {
22
+ Prototype[methodName] = function () {
23
+ const args = arguments;
24
+ return this.z.runOutsideAngular(() => this.el[methodName].apply(this.el, args));
25
+ };
26
+ });
27
+ };
28
+
29
+ export const proxyOutputs = (instance: any, el: any, events: string[]) => {
30
+ events.forEach((eventName) => (instance[eventName] = fromEvent(el, eventName)));
31
+ };
32
+
33
+ export const defineCustomElement = (tagName: string, customElement: any) => {
34
+ if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {
35
+ customElements.define(tagName, customElement);
36
+ }
37
+ };
38
+
39
+ // tslint:disable-next-line: only-arrow-functions
40
+ export function ProxyCmp(opts: { defineCustomElementFn?: () => void; inputs?: any; methods?: any }) {
41
+ const decorator = function (cls: any) {
42
+ const { defineCustomElementFn, inputs, methods } = opts;
43
+
44
+ if (defineCustomElementFn !== undefined) {
45
+ defineCustomElementFn();
46
+ }
47
+
48
+ if (inputs) {
49
+ proxyInputs(cls, inputs);
50
+ }
51
+ if (methods) {
52
+ proxyMethods(cls, methods);
53
+ }
54
+ return cls;
55
+ };
56
+ return decorator;
57
+ }
@@ -0,0 +1,27 @@
1
+ import { Directive, ElementRef } from '@angular/core';
2
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
3
+
4
+ import { ValueAccessor } from './value-accessor';
5
+
6
+ @Directive({
7
+ /* tslint:disable-next-line:directive-selector */
8
+ selector: 'admiralty-checkbox',
9
+ host: {
10
+ '(admiraltyChange)': 'handleChangeEvent($event.target.checked)'
11
+ },
12
+ providers: [
13
+ {
14
+ provide: NG_VALUE_ACCESSOR,
15
+ useExisting: BooleanValueAccessor,
16
+ multi: true
17
+ }
18
+ ]
19
+ })
20
+ export class BooleanValueAccessor extends ValueAccessor {
21
+ constructor(el: ElementRef) {
22
+ super(el);
23
+ }
24
+ override writeValue(value: any) {
25
+ this.el.nativeElement.checked = this.lastValue = value == null ? false : value;
26
+ }
27
+ }