@getflip/swirl-components-angular 0.1.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.
- package/.turbo/turbo-build.log +28 -0
- package/CHANGELOG.md +41 -0
- package/README.md +4 -0
- package/angular.json +38 -0
- package/dist/component-library/esm2020/getflip-swirl-components-angular.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 +53 -0
- package/dist/component-library/esm2020/lib/stencil-generated/boolean-value-accessor.mjs +38 -0
- package/dist/component-library/esm2020/lib/stencil-generated/components.mjs +2463 -0
- package/dist/component-library/esm2020/lib/stencil-generated/index.mjs +102 -0
- package/dist/component-library/esm2020/lib/stencil-generated/text-value-accessor.mjs +35 -0
- package/dist/component-library/esm2020/lib/stencil-generated/value-accessor.mjs +40 -0
- package/dist/component-library/esm2020/public-api.mjs +8 -0
- package/dist/component-library/fesm2015/getflip-swirl-components-angular.mjs +2644 -0
- package/dist/component-library/fesm2015/getflip-swirl-components-angular.mjs.map +1 -0
- package/dist/component-library/fesm2020/getflip-swirl-components-angular.mjs +2644 -0
- package/dist/component-library/fesm2020/getflip-swirl-components-angular.mjs.map +1 -0
- package/dist/component-library/index.d.ts +5 -0
- package/dist/component-library/lib/component-library.module.d.ts +9 -0
- package/dist/component-library/lib/stencil-generated/angular-component-lib/utils.d.ts +9 -0
- package/dist/component-library/lib/stencil-generated/boolean-value-accessor.d.ts +9 -0
- package/dist/component-library/lib/stencil-generated/components.d.ts +937 -0
- package/dist/component-library/lib/stencil-generated/index.d.ts +2 -0
- package/dist/component-library/lib/stencil-generated/text-value-accessor.d.ts +8 -0
- package/dist/component-library/lib/stencil-generated/value-accessor.d.ts +18 -0
- package/dist/component-library/package.json +31 -0
- package/dist/component-library/public-api.d.ts +4 -0
- package/package.json +29 -0
- package/projects/component-library/ng-package.json +7 -0
- package/projects/component-library/package.json +11 -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 +63 -0
- package/projects/component-library/src/lib/stencil-generated/boolean-value-accessor.ts +27 -0
- package/projects/component-library/src/lib/stencil-generated/components.ts +2142 -0
- package/projects/component-library/src/lib/stencil-generated/index.ts +103 -0
- package/projects/component-library/src/lib/stencil-generated/text-value-accessor.ts +24 -0
- package/projects/component-library/src/lib/stencil-generated/value-accessor.ts +39 -0
- package/projects/component-library/src/public-api.ts +8 -0
- package/projects/component-library/tsconfig.lib.json +12 -0
- package/projects/component-library/tsconfig.lib.prod.json +10 -0
- package/projects/component-library/tsconfig.spec.json +10 -0
- package/tsconfig.json +32 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as d from './components';
|
|
2
|
+
export declare const DIRECTIVES: (typeof d.FlipActionList | typeof d.FlipActionListItem | typeof d.FlipActionListSection | typeof d.FlipAvatar | typeof d.FlipAvatarGroup | typeof d.FlipBadge | typeof d.FlipBanner | typeof d.FlipButton | typeof d.FlipButtonGroup | typeof d.FlipCheckbox | typeof d.FlipChip | typeof d.FlipDescriptionList | typeof d.FlipDescriptionListItem | typeof d.FlipDialog | typeof d.FlipIconAdd | typeof d.FlipIconAddPhoto | typeof d.FlipIconAdminPanelSettings | typeof d.FlipIconArrowBack | typeof d.FlipIconArrowForward | typeof d.FlipIconArrowRightSmall | typeof d.FlipIconAttachment | typeof d.FlipIconCancel | typeof d.FlipIconChatBubble | typeof d.FlipIconCheck | typeof d.FlipIconCheckCircle | typeof d.FlipIconCheckSmall | typeof d.FlipIconCheckStrong | typeof d.FlipIconChevronLeft | typeof d.FlipIconChevronRight | typeof d.FlipIconClose | typeof d.FlipIconCloseSmall | typeof d.FlipIconComment | typeof d.FlipIconCopy | typeof d.FlipIconDateRange | typeof d.FlipIconDelete | typeof d.FlipIconDescription | typeof d.FlipIconDownload | typeof d.FlipIconEdit | typeof d.FlipIconEmojiMood | typeof d.FlipIconEmojiSatisfied | typeof d.FlipIconError | typeof d.FlipIconExpandLess | typeof d.FlipIconExpandMore | typeof d.FlipIconFile | typeof d.FlipIconFolderShared | typeof d.FlipIconGroupAssign | typeof d.FlipIconGroups | typeof d.FlipIconGroupsCustom | typeof d.FlipIconImage | typeof d.FlipIconInfo | typeof d.FlipIconInventory | typeof d.FlipIconLike | typeof d.FlipIconLink | typeof d.FlipIconLock | typeof d.FlipIconLogout | typeof d.FlipIconMail | typeof d.FlipIconManageAccounts | typeof d.FlipIconMention | typeof d.FlipIconMessage | typeof d.FlipIconMoreHorizontal | typeof d.FlipIconMoreVertikal | typeof d.FlipIconNotifications | typeof d.FlipIconNotificationsActive | typeof d.FlipIconNotificationsOff | typeof d.FlipIconPeopleAlt | typeof d.FlipIconPerson | typeof d.FlipIconPersonOff | typeof d.FlipIconPhone | typeof d.FlipIconPoll | typeof d.FlipIconRecieved | typeof d.FlipIconSearch | typeof d.FlipIconSearchStrong | typeof d.FlipIconSend | typeof d.FlipIconSettings | typeof d.FlipIconTimeFilled | typeof d.FlipIconTimeOutlined | typeof d.FlipIconToday | typeof d.FlipIconUserAssign | typeof d.FlipIconVideoCamera | typeof d.FlipIconVisibility | typeof d.FlipIconVisibilityOff | typeof d.FlipIconWarning | typeof d.FlipInlineError | typeof d.FlipLink | typeof d.FlipPopover | typeof d.FlipRadio | typeof d.FlipRadioGroup | typeof d.FlipSearch | typeof d.FlipSpinner | typeof d.FlipStack | typeof d.FlipSwitch | typeof d.FlipTag | typeof d.FlipThemeProvider | typeof d.FlipThumbnail | typeof d.FlipToast | typeof d.FlipToastProvider | typeof d.FlipTooltip | typeof d.FlipVisuallyHidden)[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { ValueAccessor } from './value-accessor';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class TextValueAccessor extends ValueAccessor {
|
|
5
|
+
constructor(el: ElementRef);
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextValueAccessor, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TextValueAccessor, "flip-radio-group, flip-search", never, {}, {}, never, never, false>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ValueAccessor implements ControlValueAccessor {
|
|
5
|
+
protected el: ElementRef;
|
|
6
|
+
private onChange;
|
|
7
|
+
private onTouched;
|
|
8
|
+
protected lastValue: any;
|
|
9
|
+
constructor(el: ElementRef);
|
|
10
|
+
writeValue(value: any): void;
|
|
11
|
+
handleChangeEvent(value: any): void;
|
|
12
|
+
_handleBlurEvent(): void;
|
|
13
|
+
registerOnChange(fn: (value: any) => void): void;
|
|
14
|
+
registerOnTouched(fn: () => void): void;
|
|
15
|
+
setDisabledState(isDisabled: boolean): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ValueAccessor, never>;
|
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ValueAccessor, never, never, {}, {}, never, never, false>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@getflip/swirl-components-angular",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^14.1.0",
|
|
6
|
+
"@angular/core": "^14.1.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"module": "fesm2015/getflip-swirl-components-angular.mjs",
|
|
12
|
+
"es2020": "fesm2020/getflip-swirl-components-angular.mjs",
|
|
13
|
+
"esm2020": "esm2020/getflip-swirl-components-angular.mjs",
|
|
14
|
+
"fesm2020": "fesm2020/getflip-swirl-components-angular.mjs",
|
|
15
|
+
"fesm2015": "fesm2015/getflip-swirl-components-angular.mjs",
|
|
16
|
+
"typings": "index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
"./package.json": {
|
|
19
|
+
"default": "./package.json"
|
|
20
|
+
},
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./index.d.ts",
|
|
23
|
+
"esm2020": "./esm2020/getflip-swirl-components-angular.mjs",
|
|
24
|
+
"es2020": "./fesm2020/getflip-swirl-components-angular.mjs",
|
|
25
|
+
"es2015": "./fesm2015/getflip-swirl-components-angular.mjs",
|
|
26
|
+
"node": "./fesm2015/getflip-swirl-components-angular.mjs",
|
|
27
|
+
"default": "./fesm2020/getflip-swirl-components-angular.mjs"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"sideEffects": false
|
|
31
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@getflip/swirl-components-angular",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"ng": "ng",
|
|
6
|
+
"build": "ng build"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@angular/animations": "^14.1.0",
|
|
10
|
+
"@angular/common": "^14.1.0",
|
|
11
|
+
"@angular/compiler": "^14.1.0",
|
|
12
|
+
"@angular/core": "^14.1.0",
|
|
13
|
+
"@angular/forms": "^14.1.0",
|
|
14
|
+
"@angular/platform-browser": "^14.1.0",
|
|
15
|
+
"@angular/platform-browser-dynamic": "^14.1.0",
|
|
16
|
+
"@angular/router": "^14.1.0",
|
|
17
|
+
"@getflip/swirl-components": "^0.1.0",
|
|
18
|
+
"rxjs": "~7.5.0",
|
|
19
|
+
"tslib": "^2.3.0",
|
|
20
|
+
"zone.js": "~0.11.4"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@angular-devkit/build-angular": "^14.1.2",
|
|
24
|
+
"@angular/cli": "~14.1.2",
|
|
25
|
+
"@angular/compiler-cli": "^14.1.0",
|
|
26
|
+
"ng-packagr": "^14.1.0",
|
|
27
|
+
"typescript": "~4.7.2"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NgModule } from "@angular/core";
|
|
2
|
+
|
|
3
|
+
import { DIRECTIVES } from "./stencil-generated";
|
|
4
|
+
import { BooleanValueAccessor } from "./stencil-generated/boolean-value-accessor";
|
|
5
|
+
import { TextValueAccessor } from "./stencil-generated/text-value-accessor";
|
|
6
|
+
|
|
7
|
+
@NgModule({
|
|
8
|
+
declarations: [...DIRECTIVES, BooleanValueAccessor, TextValueAccessor],
|
|
9
|
+
imports: [],
|
|
10
|
+
exports: [...DIRECTIVES, BooleanValueAccessor, TextValueAccessor],
|
|
11
|
+
})
|
|
12
|
+
export class SwirlComponentsModule {}
|
|
@@ -0,0 +1,63 @@
|
|
|
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(() =>
|
|
25
|
+
this.el[methodName].apply(this.el, args)
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const proxyOutputs = (instance: any, el: any, events: string[]) => {
|
|
32
|
+
events.forEach(eventName => instance[eventName] = fromEvent(el, eventName));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const defineCustomElement = (tagName: string, customElement: any) => {
|
|
36
|
+
if (
|
|
37
|
+
customElement !== undefined &&
|
|
38
|
+
typeof customElements !== 'undefined' &&
|
|
39
|
+
!customElements.get(tagName)
|
|
40
|
+
) {
|
|
41
|
+
customElements.define(tagName, customElement);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// tslint:disable-next-line: only-arrow-functions
|
|
46
|
+
export function ProxyCmp(opts: { defineCustomElementFn?: () => void, inputs?: any; methods?: any }) {
|
|
47
|
+
const decorator = function (cls: any) {
|
|
48
|
+
const { defineCustomElementFn, inputs, methods } = opts;
|
|
49
|
+
|
|
50
|
+
if (defineCustomElementFn !== undefined) {
|
|
51
|
+
defineCustomElementFn();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (inputs) {
|
|
55
|
+
proxyInputs(cls, inputs);
|
|
56
|
+
}
|
|
57
|
+
if (methods) {
|
|
58
|
+
proxyMethods(cls, methods);
|
|
59
|
+
}
|
|
60
|
+
return cls;
|
|
61
|
+
};
|
|
62
|
+
return decorator;
|
|
63
|
+
}
|
|
@@ -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: 'flip-checkbox, flip-switch',
|
|
9
|
+
host: {
|
|
10
|
+
'(valueChange)': '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
|
+
writeValue(value: any) {
|
|
25
|
+
this.el.nativeElement.checked = this.lastValue = value == null ? false : value;
|
|
26
|
+
}
|
|
27
|
+
}
|