@frontify/guideline-blocks-settings 0.3.0 → 0.6.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/dist/blocks/assetInput.d.ts +2 -4
- package/dist/blocks/base.d.ts +3 -1
- package/dist/blocks/checklist.d.ts +1 -3
- package/dist/blocks/choices.d.ts +1 -3
- package/dist/blocks/colorInput.d.ts +1 -3
- package/dist/blocks/index.d.ts +6 -2
- package/dist/blocks/index.js +3 -1
- package/dist/blocks/index.js.map +1 -1
- package/dist/blocks/input.d.ts +1 -3
- package/dist/blocks/multiInput.d.ts +1 -2
- package/dist/blocks/notification.d.ts +29 -0
- package/dist/blocks/notification.js +19 -0
- package/dist/blocks/notification.js.map +1 -0
- package/dist/blocks/reference.d.ts +28 -0
- package/dist/blocks/reference.js +19 -0
- package/dist/blocks/reference.js.map +1 -0
- package/dist/blocks/sectionHeading.d.ts +7 -0
- package/dist/blocks/sectionHeading.js +4 -0
- package/dist/blocks/sectionHeading.js.map +1 -0
- package/dist/blocks/switch.d.ts +1 -3
- package/dist/blocks/templateInput.d.ts +1 -3
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AssetChooserObjectType, AssetChooserProjectType, FileExtension } from '@frontify/app-bridge';
|
|
2
2
|
import { BaseBlock } from './base';
|
|
3
3
|
export declare enum AssetInputSource {
|
|
4
4
|
Library = "Library",
|
|
@@ -15,11 +15,9 @@ export declare type AssetInputValue = {
|
|
|
15
15
|
};
|
|
16
16
|
export declare type AssetInputBlock = {
|
|
17
17
|
type: 'assetInput';
|
|
18
|
-
value?: AssetInputValue | AssetInputValue['value'];
|
|
19
|
-
defaultValue?: AssetInputValue | AssetInputValue['value'];
|
|
20
18
|
multiSelection?: boolean;
|
|
21
19
|
extensions?: FileExtension[];
|
|
22
20
|
projectTypes?: AssetChooserProjectType[];
|
|
23
21
|
objectTypes?: AssetChooserObjectType[];
|
|
24
22
|
mode?: AssetInputMode;
|
|
25
|
-
} & BaseBlock
|
|
23
|
+
} & BaseBlock<AssetInputValue | AssetInputValue['value']>;
|
package/dist/blocks/base.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Bundle } from '../bundle';
|
|
2
|
-
export declare type BaseBlock = {
|
|
2
|
+
export declare type BaseBlock<T = undefined> = {
|
|
3
3
|
id: string;
|
|
4
4
|
label?: string;
|
|
5
5
|
info?: string;
|
|
6
|
+
value?: T;
|
|
7
|
+
defaultValue?: T;
|
|
6
8
|
show?: (bundle: Bundle) => boolean;
|
|
7
9
|
onChange?: (bundle: Bundle) => void;
|
|
8
10
|
};
|
|
@@ -3,8 +3,6 @@ import { Checkbox } from './checkbox';
|
|
|
3
3
|
export declare type ChecklistBlock = {
|
|
4
4
|
type: 'checklist';
|
|
5
5
|
choices: Checkbox[];
|
|
6
|
-
value?: string[] | null;
|
|
7
|
-
defaultValue: string[];
|
|
8
6
|
showClearAndSelectAllButtons?: boolean;
|
|
9
7
|
columns?: 1 | 2;
|
|
10
|
-
} & BaseBlock
|
|
8
|
+
} & BaseBlock<string[] | null>;
|
package/dist/blocks/choices.d.ts
CHANGED
package/dist/blocks/index.d.ts
CHANGED
|
@@ -4,17 +4,21 @@ import { ColorInputBlock } from './colorInput';
|
|
|
4
4
|
import { DropdownBlock } from './dropdown';
|
|
5
5
|
import { InputBlock } from './input';
|
|
6
6
|
import { MultiInputBlock } from './multiInput';
|
|
7
|
+
import { NotificationBlock } from './notification';
|
|
8
|
+
import { SectionHeadingBlock } from './sectionHeading';
|
|
7
9
|
import { SliderBlock } from './slider';
|
|
8
10
|
import { SwitchBlock } from './switch';
|
|
9
11
|
import { TemplateInputBlock } from './templateInput';
|
|
10
12
|
export * from './assetInput';
|
|
11
13
|
export * from './checklist';
|
|
14
|
+
export * from './choices';
|
|
12
15
|
export * from './colorInput';
|
|
13
16
|
export * from './dropdown';
|
|
14
17
|
export * from './input';
|
|
15
18
|
export * from './multiInput';
|
|
19
|
+
export * from './notification';
|
|
20
|
+
export * from './sectionHeading';
|
|
16
21
|
export * from './slider';
|
|
17
22
|
export * from './switch';
|
|
18
23
|
export * from './templateInput';
|
|
19
|
-
export
|
|
20
|
-
export declare type SettingBlock = AssetInputBlock | ChecklistBlock | ColorInputBlock | DropdownBlock | InputBlock | MultiInputBlock | SliderBlock | SwitchBlock | TemplateInputBlock;
|
|
24
|
+
export declare type SettingBlock = AssetInputBlock | ChecklistBlock | ColorInputBlock | DropdownBlock | SectionHeadingBlock | InputBlock | MultiInputBlock | SliderBlock | SwitchBlock | TemplateInputBlock | NotificationBlock;
|
package/dist/blocks/index.js
CHANGED
|
@@ -13,12 +13,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
__exportStar(require("./assetInput"), exports);
|
|
15
15
|
__exportStar(require("./checklist"), exports);
|
|
16
|
+
__exportStar(require("./choices"), exports);
|
|
16
17
|
__exportStar(require("./colorInput"), exports);
|
|
17
18
|
__exportStar(require("./dropdown"), exports);
|
|
18
19
|
__exportStar(require("./input"), exports);
|
|
19
20
|
__exportStar(require("./multiInput"), exports);
|
|
21
|
+
__exportStar(require("./notification"), exports);
|
|
22
|
+
__exportStar(require("./sectionHeading"), exports);
|
|
20
23
|
__exportStar(require("./slider"), exports);
|
|
21
24
|
__exportStar(require("./switch"), exports);
|
|
22
25
|
__exportStar(require("./templateInput"), exports);
|
|
23
|
-
__exportStar(require("./choices"), exports);
|
|
24
26
|
//# sourceMappingURL=index.js.map
|
package/dist/blocks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../types/blocks/index.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../types/blocks/index.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;;;;;;;;;;AAcvD,+CAA6B;AAC7B,8CAA4B;AAC5B,4CAA0B;AAC1B,+CAA6B;AAC7B,6CAA2B;AAC3B,0CAAwB;AACxB,+CAA6B;AAC7B,iDAA+B;AAC/B,mDAAiC;AACjC,2CAAyB;AACzB,2CAAyB;AACzB,kDAAgC"}
|
package/dist/blocks/input.d.ts
CHANGED
|
@@ -7,6 +7,5 @@ export declare type MultiInputBlock = {
|
|
|
7
7
|
type: 'multiInput';
|
|
8
8
|
layout: MultiInputLayout;
|
|
9
9
|
blocks: (Omit<InputBlock, 'value'> | Omit<ColorInputBlock, 'value'> | Omit<DropdownBlock, 'value'>)[];
|
|
10
|
-
value?: (InputBlock['value'] | ColorInputBlock['value'] | DropdownBlock['value'])[];
|
|
11
10
|
lastItemFullWidth?: boolean;
|
|
12
|
-
} & BaseBlock
|
|
11
|
+
} & BaseBlock<(InputBlock['value'] | ColorInputBlock['value'] | DropdownBlock['value'])[]>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BaseBlock } from './base';
|
|
2
|
+
export declare enum NotificationStyleType {
|
|
3
|
+
Warning = "Warning",
|
|
4
|
+
Negative = "Negative",
|
|
5
|
+
Positive = "Positive",
|
|
6
|
+
Info = "Info"
|
|
7
|
+
}
|
|
8
|
+
export declare type Link = {
|
|
9
|
+
label?: string;
|
|
10
|
+
href: string;
|
|
11
|
+
target?: '_self' | '_blank';
|
|
12
|
+
};
|
|
13
|
+
export declare enum NotificationBlockDividerPosition {
|
|
14
|
+
Top = "Top",
|
|
15
|
+
Bottom = "Bottom",
|
|
16
|
+
Both = "Both",
|
|
17
|
+
None = "None"
|
|
18
|
+
}
|
|
19
|
+
export declare type NotificationBlock = {
|
|
20
|
+
type: 'notification';
|
|
21
|
+
title?: string;
|
|
22
|
+
text?: string;
|
|
23
|
+
link?: Link;
|
|
24
|
+
styles: {
|
|
25
|
+
type: NotificationStyleType;
|
|
26
|
+
icon?: boolean;
|
|
27
|
+
divider?: NotificationBlockDividerPosition;
|
|
28
|
+
};
|
|
29
|
+
} & BaseBlock;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* (c) Copyright Frontify Ltd., all rights reserved. */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.NotificationBlockDividerPosition = exports.NotificationStyleType = void 0;
|
|
5
|
+
var NotificationStyleType;
|
|
6
|
+
(function (NotificationStyleType) {
|
|
7
|
+
NotificationStyleType["Warning"] = "Warning";
|
|
8
|
+
NotificationStyleType["Negative"] = "Negative";
|
|
9
|
+
NotificationStyleType["Positive"] = "Positive";
|
|
10
|
+
NotificationStyleType["Info"] = "Info";
|
|
11
|
+
})(NotificationStyleType = exports.NotificationStyleType || (exports.NotificationStyleType = {}));
|
|
12
|
+
var NotificationBlockDividerPosition;
|
|
13
|
+
(function (NotificationBlockDividerPosition) {
|
|
14
|
+
NotificationBlockDividerPosition["Top"] = "Top";
|
|
15
|
+
NotificationBlockDividerPosition["Bottom"] = "Bottom";
|
|
16
|
+
NotificationBlockDividerPosition["Both"] = "Both";
|
|
17
|
+
NotificationBlockDividerPosition["None"] = "None";
|
|
18
|
+
})(NotificationBlockDividerPosition = exports.NotificationBlockDividerPosition || (exports.NotificationBlockDividerPosition = {}));
|
|
19
|
+
//# sourceMappingURL=notification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.js","sourceRoot":"","sources":["../../types/blocks/notification.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;AAIvD,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC7B,4CAAmB,CAAA;IACnB,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;IACrB,sCAAa,CAAA;AACjB,CAAC,EALW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAKhC;AAQD,IAAY,gCAKX;AALD,WAAY,gCAAgC;IACxC,+CAAW,CAAA;IACX,qDAAiB,CAAA;IACjB,iDAAa,CAAA;IACb,iDAAa,CAAA;AACjB,CAAC,EALW,gCAAgC,GAAhC,wCAAgC,KAAhC,wCAAgC,QAK3C"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BaseBlock } from './base';
|
|
2
|
+
export declare enum ReferenceStyle {
|
|
3
|
+
Warning = "Warning",
|
|
4
|
+
Negative = "Negative",
|
|
5
|
+
Positive = "Positive",
|
|
6
|
+
Info = "Info"
|
|
7
|
+
}
|
|
8
|
+
export declare type Link = {
|
|
9
|
+
label?: string;
|
|
10
|
+
href: string;
|
|
11
|
+
target?: '_self' | '_blank';
|
|
12
|
+
};
|
|
13
|
+
export declare enum ReferenceBlockDividerPosition {
|
|
14
|
+
Top = "Top",
|
|
15
|
+
Bottom = "Bottom",
|
|
16
|
+
Both = "Both",
|
|
17
|
+
None = "None"
|
|
18
|
+
}
|
|
19
|
+
export declare type ReferenceBlock = {
|
|
20
|
+
type: 'reference';
|
|
21
|
+
title?: string;
|
|
22
|
+
text?: string;
|
|
23
|
+
style: ReferenceStyle;
|
|
24
|
+
link?: Link;
|
|
25
|
+
styles?: {
|
|
26
|
+
divider?: ReferenceBlockDividerPosition;
|
|
27
|
+
};
|
|
28
|
+
} & BaseBlock;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* (c) Copyright Frontify Ltd., all rights reserved. */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ReferenceBlockDividerPosition = exports.ReferenceStyle = void 0;
|
|
5
|
+
var ReferenceStyle;
|
|
6
|
+
(function (ReferenceStyle) {
|
|
7
|
+
ReferenceStyle["Warning"] = "Warning";
|
|
8
|
+
ReferenceStyle["Negative"] = "Negative";
|
|
9
|
+
ReferenceStyle["Positive"] = "Positive";
|
|
10
|
+
ReferenceStyle["Info"] = "Info";
|
|
11
|
+
})(ReferenceStyle = exports.ReferenceStyle || (exports.ReferenceStyle = {}));
|
|
12
|
+
var ReferenceBlockDividerPosition;
|
|
13
|
+
(function (ReferenceBlockDividerPosition) {
|
|
14
|
+
ReferenceBlockDividerPosition["Top"] = "Top";
|
|
15
|
+
ReferenceBlockDividerPosition["Bottom"] = "Bottom";
|
|
16
|
+
ReferenceBlockDividerPosition["Both"] = "Both";
|
|
17
|
+
ReferenceBlockDividerPosition["None"] = "None";
|
|
18
|
+
})(ReferenceBlockDividerPosition = exports.ReferenceBlockDividerPosition || (exports.ReferenceBlockDividerPosition = {}));
|
|
19
|
+
//# sourceMappingURL=reference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../types/blocks/reference.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;AAIvD,IAAY,cAKX;AALD,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;IACrB,+BAAa,CAAA;AACjB,CAAC,EALW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAKzB;AAQD,IAAY,6BAKX;AALD,WAAY,6BAA6B;IACrC,4CAAW,CAAA;IACX,kDAAiB,CAAA;IACjB,8CAAa,CAAA;IACb,8CAAa,CAAA;AACjB,CAAC,EALW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAKxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sectionHeading.js","sourceRoot":"","sources":["../../types/blocks/sectionHeading.ts"],"names":[],"mappings":";AAAA,uDAAuD"}
|
package/dist/blocks/switch.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontify/guideline-blocks-settings",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Provides the types for the block settings",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"typecheck": "tsc --noEmit"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@frontify/eslint-config-typescript": "0.
|
|
26
|
-
"eslint": "8.
|
|
25
|
+
"@frontify/eslint-config-typescript": "0.15.2",
|
|
26
|
+
"eslint": "8.8.0",
|
|
27
27
|
"prettier": "2.5.1",
|
|
28
28
|
"typescript": "4.5.5"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@frontify/app-bridge": "2.11.0",
|
|
32
|
-
"@frontify/arcade": "1.
|
|
32
|
+
"@frontify/arcade": "1.1.0"
|
|
33
33
|
}
|
|
34
34
|
}
|