@candy-kingdom/bonnie-cms 0.1.3
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/README.md +7 -0
- package/esm2022/candy-kingdom-bonnie-cms.mjs +5 -0
- package/esm2022/index.mjs +16 -0
- package/esm2022/lib/admin-controls/admin-controls.component.mjs +44 -0
- package/esm2022/lib/admin-controls/index.mjs +2 -0
- package/esm2022/lib/bone-editors/bone-editor-base.component.mjs +143 -0
- package/esm2022/lib/bone-editors/index.mjs +3 -0
- package/esm2022/lib/bone-editors/unknown-bone-editor/index.mjs +2 -0
- package/esm2022/lib/bone-editors/unknown-bone-editor/unknown-bone-editor.component.mjs +18 -0
- package/esm2022/lib/bonnie-cms.module.mjs +105 -0
- package/esm2022/lib/core/DeviceType.mjs +8 -0
- package/esm2022/lib/core/DeviceVisibility.mjs +9 -0
- package/esm2022/lib/core/MediaType.mjs +2 -0
- package/esm2022/lib/core/TextEditorField.mjs +7 -0
- package/esm2022/lib/core/Utils.mjs +18 -0
- package/esm2022/lib/core/index.mjs +6 -0
- package/esm2022/lib/core-components/editable-group.mjs +84 -0
- package/esm2022/lib/core-components/editable.directive.mjs +173 -0
- package/esm2022/lib/core-components/form-base.component.mjs +34 -0
- package/esm2022/lib/core-components/index.mjs +5 -0
- package/esm2022/lib/core-components/link-popup/index.mjs +2 -0
- package/esm2022/lib/core-components/link-popup/link-popup.component.mjs +73 -0
- package/esm2022/lib/form-controls/form-controls.component.mjs +16 -0
- package/esm2022/lib/form-controls/index.mjs +2 -0
- package/esm2022/lib/generated/i-equatable.mjs +6 -0
- package/esm2022/lib/generated/i-setting.mjs +6 -0
- package/esm2022/lib/generated/index.mjs +14 -0
- package/esm2022/lib/generated/localized-text-setting-data.mjs +6 -0
- package/esm2022/lib/generated/setting-base.mjs +6 -0
- package/esm2022/lib/generated/setting-data.mjs +6 -0
- package/esm2022/lib/generated/setting-group.mjs +6 -0
- package/esm2022/lib/generated/setting.mjs +6 -0
- package/esm2022/lib/generated/text-setting-data.mjs +6 -0
- package/esm2022/lib/generated/text-setting-type.mjs +10 -0
- package/esm2022/lib/media-uploader/index.mjs +2 -0
- package/esm2022/lib/media-uploader/media-uploader.component.mjs +159 -0
- package/esm2022/lib/seo-form/index.mjs +2 -0
- package/esm2022/lib/seo-form/seo-form.component.mjs +42 -0
- package/esm2022/lib/skeleton-editor/BoneEditorMap.mjs +2 -0
- package/esm2022/lib/skeleton-editor/ContentPreset.mjs +9 -0
- package/esm2022/lib/skeleton-editor/IBoneEditor.mjs +2 -0
- package/esm2022/lib/skeleton-editor/IBoneTemplate.mjs +2 -0
- package/esm2022/lib/skeleton-editor/bone-editor-container/bone-editor-container.component.mjs +119 -0
- package/esm2022/lib/skeleton-editor/index.mjs +9 -0
- package/esm2022/lib/skeleton-editor/skeleton-editor-anchor.directive.mjs +16 -0
- package/esm2022/lib/skeleton-editor/skeleton-editor.component.mjs +107 -0
- package/esm2022/lib/text-form/TextInputStyle.mjs +7 -0
- package/esm2022/lib/text-form/index.mjs +3 -0
- package/esm2022/lib/text-form/text-form.component.mjs +33 -0
- package/esm2022/lib/translation-form/index.mjs +2 -0
- package/esm2022/lib/translation-form/translation-form.component.mjs +32 -0
- package/esm2022/lib/translation-input/index.mjs +2 -0
- package/esm2022/lib/translation-input/translation-input.component.mjs +42 -0
- package/esm2022/lib/translation-textarea/index.mjs +2 -0
- package/esm2022/lib/translation-textarea/translation-textarea.component.mjs +66 -0
- package/esm2022/lib/unknown-form/index.mjs +2 -0
- package/esm2022/lib/unknown-form/unknown-form.component.mjs +23 -0
- package/fesm2022/candy-kingdom-bonnie-cms.mjs +1343 -0
- package/fesm2022/candy-kingdom-bonnie-cms.mjs.map +1 -0
- package/index.d.ts +15 -0
- package/lib/admin-controls/admin-controls.component.d.ts +14 -0
- package/lib/admin-controls/index.d.ts +1 -0
- package/lib/bone-editors/bone-editor-base.component.d.ts +44 -0
- package/lib/bone-editors/index.d.ts +2 -0
- package/lib/bone-editors/unknown-bone-editor/index.d.ts +1 -0
- package/lib/bone-editors/unknown-bone-editor/unknown-bone-editor.component.d.ts +11 -0
- package/lib/bonnie-cms.module.d.ts +26 -0
- package/lib/core/DeviceType.d.ts +6 -0
- package/lib/core/DeviceVisibility.d.ts +7 -0
- package/lib/core/MediaType.d.ts +2 -0
- package/lib/core/TextEditorField.d.ts +5 -0
- package/lib/core/Utils.d.ts +4 -0
- package/lib/core/index.d.ts +5 -0
- package/lib/core-components/editable-group.d.ts +24 -0
- package/lib/core-components/editable.directive.d.ts +43 -0
- package/lib/core-components/form-base.component.d.ts +15 -0
- package/lib/core-components/index.d.ts +4 -0
- package/lib/core-components/link-popup/index.d.ts +1 -0
- package/lib/core-components/link-popup/link-popup.component.d.ts +28 -0
- package/lib/form-controls/form-controls.component.d.ts +7 -0
- package/lib/form-controls/index.d.ts +1 -0
- package/lib/generated/i-equatable.d.ts +6 -0
- package/lib/generated/i-setting.d.ts +8 -0
- package/lib/generated/index.d.ts +13 -0
- package/lib/generated/localized-text-setting-data.d.ts +11 -0
- package/lib/generated/setting-base.d.ts +8 -0
- package/lib/generated/setting-data.d.ts +8 -0
- package/lib/generated/setting-group.d.ts +10 -0
- package/lib/generated/setting.d.ts +9 -0
- package/lib/generated/text-setting-data.d.ts +10 -0
- package/lib/generated/text-setting-type.d.ts +8 -0
- package/lib/media-uploader/index.d.ts +1 -0
- package/lib/media-uploader/media-uploader.component.d.ts +34 -0
- package/lib/seo-form/index.d.ts +1 -0
- package/lib/seo-form/seo-form.component.d.ts +18 -0
- package/lib/skeleton-editor/BoneEditorMap.d.ts +3 -0
- package/lib/skeleton-editor/ContentPreset.d.ts +11 -0
- package/lib/skeleton-editor/IBoneEditor.d.ts +26 -0
- package/lib/skeleton-editor/IBoneTemplate.d.ts +5 -0
- package/lib/skeleton-editor/bone-editor-container/bone-editor-container.component.d.ts +32 -0
- package/lib/skeleton-editor/index.d.ts +8 -0
- package/lib/skeleton-editor/skeleton-editor-anchor.directive.d.ts +8 -0
- package/lib/skeleton-editor/skeleton-editor.component.d.ts +31 -0
- package/lib/text-form/TextInputStyle.d.ts +5 -0
- package/lib/text-form/index.d.ts +2 -0
- package/lib/text-form/text-form.component.d.ts +13 -0
- package/lib/translation-form/index.d.ts +1 -0
- package/lib/translation-form/translation-form.component.d.ts +14 -0
- package/lib/translation-input/index.d.ts +1 -0
- package/lib/translation-input/translation-input.component.d.ts +17 -0
- package/lib/translation-textarea/index.d.ts +1 -0
- package/lib/translation-textarea/translation-textarea.component.d.ts +26 -0
- package/lib/unknown-form/index.d.ts +1 -0
- package/lib/unknown-form/unknown-form.component.d.ts +9 -0
- package/package.json +25 -0
- package/styles/@candy-kingdom/bonnie/variables.scss +0 -0
- package/styles/admin-styles.scss +139 -0
- package/styles/admin-variables.scss +445 -0
- package/styles/variables.scss +415 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a TypeGen auto-generated file.
|
|
3
|
+
* Any changes made to this file can be lost when this file is regenerated.
|
|
4
|
+
*/
|
|
5
|
+
export * from './i-equatable';
|
|
6
|
+
export * from './i-setting';
|
|
7
|
+
export * from './localized-text-setting-data';
|
|
8
|
+
export * from './setting-base';
|
|
9
|
+
export * from './setting-data';
|
|
10
|
+
export * from './setting-group';
|
|
11
|
+
export * from './setting';
|
|
12
|
+
export * from './text-setting-data';
|
|
13
|
+
export * from './text-setting-type';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a TypeGen auto-generated file.
|
|
3
|
+
* Any changes made to this file can be lost when this file is regenerated.
|
|
4
|
+
*/
|
|
5
|
+
import { SettingData } from "./setting-data";
|
|
6
|
+
import { TextSettingType } from "./text-setting-type";
|
|
7
|
+
import { LocalizedString } from "@candy-kingdom/bonnie";
|
|
8
|
+
export interface LocalizedTextSettingData extends SettingData {
|
|
9
|
+
text: LocalizedString;
|
|
10
|
+
textType: TextSettingType;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a TypeGen auto-generated file.
|
|
3
|
+
* Any changes made to this file can be lost when this file is regenerated.
|
|
4
|
+
*/
|
|
5
|
+
import { Setting } from "./setting";
|
|
6
|
+
export interface SettingGroup {
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
records: Setting<any>[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a TypeGen auto-generated file.
|
|
3
|
+
* Any changes made to this file can be lost when this file is regenerated.
|
|
4
|
+
*/
|
|
5
|
+
import { SettingData } from "./setting-data";
|
|
6
|
+
import { SettingBase } from "./setting-base";
|
|
7
|
+
export interface Setting<T extends SettingData> extends SettingBase {
|
|
8
|
+
data: T;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a TypeGen auto-generated file.
|
|
3
|
+
* Any changes made to this file can be lost when this file is regenerated.
|
|
4
|
+
*/
|
|
5
|
+
import { SettingData } from "./setting-data";
|
|
6
|
+
import { TextSettingType } from "./text-setting-type";
|
|
7
|
+
export interface TextSettingData extends SettingData {
|
|
8
|
+
text: string;
|
|
9
|
+
textType: TextSettingType;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './media-uploader.component';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter } from '@angular/core';
|
|
2
|
+
import { DomSanitizer, SafeStyle } from '@angular/platform-browser';
|
|
3
|
+
import { HttpClient } from '@angular/common/http';
|
|
4
|
+
import { MediaObjectFit, PixMediaUnion } from '@candy-kingdom/bonnie';
|
|
5
|
+
import { MediaType } from '../core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class MediaUploaderComponent {
|
|
8
|
+
private sanitizer;
|
|
9
|
+
private http;
|
|
10
|
+
readonly MediaObjectFit: typeof MediaObjectFit;
|
|
11
|
+
fileInput: ElementRef<HTMLInputElement>;
|
|
12
|
+
srcChange: EventEmitter<PixMediaUnion>;
|
|
13
|
+
uploadUrlMap: ReadonlyMap<MediaType, string>;
|
|
14
|
+
forceRatio?: number;
|
|
15
|
+
progress: number;
|
|
16
|
+
isUploading: boolean;
|
|
17
|
+
autoplay: boolean;
|
|
18
|
+
clipStyle?: SafeStyle;
|
|
19
|
+
fileTypeMask: string;
|
|
20
|
+
private _uploadType?;
|
|
21
|
+
private _src?;
|
|
22
|
+
constructor(sanitizer: DomSanitizer, http: HttpClient);
|
|
23
|
+
set src(newSrc: PixMediaUnion | undefined);
|
|
24
|
+
get src(): PixMediaUnion | undefined;
|
|
25
|
+
set uploadType(newUploadType: MediaType | undefined);
|
|
26
|
+
get uploadType(): MediaType | undefined;
|
|
27
|
+
onFileSelect(fileInput: HTMLInputElement): void;
|
|
28
|
+
selectFile(event: Event): void;
|
|
29
|
+
private getEventMessage;
|
|
30
|
+
private updateClip;
|
|
31
|
+
private handleError;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MediaUploaderComponent, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MediaUploaderComponent, "bonc-media-uploader", never, { "uploadUrlMap": { "alias": "uploadUrlMap"; "required": true; }; "forceRatio": { "alias": "forceRatio"; "required": false; }; "src": { "alias": "src"; "required": false; }; "uploadType": { "alias": "uploadType"; "required": false; }; }, { "srcChange": "srcChange"; }, never, never, false, never>;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './seo-form.component';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { OpenGraphData } from '@candy-kingdom/bonnie';
|
|
3
|
+
import { FormBaseComponent } from '../core-components';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../core-components/editable.directive";
|
|
6
|
+
export declare class SeoFormComponent extends FormBaseComponent<OpenGraphData> implements OnInit {
|
|
7
|
+
private _pageId;
|
|
8
|
+
ogImageUploadUrl: string;
|
|
9
|
+
label: string;
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
set pageId(value: string);
|
|
12
|
+
get pageId(): string;
|
|
13
|
+
ResToSrc(res: {
|
|
14
|
+
url: string;
|
|
15
|
+
}): string;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SeoFormComponent, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SeoFormComponent, "bonc-seo-form", never, { "label": { "alias": "label"; "required": false; }; "pageId": { "alias": "pageId"; "required": false; }; }, {}, never, never, false, [{ directive: typeof i1.EditableDirective; inputs: {}; outputs: {}; }]>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Bone } from '@candy-kingdom/bonnie';
|
|
2
|
+
export interface ContentPreset<out TBone extends Bone> {
|
|
3
|
+
title: string;
|
|
4
|
+
isActive(data: TBone): boolean;
|
|
5
|
+
clean(data: TBone): void;
|
|
6
|
+
transformer(bone: TBone): void;
|
|
7
|
+
}
|
|
8
|
+
export declare function createPreset<TBone extends Bone>(params: {
|
|
9
|
+
title: string;
|
|
10
|
+
style: string;
|
|
11
|
+
}): ContentPreset<TBone>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { Bone } from '@candy-kingdom/bonnie';
|
|
3
|
+
import { DeviceType } from '../core';
|
|
4
|
+
import { ContentPreset } from './ContentPreset';
|
|
5
|
+
export interface IBoneEditor<out TBone extends Bone = Bone> {
|
|
6
|
+
bone: TBone;
|
|
7
|
+
locale: string;
|
|
8
|
+
device: DeviceType;
|
|
9
|
+
readonly saved: EventEmitter<Bone>;
|
|
10
|
+
readonly removed: EventEmitter<void>;
|
|
11
|
+
readonly editing: EventEmitter<boolean>;
|
|
12
|
+
readonly isDirty: boolean;
|
|
13
|
+
readonly isEditing: boolean;
|
|
14
|
+
currentPreset?: ContentPreset<TBone>;
|
|
15
|
+
noPresets: boolean;
|
|
16
|
+
save(): void;
|
|
17
|
+
remove(): void;
|
|
18
|
+
resetData(): void;
|
|
19
|
+
startEditing(): void;
|
|
20
|
+
finishEditing(): void;
|
|
21
|
+
markAsDirty(): void;
|
|
22
|
+
updateDirty(): void;
|
|
23
|
+
nextPreset(): void;
|
|
24
|
+
onReset(): void;
|
|
25
|
+
onFinishEditing(): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComponentFactoryResolver, EventEmitter, OnChanges } from '@angular/core';
|
|
2
|
+
import { Bone } from '@candy-kingdom/bonnie';
|
|
3
|
+
import { SkeletonEditorAnchorDirective } from '../skeleton-editor-anchor.directive';
|
|
4
|
+
import { DeviceType } from '../../core';
|
|
5
|
+
import { IBoneEditor } from '../IBoneEditor';
|
|
6
|
+
import { BoneEditorMap } from '../BoneEditorMap';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class BoneEditorContainerComponent implements OnChanges {
|
|
9
|
+
private readonly componentFactoryResolver;
|
|
10
|
+
anchor: SkeletonEditorAnchorDirective;
|
|
11
|
+
removed: EventEmitter<void>;
|
|
12
|
+
saved: EventEmitter<Bone>;
|
|
13
|
+
editing: EventEmitter<boolean>;
|
|
14
|
+
DeviceType: typeof DeviceType;
|
|
15
|
+
editor: IBoneEditor;
|
|
16
|
+
themePopupIsShown: boolean;
|
|
17
|
+
private _bone;
|
|
18
|
+
private removeSubscription?;
|
|
19
|
+
private saveSubscription?;
|
|
20
|
+
private changedSubscription?;
|
|
21
|
+
locale: string;
|
|
22
|
+
device: DeviceType;
|
|
23
|
+
constructor(componentFactoryResolver: ComponentFactoryResolver);
|
|
24
|
+
ngOnChanges(): void;
|
|
25
|
+
map: BoneEditorMap;
|
|
26
|
+
get bone(): Bone;
|
|
27
|
+
set bone(newBone: Bone);
|
|
28
|
+
nextPreset: () => void;
|
|
29
|
+
get disabled(): boolean;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BoneEditorContainerComponent, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BoneEditorContainerComponent, "bonc-bone-editor-container", never, { "locale": { "alias": "locale"; "required": true; }; "device": { "alias": "device"; "required": false; }; "map": { "alias": "map"; "required": true; }; "bone": { "alias": "bone"; "required": true; }; }, { "removed": "removed"; "saved": "saved"; "editing": "editing"; }, never, never, false, never>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './skeleton-editor-anchor.directive';
|
|
2
|
+
export * from './skeleton-editor.component';
|
|
3
|
+
export * from './BoneEditorMap';
|
|
4
|
+
export * from './IBoneTemplate';
|
|
5
|
+
export * from './IBoneEditor';
|
|
6
|
+
export * from './ContentPreset';
|
|
7
|
+
export * from './skeleton-editor.component';
|
|
8
|
+
export * from './bone-editor-container/bone-editor-container.component';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ViewContainerRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SkeletonEditorAnchorDirective {
|
|
4
|
+
viewContainerRef: ViewContainerRef;
|
|
5
|
+
constructor(viewContainerRef: ViewContainerRef);
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonEditorAnchorDirective, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SkeletonEditorAnchorDirective, "[boncSkeletonEditorAnchor]", never, {}, {}, never, never, false, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { OnChanges, OnInit, QueryList } from '@angular/core';
|
|
2
|
+
import { Bone } from '@candy-kingdom/bonnie';
|
|
3
|
+
import { BoneEditorContainerComponent } from './bone-editor-container/bone-editor-container.component';
|
|
4
|
+
import { EditableDirective } from '../core-components/editable.directive';
|
|
5
|
+
import { DeviceType } from '../core';
|
|
6
|
+
import { IBoneTemplate } from './IBoneTemplate';
|
|
7
|
+
import { BoneEditorMap } from './BoneEditorMap';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "../core-components/editable.directive";
|
|
10
|
+
export declare class SkeletonEditorComponent implements OnInit, OnChanges {
|
|
11
|
+
editable: EditableDirective<Bone[]>;
|
|
12
|
+
boneEditorContainerList: QueryList<BoneEditorContainerComponent>;
|
|
13
|
+
locale: string;
|
|
14
|
+
device: DeviceType;
|
|
15
|
+
readonly templatesAreShown: boolean[];
|
|
16
|
+
constructor(editable: EditableDirective<Bone[]>);
|
|
17
|
+
ngOnInit(): void;
|
|
18
|
+
map: BoneEditorMap;
|
|
19
|
+
ngOnChanges(): void;
|
|
20
|
+
templates: ReadonlyArray<IBoneTemplate>;
|
|
21
|
+
get bones(): Bone[];
|
|
22
|
+
boneEditHandler(isEditing: boolean): void;
|
|
23
|
+
boneChangeHandler(index: number, newBoneValue: Bone): void;
|
|
24
|
+
removeBone(boneIndex: number): void;
|
|
25
|
+
moveDown(boneIndex: number): void;
|
|
26
|
+
moveUp(boneIndex: number): void;
|
|
27
|
+
createBone(index: number, selectedTemplate: IBoneTemplate): void;
|
|
28
|
+
private swapBones;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonEditorComponent, [{ host: true; }]>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkeletonEditorComponent, "bonc-skeleton-editor", never, { "locale": { "alias": "locale"; "required": true; }; "device": { "alias": "device"; "required": false; }; "map": { "alias": "map"; "required": true; }; "templates": { "alias": "templates"; "required": true; }; }, {}, never, never, false, [{ directive: typeof i1.EditableDirective; inputs: {}; outputs: {}; }]>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { TextInputStyle } from './TextInputStyle';
|
|
3
|
+
import { FormBaseComponent } from '../core-components/form-base.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../core-components/editable.directive";
|
|
6
|
+
export declare class TextFormComponent extends FormBaseComponent<string> implements OnInit {
|
|
7
|
+
readonly TextInputStyle: typeof TextInputStyle;
|
|
8
|
+
label: string;
|
|
9
|
+
type: TextInputStyle;
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextFormComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextFormComponent, "bonc-text-form", never, { "locale": { "alias": "locale"; "required": false; }; "label": { "alias": "label"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, {}, never, never, false, [{ directive: typeof i1.EditableDirective; inputs: {}; outputs: {}; }]>;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './translation-form.component';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { LocalizedString } from '@candy-kingdom/bonnie';
|
|
3
|
+
import { FormBaseComponent } from '../core-components';
|
|
4
|
+
import { TextEditorField } from '../core';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "../core-components/editable.directive";
|
|
7
|
+
export declare class TranslationFormComponent extends FormBaseComponent<LocalizedString> implements OnInit {
|
|
8
|
+
readonly TextEditorField: typeof TextEditorField;
|
|
9
|
+
field: TextEditorField;
|
|
10
|
+
label?: string;
|
|
11
|
+
ngOnInit(): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TranslationFormComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TranslationFormComponent, "bonc-translation-form", never, { "locale": { "alias": "locale"; "required": false; }; "field": { "alias": "field"; "required": true; }; "label": { "alias": "label"; "required": false; }; }, {}, never, never, false, [{ directive: typeof i1.EditableDirective; inputs: {}; outputs: {}; }]>;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './translation-input.component';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { DeviceType } from '../core';
|
|
3
|
+
import { LocalizedString } from '@candy-kingdom/bonnie';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class TranslationInputComponent {
|
|
6
|
+
text: LocalizedString;
|
|
7
|
+
locale: string;
|
|
8
|
+
device: DeviceType;
|
|
9
|
+
startEditing: EventEmitter<void>;
|
|
10
|
+
changed: EventEmitter<void>;
|
|
11
|
+
blurred: EventEmitter<void>;
|
|
12
|
+
onClick(): void;
|
|
13
|
+
onKeyPress(): void;
|
|
14
|
+
onBlur(): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TranslationInputComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TranslationInputComponent, "bonc-translation-input", never, { "text": { "alias": "text"; "required": true; }; "locale": { "alias": "locale"; "required": true; }; "device": { "alias": "device"; "required": false; }; }, { "startEditing": "startEditing"; "changed": "changed"; "blurred": "blurred"; }, never, never, false, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './translation-textarea.component';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AfterViewInit, EventEmitter, NgZone, OnChanges, QueryList } from '@angular/core';
|
|
2
|
+
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
|
3
|
+
import { LocalizedString } from '@candy-kingdom/bonnie';
|
|
4
|
+
import { DeviceType } from '../core';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TranslationTextareaComponent implements OnChanges, AfterViewInit {
|
|
7
|
+
private ngZone;
|
|
8
|
+
autosizeList: QueryList<CdkTextareaAutosize>;
|
|
9
|
+
minRows?: number;
|
|
10
|
+
maxRows?: number;
|
|
11
|
+
text: LocalizedString;
|
|
12
|
+
locale: string;
|
|
13
|
+
device: DeviceType;
|
|
14
|
+
startEditing: EventEmitter<void>;
|
|
15
|
+
changed: EventEmitter<void>;
|
|
16
|
+
blurred: EventEmitter<void>;
|
|
17
|
+
constructor(ngZone: NgZone);
|
|
18
|
+
ngAfterViewInit(): void;
|
|
19
|
+
ngOnChanges(): void;
|
|
20
|
+
onClick(): void;
|
|
21
|
+
onKeyPress(): void;
|
|
22
|
+
onBlur(): void;
|
|
23
|
+
private triggerResize;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TranslationTextareaComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TranslationTextareaComponent, "bonc-translation-textarea", never, { "minRows": { "alias": "minRows"; "required": false; }; "maxRows": { "alias": "maxRows"; "required": false; }; "text": { "alias": "text"; "required": true; }; "locale": { "alias": "locale"; "required": true; }; "device": { "alias": "device"; "required": false; }; }, { "startEditing": "startEditing"; "changed": "changed"; "blurred": "blurred"; }, never, never, false, never>;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './unknown-form.component';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { FormBaseComponent } from '../core-components/form-base.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class UnknownFormComponent extends FormBaseComponent<string> implements OnInit {
|
|
5
|
+
label: string;
|
|
6
|
+
ngOnInit(): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UnknownFormComponent, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UnknownFormComponent, "bonc-unknown-form", never, { "locale": { "alias": "locale"; "required": false; }; "label": { "alias": "label"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
9
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@candy-kingdom/bonnie-cms",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^17.0.0",
|
|
6
|
+
"@angular/core": "^17.0.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"module": "fesm2022/candy-kingdom-bonnie-cms.mjs",
|
|
13
|
+
"typings": "index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./index.d.ts",
|
|
20
|
+
"esm2022": "./esm2022/candy-kingdom-bonnie-cms.mjs",
|
|
21
|
+
"esm": "./esm2022/candy-kingdom-bonnie-cms.mjs",
|
|
22
|
+
"default": "./fesm2022/candy-kingdom-bonnie-cms.mjs"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
@import './admin-variables.scss';
|
|
2
|
+
|
|
3
|
+
body {
|
|
4
|
+
font-family: $adminFont;
|
|
5
|
+
color: silver;
|
|
6
|
+
background-color: #222;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
bonc-bone-editor-container .bar a,
|
|
10
|
+
bonc-form-controls .controls a {
|
|
11
|
+
display: block;
|
|
12
|
+
padding: 8px;
|
|
13
|
+
color: #444;
|
|
14
|
+
user-select: none;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
text-align: right;
|
|
17
|
+
|
|
18
|
+
&:hover {
|
|
19
|
+
color: #666;
|
|
20
|
+
background-color: #333;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:active {
|
|
24
|
+
color: #555;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.save,
|
|
28
|
+
&.close,
|
|
29
|
+
&.preset {
|
|
30
|
+
flex: 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.preset {
|
|
34
|
+
font-size: 11px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.save:hover {
|
|
38
|
+
color: $adminAccentColor;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
bonc-form-controls {
|
|
43
|
+
h2 {
|
|
44
|
+
display: block;
|
|
45
|
+
margin-bottom: 0.5em;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
label {
|
|
49
|
+
display: block;
|
|
50
|
+
margin-bottom: 0.3em;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.form-group+.form-group {
|
|
54
|
+
margin-top: 14px;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.page-editor {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
align-items: center;
|
|
62
|
+
background-color: #222;
|
|
63
|
+
padding-top: 50px;
|
|
64
|
+
padding-bottom: 200px;
|
|
65
|
+
|
|
66
|
+
.form-item {
|
|
67
|
+
margin-bottom: 10px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.page-title,
|
|
71
|
+
.seo,
|
|
72
|
+
.project-preview,
|
|
73
|
+
.project-title,
|
|
74
|
+
.address-form,
|
|
75
|
+
.email,
|
|
76
|
+
.phone,
|
|
77
|
+
.url,
|
|
78
|
+
.category-title {
|
|
79
|
+
width: 400px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.social-links-form,
|
|
83
|
+
.subheader,
|
|
84
|
+
.action {
|
|
85
|
+
width: 500px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.project-preview .form-group {
|
|
89
|
+
width: 200px;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
a.delete-entity {
|
|
94
|
+
width: 200px;
|
|
95
|
+
height: 50px;
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
justify-content: center;
|
|
99
|
+
background-color: $adminWarningColor;
|
|
100
|
+
color: white;
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
|
|
103
|
+
user-select: none;
|
|
104
|
+
|
|
105
|
+
&:hover {
|
|
106
|
+
text-decoration: underline;
|
|
107
|
+
background-color: darken($adminWarningColor, 10%);
|
|
108
|
+
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&:focus {
|
|
112
|
+
outline: none;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.form-select {
|
|
117
|
+
@include form-select-basic;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.form-select-light {
|
|
121
|
+
@include form-select-basic;
|
|
122
|
+
|
|
123
|
+
color: #222;
|
|
124
|
+
|
|
125
|
+
option {
|
|
126
|
+
background-color: silver;
|
|
127
|
+
|
|
128
|
+
&:not(checked) {
|
|
129
|
+
color: #222;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
bonc-editable-group>h2 {
|
|
135
|
+
color: silver;
|
|
136
|
+
margin-top: 1em;
|
|
137
|
+
margin-bottom: 0.5em;
|
|
138
|
+
margin-left: -11em;
|
|
139
|
+
}
|