@ongov/ontario-design-system-component-library-angular 4.2.0-alpha.1
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/LICENSE +201 -0
- package/README.md +118 -0
- package/dist/component-library/README.md +91 -0
- package/dist/component-library/assets/favicons/apple-touch-icon.png +0 -0
- package/dist/component-library/assets/favicons/favicon-192x192.png +0 -0
- package/dist/component-library/assets/favicons/favicon-48x48.png +0 -0
- package/dist/component-library/assets/favicons/favicon-512x512.png +0 -0
- package/dist/component-library/assets/favicons/favicon.ico +0 -0
- package/dist/component-library/assets/favicons/favicon.svg +60 -0
- package/dist/component-library/assets/favicons/manifest.json +17 -0
- package/dist/component-library/assets/fonts/courier-prime-400/CourierPrime-Regular.ttf +0 -0
- package/dist/component-library/assets/fonts/courier-prime-400/OFL.txt +93 -0
- package/dist/component-library/assets/fonts/courier-prime-400--italic/CourierPrime-Italic.ttf +0 -0
- package/dist/component-library/assets/fonts/courier-prime-400--italic/OFL.txt +93 -0
- package/dist/component-library/assets/fonts/courier-prime-700/CourierPrime-Bold.ttf +0 -0
- package/dist/component-library/assets/fonts/courier-prime-700/OFL.txt +93 -0
- package/dist/component-library/assets/fonts/courier-prime-700--italic/CourierPrime-BoldItalic.ttf +0 -0
- package/dist/component-library/assets/fonts/courier-prime-700--italic/OFL.txt +93 -0
- package/dist/component-library/assets/fonts/open-sans-400/LICENSE.txt +202 -0
- package/dist/component-library/assets/fonts/open-sans-400/open-sans-400.eot +0 -0
- package/dist/component-library/assets/fonts/open-sans-400/open-sans-400.svg +1637 -0
- package/dist/component-library/assets/fonts/open-sans-400/open-sans-400.ttf +0 -0
- package/dist/component-library/assets/fonts/open-sans-400/open-sans-400.woff +0 -0
- package/dist/component-library/assets/fonts/open-sans-400/open-sans-400.woff2 +0 -0
- package/dist/component-library/assets/fonts/open-sans-400--italic/LICENSE.txt +202 -0
- package/dist/component-library/assets/fonts/open-sans-400--italic/open-sans-400--italic.eot +0 -0
- package/dist/component-library/assets/fonts/open-sans-400--italic/open-sans-400--italic.svg +1650 -0
- package/dist/component-library/assets/fonts/open-sans-400--italic/open-sans-400--italic.ttf +0 -0
- package/dist/component-library/assets/fonts/open-sans-400--italic/open-sans-400--italic.woff +0 -0
- package/dist/component-library/assets/fonts/open-sans-400--italic/open-sans-400--italic.woff2 +0 -0
- package/dist/component-library/assets/fonts/open-sans-600/LICENSE.txt +202 -0
- package/dist/component-library/assets/fonts/open-sans-600/open-sans-600.eot +0 -0
- package/dist/component-library/assets/fonts/open-sans-600/open-sans-600.svg +1637 -0
- package/dist/component-library/assets/fonts/open-sans-600/open-sans-600.ttf +0 -0
- package/dist/component-library/assets/fonts/open-sans-600/open-sans-600.woff +0 -0
- package/dist/component-library/assets/fonts/open-sans-600/open-sans-600.woff2 +0 -0
- package/dist/component-library/assets/fonts/open-sans-700/LICENSE.txt +202 -0
- package/dist/component-library/assets/fonts/open-sans-700/open-sans-700.eot +0 -0
- package/dist/component-library/assets/fonts/open-sans-700/open-sans-700.svg +548 -0
- package/dist/component-library/assets/fonts/open-sans-700/open-sans-700.ttf +0 -0
- package/dist/component-library/assets/fonts/open-sans-700/open-sans-700.woff +0 -0
- package/dist/component-library/assets/fonts/open-sans-700/open-sans-700.woff2 +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-400/LICENSE.txt +95 -0
- package/dist/component-library/assets/fonts/raleway-modified-400/raleway-modified-400.svg +630 -0
- package/dist/component-library/assets/fonts/raleway-modified-400/raleway-modified-400.ttf +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-400/raleway-modified-400.woff +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-400/raleway-modified-400.woff2 +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-600/LICENSE.txt +95 -0
- package/dist/component-library/assets/fonts/raleway-modified-600/raleway-modified-600.svg +625 -0
- package/dist/component-library/assets/fonts/raleway-modified-600/raleway-modified-600.ttf +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-600/raleway-modified-600.woff +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-600/raleway-modified-600.woff2 +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-700/LICENSE.txt +95 -0
- package/dist/component-library/assets/fonts/raleway-modified-700/raleway-modified-700.svg +621 -0
- package/dist/component-library/assets/fonts/raleway-modified-700/raleway-modified-700.ttf +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-700/raleway-modified-700.woff +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-700/raleway-modified-700.woff2 +0 -0
- package/dist/component-library/assets/images/footer-default-supergraphic-logo.svg +11 -0
- package/dist/component-library/assets/images/footer-expanded-supergraphic-logo.svg +11 -0
- package/dist/component-library/assets/images/highlight-indicator.svg +9 -0
- package/dist/component-library/assets/images/ontario-logo--desktop.svg +40 -0
- package/dist/component-library/assets/images/ontario-logo--mobile.svg +6 -0
- package/dist/component-library/assets/images/ontario-material-dropdown-arrow-48px.svg +1 -0
- package/dist/component-library/esm2020/angular-component-library.mjs +5 -0
- package/dist/component-library/esm2020/lib/component-library.module.mjs +20 -0
- package/dist/component-library/esm2020/lib/stencil-generated/angular-component-lib/utils.mjs +59 -0
- package/dist/component-library/esm2020/lib/stencil-generated/components.mjs +3441 -0
- package/dist/component-library/esm2020/lib/stencil-generated/index.mjs +141 -0
- package/dist/component-library/esm2020/public-api.mjs +7 -0
- package/dist/component-library/fesm2015/angular-component-library.mjs +3527 -0
- package/dist/component-library/fesm2015/angular-component-library.mjs.map +1 -0
- package/dist/component-library/fesm2020/angular-component-library.mjs +3527 -0
- package/dist/component-library/fesm2020/angular-component-library.mjs.map +1 -0
- package/dist/component-library/index.d.ts +5 -0
- package/dist/component-library/lib/component-library.module.d.ts +7 -0
- package/dist/component-library/lib/stencil-generated/angular-component-lib/utils.d.ts +9 -0
- package/dist/component-library/lib/stencil-generated/components.d.ts +1365 -0
- package/dist/component-library/lib/stencil-generated/index.d.ts +2 -0
- package/dist/component-library/package.json +32 -0
- package/dist/component-library/public-api.d.ts +3 -0
- package/package.json +65 -0
- package/projects/component-library/src/lib/component-library.module.ts +12 -0
- package/projects/component-library/src/lib/stencil-generated/angular-component-lib/utils.ts +65 -0
- package/projects/component-library/src/lib/stencil-generated/components.ts +3115 -0
- package/projects/component-library/src/lib/stencil-generated/index.ts +141 -0
- package/projects/component-library/src/public-api.ts +7 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as d from './components';
|
|
2
|
+
export declare const DIRECTIVES: (typeof d.OntarioAccordion | typeof d.OntarioAside | typeof d.OntarioBackToTop | typeof d.OntarioBlockquote | typeof d.OntarioButton | typeof d.OntarioCallout | typeof d.OntarioCard | typeof d.OntarioCardCollection | typeof d.OntarioCheckboxes | typeof d.OntarioCriticalAlert | typeof d.OntarioDateInput | typeof d.OntarioDropdownList | typeof d.OntarioFieldset | typeof d.OntarioFooter | typeof d.OntarioHeader | typeof d.OntarioHintExpander | typeof d.OntarioHintText | typeof d.OntarioIconAccessibility | typeof d.OntarioIconAccount | typeof d.OntarioIconAdd | typeof d.OntarioIconAddAlt | typeof d.OntarioIconAlertError | typeof d.OntarioIconAlertInformation | typeof d.OntarioIconAlertSuccess | typeof d.OntarioIconAlertWarning | typeof d.OntarioIconArrowUp | typeof d.OntarioIconAttach | typeof d.OntarioIconBookmarkOff | typeof d.OntarioIconBookmarkOn | typeof d.OntarioIconCalendar | typeof d.OntarioIconCamera | typeof d.OntarioIconChevronDown | typeof d.OntarioIconChevronLeft | typeof d.OntarioIconChevronRight | typeof d.OntarioIconChevronUp | typeof d.OntarioIconClock | typeof d.OntarioIconClose | typeof d.OntarioIconCloseHeader | typeof d.OntarioIconCloud | typeof d.OntarioIconCollapse | typeof d.OntarioIconCreditCard | typeof d.OntarioIconCriticalAlertWarning | typeof d.OntarioIconDelete | typeof d.OntarioIconDocument | typeof d.OntarioIconDownload | typeof d.OntarioIconDropdownArrow | typeof d.OntarioIconEdit | typeof d.OntarioIconEmail | typeof d.OntarioIconExpand | typeof d.OntarioIconExport | typeof d.OntarioIconFacebook | typeof d.OntarioIconFacebookAlt | typeof d.OntarioIconFavouriteOff | typeof d.OntarioIconFavouriteOn | typeof d.OntarioIconFilter | typeof d.OntarioIconFlickr | typeof d.OntarioIconGrid | typeof d.OntarioIconHelp | typeof d.OntarioIconInstagram | typeof d.OntarioIconInteracEn | typeof d.OntarioIconInteracEnAlt | typeof d.OntarioIconInteracFr | typeof d.OntarioIconInteracFrAlt | typeof d.OntarioIconLinkedin | typeof d.OntarioIconLinkedinAlt | typeof d.OntarioIconList | typeof d.OntarioIconLiveChat | typeof d.OntarioIconLocationOff | typeof d.OntarioIconLocationOn | typeof d.OntarioIconLockOff | typeof d.OntarioIconLockOn | typeof d.OntarioIconMap | typeof d.OntarioIconMastercard | typeof d.OntarioIconMastercardAlt | typeof d.OntarioIconMediaFastForward | typeof d.OntarioIconMediaFastRewind | typeof d.OntarioIconMediaPause | typeof d.OntarioIconMediaPlay | typeof d.OntarioIconMediaStop | typeof d.OntarioIconMenu | typeof d.OntarioIconMenuHeader | typeof d.OntarioIconMicrophoneOff | typeof d.OntarioIconMicrophoneOn | typeof d.OntarioIconMoreVertical | typeof d.OntarioIconNewWindow | typeof d.OntarioIconNext | typeof d.OntarioIconNotification | typeof d.OntarioIconPasswordHide | typeof d.OntarioIconPasswordShow | typeof d.OntarioIconPhone | typeof d.OntarioIconPhoto | typeof d.OntarioIconPinLocationOff | typeof d.OntarioIconPinLocationOn | typeof d.OntarioIconPrevious | typeof d.OntarioIconPrint | typeof d.OntarioIconRemove | typeof d.OntarioIconRemoveAlt | typeof d.OntarioIconReplay | typeof d.OntarioIconRssFeed | typeof d.OntarioIconSave | typeof d.OntarioIconSearch | typeof d.OntarioIconSearchWhite | typeof d.OntarioIconSentiment1 | typeof d.OntarioIconSentiment2 | typeof d.OntarioIconSentiment3 | typeof d.OntarioIconSentiment4 | typeof d.OntarioIconSentiment5 | typeof d.OntarioIconSettings | typeof d.OntarioIconShare | typeof d.OntarioIconSort | typeof d.OntarioIconTag | typeof d.OntarioIconTextMessage | typeof d.OntarioIconTimer | typeof d.OntarioIconTransportBicycle | typeof d.OntarioIconTransportBus | typeof d.OntarioIconTransportCar | typeof d.OntarioIconTransportWalk | typeof d.OntarioIconTty | typeof d.OntarioIconTwitter | typeof d.OntarioIconTwitterAlt | typeof d.OntarioIconUpload | typeof d.OntarioIconVideo | typeof d.OntarioIconVisa | typeof d.OntarioIconVoteDislike | typeof d.OntarioIconVoteLike | typeof d.OntarioIconVpnKey | typeof d.OntarioIconWheelchair | typeof d.OntarioIconWifi | typeof d.OntarioIconYoutube | typeof d.OntarioInput | typeof d.OntarioLanguageToggle | typeof d.OntarioLoadingIndicator | typeof d.OntarioPageAlert | typeof d.OntarioRadioButtons | typeof d.OntarioStepIndicator | typeof d.OntarioTable | typeof d.OntarioTextarea)[];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "angular-component-library",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^15.2.9",
|
|
6
|
+
"@angular/core": "^15.2.9",
|
|
7
|
+
"@ongov/ontario-design-system-component-library": "^2.3.0-alpha.3"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "^2.3.0"
|
|
11
|
+
},
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"module": "fesm2015/angular-component-library.mjs",
|
|
14
|
+
"es2020": "fesm2020/angular-component-library.mjs",
|
|
15
|
+
"esm2020": "esm2020/angular-component-library.mjs",
|
|
16
|
+
"fesm2020": "fesm2020/angular-component-library.mjs",
|
|
17
|
+
"fesm2015": "fesm2015/angular-component-library.mjs",
|
|
18
|
+
"typings": "index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
"./package.json": {
|
|
21
|
+
"default": "./package.json"
|
|
22
|
+
},
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./index.d.ts",
|
|
25
|
+
"esm2020": "./esm2020/angular-component-library.mjs",
|
|
26
|
+
"es2020": "./fesm2020/angular-component-library.mjs",
|
|
27
|
+
"es2015": "./fesm2015/angular-component-library.mjs",
|
|
28
|
+
"node": "./fesm2015/angular-component-library.mjs",
|
|
29
|
+
"default": "./fesm2020/angular-component-library.mjs"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ongov/ontario-design-system-component-library-angular",
|
|
3
|
+
"version": "4.2.0-alpha.1",
|
|
4
|
+
"description": "Angular specific wrapper for ontario-design-system-component-library",
|
|
5
|
+
"private": false,
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"ng": "ng",
|
|
11
|
+
"start": "ng serve app-angular",
|
|
12
|
+
"build": "npm run build:component-lib && npm run format:stencil && npm run docs:copy:readme",
|
|
13
|
+
"build:component-lib": "ng build component-library",
|
|
14
|
+
"build:app": "ng build app-angular",
|
|
15
|
+
"clean": "rm -rf build",
|
|
16
|
+
"clean:full": "rm -rf node_modules && npm run clean",
|
|
17
|
+
"watch": "ng build --watch --configuration development",
|
|
18
|
+
"test": "ng test",
|
|
19
|
+
"format:stencil": "prettier --write ./projects/component-library/src/lib/stencil-generated",
|
|
20
|
+
"postbuild": "npm run copy:assets",
|
|
21
|
+
"copy:images": "copyfiles -E -f \"node_modules/@ongov/ontario-design-system-component-library/dist/ontario-design-system-components/assets/**/*\" dist/component-library/assets/images",
|
|
22
|
+
"copy:fonts": "copyfiles -E -u 6 \"node_modules/@ongov/ontario-design-system-component-library/dist/ontario-design-system-components/fonts/**/*\" dist/component-library/assets/fonts",
|
|
23
|
+
"copy:favicons": "copyfiles -E -f \"node_modules/@ongov/ontario-design-system-component-library/dist/ontario-design-system-components/favicons/**/*\" dist/component-library/assets/favicons",
|
|
24
|
+
"copy:assets": "npm run copy:images && npm run copy:favicons && npm run copy:fonts",
|
|
25
|
+
"docs:copy:readme": "ts-node ../../scripts/documentation-helper.ts -f README.md -p \"---\ntitle: Angular Component Library\n---\n\" -df ../app-web-components-documentation/docs/02-readme-angular.md"
|
|
26
|
+
},
|
|
27
|
+
"main": "./dist/component-library/index.t.ts",
|
|
28
|
+
"module": "./dist/component-library/index.t.ts",
|
|
29
|
+
"types": "./dist/component-library/index.t.ts",
|
|
30
|
+
"files": [
|
|
31
|
+
"dist/",
|
|
32
|
+
"projects/component-library/src",
|
|
33
|
+
"package.json",
|
|
34
|
+
"README.md"
|
|
35
|
+
],
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@angular/animations": "^15.2.9",
|
|
38
|
+
"@angular/common": "^15.2.9",
|
|
39
|
+
"@angular/compiler": "^15.2.9",
|
|
40
|
+
"@angular/core": "^15.2.9",
|
|
41
|
+
"@angular/forms": "^15.2.9",
|
|
42
|
+
"@angular/platform-browser": "^15.2.9",
|
|
43
|
+
"@angular/platform-browser-dynamic": "^15.2.9",
|
|
44
|
+
"@angular/router": "^15.2.9",
|
|
45
|
+
"@ongov/ontario-design-system-component-library": "4.2.0-alpha.1",
|
|
46
|
+
"@ongov/ontario-design-system-global-styles": "4.2.0-alpha.1",
|
|
47
|
+
"copyfiles": "^2.4.1",
|
|
48
|
+
"rxjs": "~7.8.0",
|
|
49
|
+
"tslib": "^2.3.0",
|
|
50
|
+
"zone.js": "~0.12.0"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@angular-devkit/build-angular": "^15.2.9",
|
|
54
|
+
"@angular/cli": "~15.2.9",
|
|
55
|
+
"@angular/compiler-cli": "^15.2.9",
|
|
56
|
+
"karma": "~6.4.0",
|
|
57
|
+
"karma-chrome-launcher": "~3.1.0",
|
|
58
|
+
"karma-coverage": "~2.2.0",
|
|
59
|
+
"karma-jasmine": "~5.1.0",
|
|
60
|
+
"karma-jasmine-html-reporter": "~2.0.0",
|
|
61
|
+
"ng-packagr": "^15.2.2",
|
|
62
|
+
"typescript": "~4.9.4"
|
|
63
|
+
},
|
|
64
|
+
"gitHead": "d18083f3565f0c6b7f3e6da76e7364cb5c7356fb"
|
|
65
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { DIRECTIVES } from './stencil-generated';
|
|
3
|
+
import { defineCustomElements } from '@ongov/ontario-design-system-component-library/loader';
|
|
4
|
+
|
|
5
|
+
defineCustomElements(window);
|
|
6
|
+
|
|
7
|
+
@NgModule({
|
|
8
|
+
declarations: [...DIRECTIVES],
|
|
9
|
+
exports: [...DIRECTIVES],
|
|
10
|
+
providers: [],
|
|
11
|
+
})
|
|
12
|
+
export class ComponentLibraryModule {}
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
* In the event that proxyInputs is called
|
|
17
|
+
* multiple times re-defining these inputs
|
|
18
|
+
* will cause an error to be thrown. As a result
|
|
19
|
+
* we set configurable: true to indicate these
|
|
20
|
+
* properties can be changed.
|
|
21
|
+
*/
|
|
22
|
+
configurable: true,
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const proxyMethods = (Cmp: any, methods: string[]) => {
|
|
28
|
+
const Prototype = Cmp.prototype;
|
|
29
|
+
methods.forEach((methodName) => {
|
|
30
|
+
Prototype[methodName] = function () {
|
|
31
|
+
const args = arguments;
|
|
32
|
+
return this.z.runOutsideAngular(() => this.el[methodName].apply(this.el, args));
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const proxyOutputs = (instance: any, el: any, events: string[]) => {
|
|
38
|
+
events.forEach((eventName) => (instance[eventName] = fromEvent(el, eventName)));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const defineCustomElement = (tagName: string, customElement: any) => {
|
|
42
|
+
if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {
|
|
43
|
+
customElements.define(tagName, customElement);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// tslint:disable-next-line: only-arrow-functions
|
|
48
|
+
export function ProxyCmp(opts: { defineCustomElementFn?: () => void; inputs?: any; methods?: any }) {
|
|
49
|
+
const decorator = function (cls: any) {
|
|
50
|
+
const { defineCustomElementFn, inputs, methods } = opts;
|
|
51
|
+
|
|
52
|
+
if (defineCustomElementFn !== undefined) {
|
|
53
|
+
defineCustomElementFn();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (inputs) {
|
|
57
|
+
proxyInputs(cls, inputs);
|
|
58
|
+
}
|
|
59
|
+
if (methods) {
|
|
60
|
+
proxyMethods(cls, methods);
|
|
61
|
+
}
|
|
62
|
+
return cls;
|
|
63
|
+
};
|
|
64
|
+
return decorator;
|
|
65
|
+
}
|