@cakemail-org/ui-components-v2 2.1.15 → 2.1.17
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.
|
@@ -5,11 +5,11 @@ export declare class FormsFactory {
|
|
|
5
5
|
id: string;
|
|
6
6
|
}): Promise<FormModel | EnhancedFormModel>;
|
|
7
7
|
static list({ ...options }: TGenericListParams): Promise<TGenericListReturn<FormModel | SummaryEnhancedFormModel>>;
|
|
8
|
-
static create({ form }: {
|
|
8
|
+
static create({ form, type }: {
|
|
9
9
|
form: Partial<TEnhancedFormModel>;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
type: "enhanced" | "basic";
|
|
11
|
+
}): Promise<EnhancedFormModel | FormModel>;
|
|
12
|
+
static renderPublic({ token }: {
|
|
13
13
|
token: string;
|
|
14
14
|
}): Promise<string>;
|
|
15
15
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1045,8 +1045,8 @@ function TrayOpen18(props) {
|
|
|
1045
1045
|
|
|
1046
1046
|
function TrayToggle18(props) {
|
|
1047
1047
|
return React.createElement(SvgIcon, __assign({}, props, { width: "18", height: "18", viewBox: "0 0 18 18" }),
|
|
1048
|
-
React.createElement("path", { d: "M14 0C16.2091 0 18 1.79086 18 4V14C18 16.2091 16.2091 18 14 18H4C1.79086 18 1.61066e-08 16.2091 0 14V4C0 1.79086 1.79086 1.61064e-08 4 0H14ZM4 2C2.89543 2 2 2.89543 2 4V14C2 15.1046 2.89543 16 4 16H14C15.1046 16 16 15.1046 16 14V4C16 2.89543 15.1046 2 14 2H4Z",
|
|
1049
|
-
React.createElement("path", { d: "M3 4C3 3.44772 3.44772 3 4 3H8C8.55228 3 9 3.44772 9 4V14C9 14.5523 8.55228 15 8 15H4C3.44772 15 3 14.5523 3 14V4Z",
|
|
1048
|
+
React.createElement("path", { d: "M14 0C16.2091 0 18 1.79086 18 4V14C18 16.2091 16.2091 18 14 18H4C1.79086 18 1.61066e-08 16.2091 0 14V4C0 1.79086 1.79086 1.61064e-08 4 0H14ZM4 2C2.89543 2 2 2.89543 2 4V14C2 15.1046 2.89543 16 4 16H14C15.1046 16 16 15.1046 16 14V4C16 2.89543 15.1046 2 14 2H4Z", fillOpacity: "0.5737" }),
|
|
1049
|
+
React.createElement("path", { d: "M3 4C3 3.44772 3.44772 3 4 3H8C8.55228 3 9 3.44772 9 4V14C9 14.5523 8.55228 15 8 15H4C3.44772 15 3 14.5523 3 14V4Z", fillOpacity: "0.5737" }));
|
|
1050
1050
|
}
|
|
1051
1051
|
|
|
1052
1052
|
function UnBranded18(props) {
|
|
@@ -1366,12 +1366,12 @@ function Upload44(props) {
|
|
|
1366
1366
|
React.createElement("g", { id: "glyph/44/upload" },
|
|
1367
1367
|
React.createElement("g", { id: "glyph/32/redirection" },
|
|
1368
1368
|
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M21.364 44C21.9163 44 22.364 43.5523 22.364 43L22.364 20.4142L26.0208 24.071C26.4114 24.4615 27.0444 24.4615 27.4351 24.071C27.8254 23.6805 27.8254 23.0474 27.4351 22.6569L22.071 17.2928C21.6807 16.9023 21.0474 16.9023 20.6567 17.2928L15.293 22.6569C14.9023 23.0474 14.9023 23.6805 15.293 24.071C15.6833 24.4615 16.3166 24.4615 16.707 24.071L20.364 20.4142L20.364 43C20.364 43.5523 20.8117 44 21.364 44Z", fill: "black" }),
|
|
1369
|
-
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M21.364 44C21.9163 44 22.364 43.5523 22.364 43L22.364 20.4142L26.0208 24.071C26.4114 24.4615 27.0444 24.4615 27.4351 24.071C27.8254 23.6805 27.8254 23.0474 27.4351 22.6569L22.071 17.2928C21.6807 16.9023 21.0474 16.9023 20.6567 17.2928L15.293 22.6569C14.9023 23.0474 14.9023 23.6805 15.293 24.071C15.6833 24.4615 16.3166 24.4615 16.707 24.071L20.364 20.4142L20.364 43C20.364 43.5523 20.8117 44 21.364 44Z", fill: "white",
|
|
1370
|
-
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M21.364 44C21.9163 44 22.364 43.5523 22.364 43L22.364 20.4142L26.0208 24.071C26.4114 24.4615 27.0444 24.4615 27.4351 24.071C27.8254 23.6805 27.8254 23.0474 27.4351 22.6569L22.071 17.2928C21.6807 16.9023 21.0474 16.9023 20.6567 17.2928L15.293 22.6569C14.9023 23.0474 14.9023 23.6805 15.293 24.071C15.6833 24.4615 16.3166 24.4615 16.707 24.071L20.364 20.4142L20.364 43C20.364 43.5523 20.8117 44 21.364 44Z", fill: "#FF4835",
|
|
1369
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M21.364 44C21.9163 44 22.364 43.5523 22.364 43L22.364 20.4142L26.0208 24.071C26.4114 24.4615 27.0444 24.4615 27.4351 24.071C27.8254 23.6805 27.8254 23.0474 27.4351 22.6569L22.071 17.2928C21.6807 16.9023 21.0474 16.9023 20.6567 17.2928L15.293 22.6569C14.9023 23.0474 14.9023 23.6805 15.293 24.071C15.6833 24.4615 16.3166 24.4615 16.707 24.071L20.364 20.4142L20.364 43C20.364 43.5523 20.8117 44 21.364 44Z", fill: "white", fillOpacity: "0.1" }),
|
|
1370
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M21.364 44C21.9163 44 22.364 43.5523 22.364 43L22.364 20.4142L26.0208 24.071C26.4114 24.4615 27.0444 24.4615 27.4351 24.071C27.8254 23.6805 27.8254 23.0474 27.4351 22.6569L22.071 17.2928C21.6807 16.9023 21.0474 16.9023 20.6567 17.2928L15.293 22.6569C14.9023 23.0474 14.9023 23.6805 15.293 24.071C15.6833 24.4615 16.3166 24.4615 16.707 24.071L20.364 20.4142L20.364 43C20.364 43.5523 20.8117 44 21.364 44Z", fill: "#FF4835", fillOpacity: "0.01" })),
|
|
1371
1371
|
React.createElement("g", { id: "Subtract" },
|
|
1372
1372
|
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M36.9455 14.1032L36.817 15.3969L37.9471 16.0396C40.3719 17.4183 42 20.0203 42 23C42 27.4183 38.4183 31 34 31H27V33H34C39.5228 33 44 28.5228 44 23C44 19.2721 41.9601 16.0207 38.9357 14.301C38.9782 13.8731 39 13.4391 39 13C39 5.8203 33.1797 0 26 0C20.9109 0 16.5048 2.92423 14.3703 7.18407C13.7656 7.06333 13.1402 7 12.5 7C7.25329 7 3 11.2533 3 16.5C3 16.986 3.03649 17.4634 3.10688 17.9297C1.20992 19.4886 0 21.853 0 24.5C0 29.0266 3.53831 32.7267 8 32.9855V33H16V31H8.30726L8.11582 30.9889C4.70574 30.7911 2 27.9608 2 24.5C2 22.4766 2.92218 20.6702 4.37669 19.4749L5.25394 18.754L5.08448 17.6312C5.02895 17.2634 5 16.8857 5 16.5C5 12.3579 8.35786 9 12.5 9C13.008 9 13.5023 9.05022 13.9788 9.14536L15.4749 9.44408L16.1584 8.08002C17.967 4.47067 21.6968 2 26 2C32.0751 2 37 6.92487 37 13C37 13.3729 36.9815 13.7409 36.9455 14.1032Z", fill: "black" }),
|
|
1373
|
-
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M36.9455 14.1032L36.817 15.3969L37.9471 16.0396C40.3719 17.4183 42 20.0203 42 23C42 27.4183 38.4183 31 34 31H27V33H34C39.5228 33 44 28.5228 44 23C44 19.2721 41.9601 16.0207 38.9357 14.301C38.9782 13.8731 39 13.4391 39 13C39 5.8203 33.1797 0 26 0C20.9109 0 16.5048 2.92423 14.3703 7.18407C13.7656 7.06333 13.1402 7 12.5 7C7.25329 7 3 11.2533 3 16.5C3 16.986 3.03649 17.4634 3.10688 17.9297C1.20992 19.4886 0 21.853 0 24.5C0 29.0266 3.53831 32.7267 8 32.9855V33H16V31H8.30726L8.11582 30.9889C4.70574 30.7911 2 27.9608 2 24.5C2 22.4766 2.92218 20.6702 4.37669 19.4749L5.25394 18.754L5.08448 17.6312C5.02895 17.2634 5 16.8857 5 16.5C5 12.3579 8.35786 9 12.5 9C13.008 9 13.5023 9.05022 13.9788 9.14536L15.4749 9.44408L16.1584 8.08002C17.967 4.47067 21.6968 2 26 2C32.0751 2 37 6.92487 37 13C37 13.3729 36.9815 13.7409 36.9455 14.1032Z", fill: "white",
|
|
1374
|
-
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M36.9455 14.1032L36.817 15.3969L37.9471 16.0396C40.3719 17.4183 42 20.0203 42 23C42 27.4183 38.4183 31 34 31H27V33H34C39.5228 33 44 28.5228 44 23C44 19.2721 41.9601 16.0207 38.9357 14.301C38.9782 13.8731 39 13.4391 39 13C39 5.8203 33.1797 0 26 0C20.9109 0 16.5048 2.92423 14.3703 7.18407C13.7656 7.06333 13.1402 7 12.5 7C7.25329 7 3 11.2533 3 16.5C3 16.986 3.03649 17.4634 3.10688 17.9297C1.20992 19.4886 0 21.853 0 24.5C0 29.0266 3.53831 32.7267 8 32.9855V33H16V31H8.30726L8.11582 30.9889C4.70574 30.7911 2 27.9608 2 24.5C2 22.4766 2.92218 20.6702 4.37669 19.4749L5.25394 18.754L5.08448 17.6312C5.02895 17.2634 5 16.8857 5 16.5C5 12.3579 8.35786 9 12.5 9C13.008 9 13.5023 9.05022 13.9788 9.14536L15.4749 9.44408L16.1584 8.08002C17.967 4.47067 21.6968 2 26 2C32.0751 2 37 6.92487 37 13C37 13.3729 36.9815 13.7409 36.9455 14.1032Z", fill: "#FF4835",
|
|
1373
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M36.9455 14.1032L36.817 15.3969L37.9471 16.0396C40.3719 17.4183 42 20.0203 42 23C42 27.4183 38.4183 31 34 31H27V33H34C39.5228 33 44 28.5228 44 23C44 19.2721 41.9601 16.0207 38.9357 14.301C38.9782 13.8731 39 13.4391 39 13C39 5.8203 33.1797 0 26 0C20.9109 0 16.5048 2.92423 14.3703 7.18407C13.7656 7.06333 13.1402 7 12.5 7C7.25329 7 3 11.2533 3 16.5C3 16.986 3.03649 17.4634 3.10688 17.9297C1.20992 19.4886 0 21.853 0 24.5C0 29.0266 3.53831 32.7267 8 32.9855V33H16V31H8.30726L8.11582 30.9889C4.70574 30.7911 2 27.9608 2 24.5C2 22.4766 2.92218 20.6702 4.37669 19.4749L5.25394 18.754L5.08448 17.6312C5.02895 17.2634 5 16.8857 5 16.5C5 12.3579 8.35786 9 12.5 9C13.008 9 13.5023 9.05022 13.9788 9.14536L15.4749 9.44408L16.1584 8.08002C17.967 4.47067 21.6968 2 26 2C32.0751 2 37 6.92487 37 13C37 13.3729 36.9815 13.7409 36.9455 14.1032Z", fill: "white", fillOpacity: "0.1" }),
|
|
1374
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M36.9455 14.1032L36.817 15.3969L37.9471 16.0396C40.3719 17.4183 42 20.0203 42 23C42 27.4183 38.4183 31 34 31H27V33H34C39.5228 33 44 28.5228 44 23C44 19.2721 41.9601 16.0207 38.9357 14.301C38.9782 13.8731 39 13.4391 39 13C39 5.8203 33.1797 0 26 0C20.9109 0 16.5048 2.92423 14.3703 7.18407C13.7656 7.06333 13.1402 7 12.5 7C7.25329 7 3 11.2533 3 16.5C3 16.986 3.03649 17.4634 3.10688 17.9297C1.20992 19.4886 0 21.853 0 24.5C0 29.0266 3.53831 32.7267 8 32.9855V33H16V31H8.30726L8.11582 30.9889C4.70574 30.7911 2 27.9608 2 24.5C2 22.4766 2.92218 20.6702 4.37669 19.4749L5.25394 18.754L5.08448 17.6312C5.02895 17.2634 5 16.8857 5 16.5C5 12.3579 8.35786 9 12.5 9C13.008 9 13.5023 9.05022 13.9788 9.14536L15.4749 9.44408L16.1584 8.08002C17.967 4.47067 21.6968 2 26 2C32.0751 2 37 6.92487 37 13C37 13.3729 36.9815 13.7409 36.9455 14.1032Z", fill: "#FF4835", fillOpacity: "0.01" }))));
|
|
1375
1375
|
}
|
|
1376
1376
|
|
|
1377
1377
|
function Icon(_a) {
|
|
@@ -10169,11 +10169,11 @@ function getEmail(_a) {
|
|
|
10169
10169
|
}
|
|
10170
10170
|
|
|
10171
10171
|
function createForm(_a) {
|
|
10172
|
-
var form = _a.form;
|
|
10172
|
+
var form = _a.form, type = _a.type;
|
|
10173
10173
|
return callApi({
|
|
10174
10174
|
url: uiKitConfig.GATEWAY_PROXY + "/forms",
|
|
10175
10175
|
fetchOptions: {
|
|
10176
|
-
body: __assign(__assign({}, form), { type:
|
|
10176
|
+
body: __assign(__assign({}, form), { type: type }),
|
|
10177
10177
|
method: exports.EMethods.post
|
|
10178
10178
|
}
|
|
10179
10179
|
});
|
|
@@ -10255,9 +10255,9 @@ function renderForm(_a) {
|
|
|
10255
10255
|
});
|
|
10256
10256
|
}
|
|
10257
10257
|
function renderPublicHtmlForm(_a) {
|
|
10258
|
-
var
|
|
10258
|
+
var token = _a.token;
|
|
10259
10259
|
return callApi({
|
|
10260
|
-
url: uiKitConfig.GATEWAY_PROXY + "/forms/" +
|
|
10260
|
+
url: uiKitConfig.GATEWAY_PROXY + "/forms/" + token + "/render-html",
|
|
10261
10261
|
fetchOptions: {
|
|
10262
10262
|
method: exports.EMethods.get
|
|
10263
10263
|
}
|
|
@@ -17554,19 +17554,22 @@ var FormsFactory = /** @class */ (function () {
|
|
|
17554
17554
|
};
|
|
17555
17555
|
FormsFactory.create = function (_a) {
|
|
17556
17556
|
return __awaiter(this, arguments, void 0, function (_b) {
|
|
17557
|
-
var form = _b.form;
|
|
17557
|
+
var form = _b.form, type = _b.type;
|
|
17558
17558
|
return __generator(this, function (_c) {
|
|
17559
|
-
return [2 /*return*/, createForm({ form: form }).then(function (data) {
|
|
17560
|
-
|
|
17559
|
+
return [2 /*return*/, createForm({ form: form, type: type }).then(function (data) {
|
|
17560
|
+
if ("enabled" in data.data) {
|
|
17561
|
+
return new EnhancedFormModel(data.data);
|
|
17562
|
+
}
|
|
17563
|
+
return new FormModel(data.data);
|
|
17561
17564
|
})];
|
|
17562
17565
|
});
|
|
17563
17566
|
});
|
|
17564
17567
|
};
|
|
17565
17568
|
FormsFactory.renderPublic = function (_a) {
|
|
17566
17569
|
return __awaiter(this, arguments, void 0, function (_b) {
|
|
17567
|
-
var
|
|
17570
|
+
var token = _b.token;
|
|
17568
17571
|
return __generator(this, function (_c) {
|
|
17569
|
-
return [2 /*return*/, renderPublicHtmlForm({
|
|
17572
|
+
return [2 /*return*/, renderPublicHtmlForm({ token: token }).then(function (data) {
|
|
17570
17573
|
return data;
|
|
17571
17574
|
})];
|
|
17572
17575
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EnhancedFormModel, FormModel } from "../../models";
|
|
2
2
|
import { TGenericListParams } from "../../types";
|
|
3
|
-
export declare function createForm({ form }: {
|
|
4
|
-
form: Partial<EnhancedFormModel>;
|
|
3
|
+
export declare function createForm({ form, type }: {
|
|
4
|
+
form: Partial<EnhancedFormModel | FormModel>;
|
|
5
|
+
type: "enhanced" | "basic";
|
|
5
6
|
}): Promise<any>;
|
|
6
7
|
export declare function listForms({ useImpersonationTree, ...options }: TGenericListParams): Promise<any>;
|
|
7
8
|
export declare function patchForm({ id, data }: {
|
|
@@ -27,8 +28,7 @@ export declare function renderForm({ id, published }: {
|
|
|
27
28
|
id: string;
|
|
28
29
|
published: boolean;
|
|
29
30
|
}): Promise<any>;
|
|
30
|
-
export declare function renderPublicHtmlForm({
|
|
31
|
-
id: string;
|
|
31
|
+
export declare function renderPublicHtmlForm({ token }: {
|
|
32
32
|
token: string;
|
|
33
33
|
}): Promise<any>;
|
|
34
34
|
export * from "./types";
|
|
@@ -5,11 +5,11 @@ export declare class FormsFactory {
|
|
|
5
5
|
id: string;
|
|
6
6
|
}): Promise<FormModel | EnhancedFormModel>;
|
|
7
7
|
static list({ ...options }: TGenericListParams): Promise<TGenericListReturn<FormModel | SummaryEnhancedFormModel>>;
|
|
8
|
-
static create({ form }: {
|
|
8
|
+
static create({ form, type }: {
|
|
9
9
|
form: Partial<TEnhancedFormModel>;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
type: "enhanced" | "basic";
|
|
11
|
+
}): Promise<EnhancedFormModel | FormModel>;
|
|
12
|
+
static renderPublic({ token }: {
|
|
13
13
|
token: string;
|
|
14
14
|
}): Promise<string>;
|
|
15
15
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1025,8 +1025,8 @@ function TrayOpen18(props) {
|
|
|
1025
1025
|
|
|
1026
1026
|
function TrayToggle18(props) {
|
|
1027
1027
|
return React__default.createElement(SvgIcon, __assign({}, props, { width: "18", height: "18", viewBox: "0 0 18 18" }),
|
|
1028
|
-
React__default.createElement("path", { d: "M14 0C16.2091 0 18 1.79086 18 4V14C18 16.2091 16.2091 18 14 18H4C1.79086 18 1.61066e-08 16.2091 0 14V4C0 1.79086 1.79086 1.61064e-08 4 0H14ZM4 2C2.89543 2 2 2.89543 2 4V14C2 15.1046 2.89543 16 4 16H14C15.1046 16 16 15.1046 16 14V4C16 2.89543 15.1046 2 14 2H4Z",
|
|
1029
|
-
React__default.createElement("path", { d: "M3 4C3 3.44772 3.44772 3 4 3H8C8.55228 3 9 3.44772 9 4V14C9 14.5523 8.55228 15 8 15H4C3.44772 15 3 14.5523 3 14V4Z",
|
|
1028
|
+
React__default.createElement("path", { d: "M14 0C16.2091 0 18 1.79086 18 4V14C18 16.2091 16.2091 18 14 18H4C1.79086 18 1.61066e-08 16.2091 0 14V4C0 1.79086 1.79086 1.61064e-08 4 0H14ZM4 2C2.89543 2 2 2.89543 2 4V14C2 15.1046 2.89543 16 4 16H14C15.1046 16 16 15.1046 16 14V4C16 2.89543 15.1046 2 14 2H4Z", fillOpacity: "0.5737" }),
|
|
1029
|
+
React__default.createElement("path", { d: "M3 4C3 3.44772 3.44772 3 4 3H8C8.55228 3 9 3.44772 9 4V14C9 14.5523 8.55228 15 8 15H4C3.44772 15 3 14.5523 3 14V4Z", fillOpacity: "0.5737" }));
|
|
1030
1030
|
}
|
|
1031
1031
|
|
|
1032
1032
|
function UnBranded18(props) {
|
|
@@ -1346,12 +1346,12 @@ function Upload44(props) {
|
|
|
1346
1346
|
React__default.createElement("g", { id: "glyph/44/upload" },
|
|
1347
1347
|
React__default.createElement("g", { id: "glyph/32/redirection" },
|
|
1348
1348
|
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M21.364 44C21.9163 44 22.364 43.5523 22.364 43L22.364 20.4142L26.0208 24.071C26.4114 24.4615 27.0444 24.4615 27.4351 24.071C27.8254 23.6805 27.8254 23.0474 27.4351 22.6569L22.071 17.2928C21.6807 16.9023 21.0474 16.9023 20.6567 17.2928L15.293 22.6569C14.9023 23.0474 14.9023 23.6805 15.293 24.071C15.6833 24.4615 16.3166 24.4615 16.707 24.071L20.364 20.4142L20.364 43C20.364 43.5523 20.8117 44 21.364 44Z", fill: "black" }),
|
|
1349
|
-
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M21.364 44C21.9163 44 22.364 43.5523 22.364 43L22.364 20.4142L26.0208 24.071C26.4114 24.4615 27.0444 24.4615 27.4351 24.071C27.8254 23.6805 27.8254 23.0474 27.4351 22.6569L22.071 17.2928C21.6807 16.9023 21.0474 16.9023 20.6567 17.2928L15.293 22.6569C14.9023 23.0474 14.9023 23.6805 15.293 24.071C15.6833 24.4615 16.3166 24.4615 16.707 24.071L20.364 20.4142L20.364 43C20.364 43.5523 20.8117 44 21.364 44Z", fill: "white",
|
|
1350
|
-
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M21.364 44C21.9163 44 22.364 43.5523 22.364 43L22.364 20.4142L26.0208 24.071C26.4114 24.4615 27.0444 24.4615 27.4351 24.071C27.8254 23.6805 27.8254 23.0474 27.4351 22.6569L22.071 17.2928C21.6807 16.9023 21.0474 16.9023 20.6567 17.2928L15.293 22.6569C14.9023 23.0474 14.9023 23.6805 15.293 24.071C15.6833 24.4615 16.3166 24.4615 16.707 24.071L20.364 20.4142L20.364 43C20.364 43.5523 20.8117 44 21.364 44Z", fill: "#FF4835",
|
|
1349
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M21.364 44C21.9163 44 22.364 43.5523 22.364 43L22.364 20.4142L26.0208 24.071C26.4114 24.4615 27.0444 24.4615 27.4351 24.071C27.8254 23.6805 27.8254 23.0474 27.4351 22.6569L22.071 17.2928C21.6807 16.9023 21.0474 16.9023 20.6567 17.2928L15.293 22.6569C14.9023 23.0474 14.9023 23.6805 15.293 24.071C15.6833 24.4615 16.3166 24.4615 16.707 24.071L20.364 20.4142L20.364 43C20.364 43.5523 20.8117 44 21.364 44Z", fill: "white", fillOpacity: "0.1" }),
|
|
1350
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M21.364 44C21.9163 44 22.364 43.5523 22.364 43L22.364 20.4142L26.0208 24.071C26.4114 24.4615 27.0444 24.4615 27.4351 24.071C27.8254 23.6805 27.8254 23.0474 27.4351 22.6569L22.071 17.2928C21.6807 16.9023 21.0474 16.9023 20.6567 17.2928L15.293 22.6569C14.9023 23.0474 14.9023 23.6805 15.293 24.071C15.6833 24.4615 16.3166 24.4615 16.707 24.071L20.364 20.4142L20.364 43C20.364 43.5523 20.8117 44 21.364 44Z", fill: "#FF4835", fillOpacity: "0.01" })),
|
|
1351
1351
|
React__default.createElement("g", { id: "Subtract" },
|
|
1352
1352
|
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M36.9455 14.1032L36.817 15.3969L37.9471 16.0396C40.3719 17.4183 42 20.0203 42 23C42 27.4183 38.4183 31 34 31H27V33H34C39.5228 33 44 28.5228 44 23C44 19.2721 41.9601 16.0207 38.9357 14.301C38.9782 13.8731 39 13.4391 39 13C39 5.8203 33.1797 0 26 0C20.9109 0 16.5048 2.92423 14.3703 7.18407C13.7656 7.06333 13.1402 7 12.5 7C7.25329 7 3 11.2533 3 16.5C3 16.986 3.03649 17.4634 3.10688 17.9297C1.20992 19.4886 0 21.853 0 24.5C0 29.0266 3.53831 32.7267 8 32.9855V33H16V31H8.30726L8.11582 30.9889C4.70574 30.7911 2 27.9608 2 24.5C2 22.4766 2.92218 20.6702 4.37669 19.4749L5.25394 18.754L5.08448 17.6312C5.02895 17.2634 5 16.8857 5 16.5C5 12.3579 8.35786 9 12.5 9C13.008 9 13.5023 9.05022 13.9788 9.14536L15.4749 9.44408L16.1584 8.08002C17.967 4.47067 21.6968 2 26 2C32.0751 2 37 6.92487 37 13C37 13.3729 36.9815 13.7409 36.9455 14.1032Z", fill: "black" }),
|
|
1353
|
-
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M36.9455 14.1032L36.817 15.3969L37.9471 16.0396C40.3719 17.4183 42 20.0203 42 23C42 27.4183 38.4183 31 34 31H27V33H34C39.5228 33 44 28.5228 44 23C44 19.2721 41.9601 16.0207 38.9357 14.301C38.9782 13.8731 39 13.4391 39 13C39 5.8203 33.1797 0 26 0C20.9109 0 16.5048 2.92423 14.3703 7.18407C13.7656 7.06333 13.1402 7 12.5 7C7.25329 7 3 11.2533 3 16.5C3 16.986 3.03649 17.4634 3.10688 17.9297C1.20992 19.4886 0 21.853 0 24.5C0 29.0266 3.53831 32.7267 8 32.9855V33H16V31H8.30726L8.11582 30.9889C4.70574 30.7911 2 27.9608 2 24.5C2 22.4766 2.92218 20.6702 4.37669 19.4749L5.25394 18.754L5.08448 17.6312C5.02895 17.2634 5 16.8857 5 16.5C5 12.3579 8.35786 9 12.5 9C13.008 9 13.5023 9.05022 13.9788 9.14536L15.4749 9.44408L16.1584 8.08002C17.967 4.47067 21.6968 2 26 2C32.0751 2 37 6.92487 37 13C37 13.3729 36.9815 13.7409 36.9455 14.1032Z", fill: "white",
|
|
1354
|
-
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M36.9455 14.1032L36.817 15.3969L37.9471 16.0396C40.3719 17.4183 42 20.0203 42 23C42 27.4183 38.4183 31 34 31H27V33H34C39.5228 33 44 28.5228 44 23C44 19.2721 41.9601 16.0207 38.9357 14.301C38.9782 13.8731 39 13.4391 39 13C39 5.8203 33.1797 0 26 0C20.9109 0 16.5048 2.92423 14.3703 7.18407C13.7656 7.06333 13.1402 7 12.5 7C7.25329 7 3 11.2533 3 16.5C3 16.986 3.03649 17.4634 3.10688 17.9297C1.20992 19.4886 0 21.853 0 24.5C0 29.0266 3.53831 32.7267 8 32.9855V33H16V31H8.30726L8.11582 30.9889C4.70574 30.7911 2 27.9608 2 24.5C2 22.4766 2.92218 20.6702 4.37669 19.4749L5.25394 18.754L5.08448 17.6312C5.02895 17.2634 5 16.8857 5 16.5C5 12.3579 8.35786 9 12.5 9C13.008 9 13.5023 9.05022 13.9788 9.14536L15.4749 9.44408L16.1584 8.08002C17.967 4.47067 21.6968 2 26 2C32.0751 2 37 6.92487 37 13C37 13.3729 36.9815 13.7409 36.9455 14.1032Z", fill: "#FF4835",
|
|
1353
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M36.9455 14.1032L36.817 15.3969L37.9471 16.0396C40.3719 17.4183 42 20.0203 42 23C42 27.4183 38.4183 31 34 31H27V33H34C39.5228 33 44 28.5228 44 23C44 19.2721 41.9601 16.0207 38.9357 14.301C38.9782 13.8731 39 13.4391 39 13C39 5.8203 33.1797 0 26 0C20.9109 0 16.5048 2.92423 14.3703 7.18407C13.7656 7.06333 13.1402 7 12.5 7C7.25329 7 3 11.2533 3 16.5C3 16.986 3.03649 17.4634 3.10688 17.9297C1.20992 19.4886 0 21.853 0 24.5C0 29.0266 3.53831 32.7267 8 32.9855V33H16V31H8.30726L8.11582 30.9889C4.70574 30.7911 2 27.9608 2 24.5C2 22.4766 2.92218 20.6702 4.37669 19.4749L5.25394 18.754L5.08448 17.6312C5.02895 17.2634 5 16.8857 5 16.5C5 12.3579 8.35786 9 12.5 9C13.008 9 13.5023 9.05022 13.9788 9.14536L15.4749 9.44408L16.1584 8.08002C17.967 4.47067 21.6968 2 26 2C32.0751 2 37 6.92487 37 13C37 13.3729 36.9815 13.7409 36.9455 14.1032Z", fill: "white", fillOpacity: "0.1" }),
|
|
1354
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M36.9455 14.1032L36.817 15.3969L37.9471 16.0396C40.3719 17.4183 42 20.0203 42 23C42 27.4183 38.4183 31 34 31H27V33H34C39.5228 33 44 28.5228 44 23C44 19.2721 41.9601 16.0207 38.9357 14.301C38.9782 13.8731 39 13.4391 39 13C39 5.8203 33.1797 0 26 0C20.9109 0 16.5048 2.92423 14.3703 7.18407C13.7656 7.06333 13.1402 7 12.5 7C7.25329 7 3 11.2533 3 16.5C3 16.986 3.03649 17.4634 3.10688 17.9297C1.20992 19.4886 0 21.853 0 24.5C0 29.0266 3.53831 32.7267 8 32.9855V33H16V31H8.30726L8.11582 30.9889C4.70574 30.7911 2 27.9608 2 24.5C2 22.4766 2.92218 20.6702 4.37669 19.4749L5.25394 18.754L5.08448 17.6312C5.02895 17.2634 5 16.8857 5 16.5C5 12.3579 8.35786 9 12.5 9C13.008 9 13.5023 9.05022 13.9788 9.14536L15.4749 9.44408L16.1584 8.08002C17.967 4.47067 21.6968 2 26 2C32.0751 2 37 6.92487 37 13C37 13.3729 36.9815 13.7409 36.9455 14.1032Z", fill: "#FF4835", fillOpacity: "0.01" }))));
|
|
1355
1355
|
}
|
|
1356
1356
|
|
|
1357
1357
|
function Icon(_a) {
|
|
@@ -10149,11 +10149,11 @@ function getEmail(_a) {
|
|
|
10149
10149
|
}
|
|
10150
10150
|
|
|
10151
10151
|
function createForm(_a) {
|
|
10152
|
-
var form = _a.form;
|
|
10152
|
+
var form = _a.form, type = _a.type;
|
|
10153
10153
|
return callApi({
|
|
10154
10154
|
url: uiKitConfig.GATEWAY_PROXY + "/forms",
|
|
10155
10155
|
fetchOptions: {
|
|
10156
|
-
body: __assign(__assign({}, form), { type:
|
|
10156
|
+
body: __assign(__assign({}, form), { type: type }),
|
|
10157
10157
|
method: EMethods.post
|
|
10158
10158
|
}
|
|
10159
10159
|
});
|
|
@@ -10235,9 +10235,9 @@ function renderForm(_a) {
|
|
|
10235
10235
|
});
|
|
10236
10236
|
}
|
|
10237
10237
|
function renderPublicHtmlForm(_a) {
|
|
10238
|
-
var
|
|
10238
|
+
var token = _a.token;
|
|
10239
10239
|
return callApi({
|
|
10240
|
-
url: uiKitConfig.GATEWAY_PROXY + "/forms/" +
|
|
10240
|
+
url: uiKitConfig.GATEWAY_PROXY + "/forms/" + token + "/render-html",
|
|
10241
10241
|
fetchOptions: {
|
|
10242
10242
|
method: EMethods.get
|
|
10243
10243
|
}
|
|
@@ -17534,19 +17534,22 @@ var FormsFactory = /** @class */ (function () {
|
|
|
17534
17534
|
};
|
|
17535
17535
|
FormsFactory.create = function (_a) {
|
|
17536
17536
|
return __awaiter(this, arguments, void 0, function (_b) {
|
|
17537
|
-
var form = _b.form;
|
|
17537
|
+
var form = _b.form, type = _b.type;
|
|
17538
17538
|
return __generator(this, function (_c) {
|
|
17539
|
-
return [2 /*return*/, createForm({ form: form }).then(function (data) {
|
|
17540
|
-
|
|
17539
|
+
return [2 /*return*/, createForm({ form: form, type: type }).then(function (data) {
|
|
17540
|
+
if ("enabled" in data.data) {
|
|
17541
|
+
return new EnhancedFormModel(data.data);
|
|
17542
|
+
}
|
|
17543
|
+
return new FormModel(data.data);
|
|
17541
17544
|
})];
|
|
17542
17545
|
});
|
|
17543
17546
|
});
|
|
17544
17547
|
};
|
|
17545
17548
|
FormsFactory.renderPublic = function (_a) {
|
|
17546
17549
|
return __awaiter(this, arguments, void 0, function (_b) {
|
|
17547
|
-
var
|
|
17550
|
+
var token = _b.token;
|
|
17548
17551
|
return __generator(this, function (_c) {
|
|
17549
|
-
return [2 /*return*/, renderPublicHtmlForm({
|
|
17552
|
+
return [2 /*return*/, renderPublicHtmlForm({ token: token }).then(function (data) {
|
|
17550
17553
|
return data;
|
|
17551
17554
|
})];
|
|
17552
17555
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EnhancedFormModel, FormModel } from "../../models";
|
|
2
2
|
import { TGenericListParams } from "../../types";
|
|
3
|
-
export declare function createForm({ form }: {
|
|
4
|
-
form: Partial<EnhancedFormModel>;
|
|
3
|
+
export declare function createForm({ form, type }: {
|
|
4
|
+
form: Partial<EnhancedFormModel | FormModel>;
|
|
5
|
+
type: "enhanced" | "basic";
|
|
5
6
|
}): Promise<any>;
|
|
6
7
|
export declare function listForms({ useImpersonationTree, ...options }: TGenericListParams): Promise<any>;
|
|
7
8
|
export declare function patchForm({ id, data }: {
|
|
@@ -27,8 +28,7 @@ export declare function renderForm({ id, published }: {
|
|
|
27
28
|
id: string;
|
|
28
29
|
published: boolean;
|
|
29
30
|
}): Promise<any>;
|
|
30
|
-
export declare function renderPublicHtmlForm({
|
|
31
|
-
id: string;
|
|
31
|
+
export declare function renderPublicHtmlForm({ token }: {
|
|
32
32
|
token: string;
|
|
33
33
|
}): Promise<any>;
|
|
34
34
|
export * from "./types";
|