@uxf/cms 11.73.0 → 11.74.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/package.json +6 -6
- package/translations/translations.d.ts +429 -0
- package/translations/translations.js +31 -0
- package/api/index.d.ts +0 -165
- package/api/index.js +0 -100
- package/api/swr.d.ts +0 -76
- package/api/swr.js +0 -43
- package/config/container.d.ts +0 -29
- package/config/container.js +0 -24
- package/config/index.d.ts +0 -2
- package/config/index.js +0 -6
- package/content-builder/content-builder-body.d.ts +0 -6
- package/content-builder/content-builder-body.js +0 -10
- package/content-builder/content-builder-header.d.ts +0 -7
- package/content-builder/content-builder-header.js +0 -13
- package/content-builder/content-builder-root.d.ts +0 -11
- package/content-builder/content-builder-root.js +0 -13
- package/content-builder/content-builder-sidebar.d.ts +0 -7
- package/content-builder/content-builder-sidebar.js +0 -12
- package/content-builder/content-builder.d.ts +0 -14
- package/content-builder/content-builder.js +0 -55
- package/content-builder/forms/content-builder-basic-form.d.ts +0 -10
- package/content-builder/forms/content-builder-basic-form.js +0 -47
- package/content-builder/forms/content-builder-seo-form.d.ts +0 -10
- package/content-builder/forms/content-builder-seo-form.js +0 -20
- package/content-builder/index.d.ts +0 -4
- package/content-builder/index.js +0 -20
- package/content-builder/map-content-response-to-form-data.d.ts +0 -3
- package/content-builder/map-content-response-to-form-data.js +0 -44
- package/content-builder/map-form-data-to-content-request.d.ts +0 -2
- package/content-builder/map-form-data-to-content-request.js +0 -28
- package/content-builder/types.d.ts +0 -186
- package/content-builder/types.js +0 -2
- package/content-builder/use-content-builder-form-api.d.ts +0 -3
- package/content-builder/use-content-builder-form-api.js +0 -7
- package/context/cms-provider.d.ts +0 -7
- package/context/cms-provider.js +0 -18
- package/deprecated/api/api-client.d.ts +0 -15
- package/deprecated/api/api-client.js +0 -86
- package/deprecated/hoc/with-authenticate.d.ts +0 -6
- package/deprecated/hoc/with-authenticate.js +0 -61
- package/deprecated/redux/configure-store.d.ts +0 -3
- package/deprecated/redux/configure-store.js +0 -16
- package/deprecated/redux/entities/actions.d.ts +0 -30
- package/deprecated/redux/entities/actions.js +0 -15
- package/deprecated/redux/entities/index.d.ts +0 -2
- package/deprecated/redux/entities/index.js +0 -18
- package/deprecated/redux/entities/reducer.d.ts +0 -3
- package/deprecated/redux/entities/reducer.js +0 -36
- package/deprecated/redux/entities/selectors.d.ts +0 -10
- package/deprecated/redux/entities/selectors.js +0 -16
- package/deprecated/redux/index.d.ts +0 -3
- package/deprecated/redux/index.js +0 -22
- package/deprecated/redux/redux-helper.d.ts +0 -15
- package/deprecated/redux/redux-helper.js +0 -6
- package/deprecated/redux/types.d.ts +0 -7
- package/deprecated/redux/types.js +0 -2
- package/deprecated/redux/user/actions.d.ts +0 -19
- package/deprecated/redux/user/actions.js +0 -14
- package/deprecated/redux/user/index.d.ts +0 -2
- package/deprecated/redux/user/index.js +0 -18
- package/deprecated/redux/user/reducer.d.ts +0 -3
- package/deprecated/redux/user/reducer.js +0 -21
- package/deprecated/redux/user/selectors.d.ts +0 -3
- package/deprecated/redux/user/selectors.js +0 -5
- package/deprecated/redux/with-redux-store.d.ts +0 -1
- package/deprecated/redux/with-redux-store.js +0 -70
- package/deprecated/security/cms-authorizator.d.ts +0 -3
- package/deprecated/security/cms-authorizator.js +0 -8
- package/deprecated/types/app.d.ts +0 -6
- package/deprecated/types/app.js +0 -2
- package/deprecated/types/form.d.ts +0 -25
- package/deprecated/types/form.js +0 -16
- package/errors/BadRequestError.d.ts +0 -18
- package/errors/BadRequestError.js +0 -14
- package/errors/ForbiddenError.d.ts +0 -4
- package/errors/ForbiddenError.js +0 -13
- package/errors/NetworkError.d.ts +0 -4
- package/errors/NetworkError.js +0 -13
- package/errors/UnauthorizedError.d.ts +0 -4
- package/errors/UnauthorizedError.js +0 -13
- package/errors/ValidationError.d.ts +0 -7
- package/errors/ValidationError.js +0 -17
- package/form-renderer/field/content-dynamic.d.ts +0 -8
- package/form-renderer/field/content-dynamic.js +0 -15
- package/form-renderer/field/content.d.ts +0 -5
- package/form-renderer/field/content.js +0 -38
- package/forms/change-password-form/change-password-form.d.ts +0 -3
- package/forms/change-password-form/change-password-form.js +0 -26
- package/forms/change-password-form/index.d.ts +0 -2
- package/forms/change-password-form/index.js +0 -18
- package/forms/change-password-form/types.d.ts +0 -13
- package/forms/change-password-form/types.js +0 -2
- package/forms/components/wysiwyg-input/index.d.ts +0 -1
- package/forms/components/wysiwyg-input/index.js +0 -17
- package/forms/components/wysiwyg-input/wysiwyg-input.d.ts +0 -26
- package/forms/components/wysiwyg-input/wysiwyg-input.js +0 -83
- package/forms/forgotten-password-form/forgotten-password-form.d.ts +0 -3
- package/forms/forgotten-password-form/forgotten-password-form.js +0 -50
- package/forms/forgotten-password-form/index.d.ts +0 -2
- package/forms/forgotten-password-form/index.js +0 -18
- package/forms/forgotten-password-form/types.d.ts +0 -10
- package/forms/forgotten-password-form/types.js +0 -2
- package/forms/invite-user-form/index.d.ts +0 -2
- package/forms/invite-user-form/index.js +0 -18
- package/forms/invite-user-form/invite-user-form.d.ts +0 -3
- package/forms/invite-user-form/invite-user-form.js +0 -31
- package/forms/invite-user-form/types.d.ts +0 -15
- package/forms/invite-user-form/types.js +0 -2
- package/forms/login-form/index.d.ts +0 -2
- package/forms/login-form/index.js +0 -18
- package/forms/login-form/login-form.d.ts +0 -3
- package/forms/login-form/login-form.js +0 -49
- package/forms/login-form/types.d.ts +0 -11
- package/forms/login-form/types.js +0 -2
- package/forms/renew-password-form/index.d.ts +0 -2
- package/forms/renew-password-form/index.js +0 -18
- package/forms/renew-password-form/renew-password-form.d.ts +0 -3
- package/forms/renew-password-form/renew-password-form.js +0 -48
- package/forms/renew-password-form/types.d.ts +0 -11
- package/forms/renew-password-form/types.js +0 -2
- package/lib/api/create-axios-instance.d.ts +0 -6
- package/lib/api/create-axios-instance.js +0 -17
- package/lib/api/create-axios-request.d.ts +0 -3
- package/lib/api/create-axios-request.js +0 -39
- package/lib/api/create-use-axios-request.d.ts +0 -5
- package/lib/api/create-use-axios-request.js +0 -35
- package/lib/api/index.d.ts +0 -2
- package/lib/api/index.js +0 -19
- package/lib/api/types.d.ts +0 -18
- package/lib/api/types.js +0 -2
- package/lib/layout/breadcrumbs.d.ts +0 -9
- package/lib/layout/breadcrumbs.js +0 -21
- package/lib/layout/index.d.ts +0 -3
- package/lib/layout/index.js +0 -19
- package/lib/layout/layout-container.d.ts +0 -3
- package/lib/layout/layout-container.js +0 -22
- package/lib/layout/layout.d.ts +0 -3
- package/lib/layout/layout.js +0 -47
- package/lib/layout/sidebar.d.ts +0 -3
- package/lib/layout/sidebar.js +0 -77
- package/lib/layout/styles.d.ts +0 -1
- package/lib/layout/styles.js +0 -4
- package/lib/layout/types.d.ts +0 -36
- package/lib/layout/types.js +0 -2
- package/lib/login-layout/index.d.ts +0 -2
- package/lib/login-layout/index.js +0 -18
- package/lib/login-layout/login-layout.d.ts +0 -3
- package/lib/login-layout/login-layout.js +0 -19
- package/lib/login-layout/types.d.ts +0 -9
- package/lib/login-layout/types.js +0 -2
- package/lib/menu/active-item-resolver.d.ts +0 -7
- package/lib/menu/active-item-resolver.js +0 -42
- package/lib/menu/factory.d.ts +0 -10
- package/lib/menu/factory.js +0 -40
- package/lib/menu/index.d.ts +0 -5
- package/lib/menu/index.js +0 -21
- package/lib/menu/mobile-bar.d.ts +0 -8
- package/lib/menu/mobile-bar.js +0 -54
- package/lib/menu/model.d.ts +0 -56
- package/lib/menu/model.js +0 -112
- package/lib/menu/types.d.ts +0 -5
- package/lib/menu/types.js +0 -2
- package/lib/menu/ui/list-item/index.d.ts +0 -2
- package/lib/menu/ui/list-item/index.js +0 -18
- package/lib/menu/ui/list-item/list-item.d.ts +0 -3
- package/lib/menu/ui/list-item/list-item.js +0 -37
- package/lib/menu/ui/list-item/types.d.ts +0 -19
- package/lib/menu/ui/list-item/types.js +0 -2
- package/lib/menu/ui/menu-custom-item.d.ts +0 -6
- package/lib/menu/ui/menu-custom-item.js +0 -17
- package/lib/menu/ui/menu-item.d.ts +0 -6
- package/lib/menu/ui/menu-item.js +0 -55
- package/lib/menu/ui/menu-super-section-item.d.ts +0 -6
- package/lib/menu/ui/menu-super-section-item.js +0 -40
- package/lib/menu/ui/menu.d.ts +0 -6
- package/lib/menu/ui/menu.js +0 -37
- package/lib/menu/ui/sub-menu/sub-menu-item.d.ts +0 -7
- package/lib/menu/ui/sub-menu/sub-menu-item.js +0 -23
- package/lib/menu/ui/sub-menu/sub-menu-mobile.d.ts +0 -8
- package/lib/menu/ui/sub-menu/sub-menu-mobile.js +0 -48
- package/lib/menu/ui/sub-menu/sub-menu.d.ts +0 -7
- package/lib/menu/ui/sub-menu/sub-menu.js +0 -46
- package/lib/menu/ui/sub-menu/use-sub-menu.d.ts +0 -49
- package/lib/menu/ui/sub-menu/use-sub-menu.js +0 -45
- package/lib/menu/ui/user-menu.d.ts +0 -6
- package/lib/menu/ui/user-menu.js +0 -53
- package/pages/content-builder/components/form-content.d.ts +0 -12
- package/pages/content-builder/components/form-content.js +0 -64
- package/pages/content-builder/components/form-root-fields.d.ts +0 -16
- package/pages/content-builder/components/form-root-fields.js +0 -62
- package/pages/content-builder/components/form.d.ts +0 -12
- package/pages/content-builder/components/form.js +0 -83
- package/pages/content-builder/components/header.d.ts +0 -6
- package/pages/content-builder/components/header.js +0 -16
- package/pages/content-builder/constants.d.ts +0 -6
- package/pages/content-builder/constants.js +0 -10
- package/pages/content-builder/content/feature-section.d.ts +0 -17
- package/pages/content-builder/content/feature-section.js +0 -59
- package/pages/content-builder/content/gallery.d.ts +0 -9
- package/pages/content-builder/content/gallery.js +0 -27
- package/pages/content-builder/content/hero-section.d.ts +0 -12
- package/pages/content-builder/content/hero-section.js +0 -31
- package/pages/content-builder/content/people.d.ts +0 -17
- package/pages/content-builder/content/people.js +0 -57
- package/pages/content-builder/content/wysiwyg.d.ts +0 -15
- package/pages/content-builder/content/wysiwyg.js +0 -28
- package/pages/content-builder/content-builder-page.d.ts +0 -3
- package/pages/content-builder/content-builder-page.js +0 -107
- package/pages/content-builder/content-field.d.ts +0 -10
- package/pages/content-builder/content-field.js +0 -62
- package/pages/content-builder/content-header.d.ts +0 -3
- package/pages/content-builder/content-header.js +0 -53
- package/pages/content-builder/context/details-visibility-context.d.ts +0 -4
- package/pages/content-builder/context/details-visibility-context.js +0 -58
- package/pages/content-builder/hooks/use-sortable.d.ts +0 -15
- package/pages/content-builder/hooks/use-sortable.js +0 -57
- package/pages/content-builder/index.d.ts +0 -5
- package/pages/content-builder/index.js +0 -21
- package/pages/content-builder/mapper.d.ts +0 -4
- package/pages/content-builder/mapper.js +0 -69
- package/pages/content-builder/types.d.ts +0 -94
- package/pages/content-builder/types.js +0 -2
- package/pages/forgotten-password-page/forgotten-password-page.d.ts +0 -5
- package/pages/forgotten-password-page/forgotten-password-page.js +0 -49
- package/pages/forgotten-password-page/index.d.ts +0 -2
- package/pages/forgotten-password-page/index.js +0 -18
- package/pages/forgotten-password-page/types.d.ts +0 -11
- package/pages/forgotten-password-page/types.js +0 -2
- package/pages/grid-page/get-initial-props-helper.d.ts +0 -4
- package/pages/grid-page/get-initial-props-helper.js +0 -20
- package/pages/grid-page/grid-page.d.ts +0 -6
- package/pages/grid-page/grid-page.js +0 -159
- package/pages/grid-page/index.d.ts +0 -1
- package/pages/grid-page/index.js +0 -5
- package/pages/grid-page/types.d.ts +0 -65
- package/pages/grid-page/types.js +0 -2
- package/pages/grid-page/use-hidden-columns.d.ts +0 -4
- package/pages/grid-page/use-hidden-columns.js +0 -17
- package/pages/invite-user-page/index.d.ts +0 -2
- package/pages/invite-user-page/index.js +0 -18
- package/pages/invite-user-page/invite-user-page.d.ts +0 -2
- package/pages/invite-user-page/invite-user-page.js +0 -57
- package/pages/invite-user-page/types.d.ts +0 -12
- package/pages/invite-user-page/types.js +0 -2
- package/pages/login-page/index.d.ts +0 -2
- package/pages/login-page/index.js +0 -18
- package/pages/login-page/login-page.d.ts +0 -5
- package/pages/login-page/login-page.js +0 -80
- package/pages/login-page/types.d.ts +0 -21
- package/pages/login-page/types.js +0 -2
- package/pages/renew-password-page/index.d.ts +0 -2
- package/pages/renew-password-page/index.js +0 -18
- package/pages/renew-password-page/renew-password-page.d.ts +0 -9
- package/pages/renew-password-page/renew-password-page.js +0 -53
- package/pages/renew-password-page/types.d.ts +0 -14
- package/pages/renew-password-page/types.js +0 -2
- package/security/restricted-page.d.ts +0 -9
- package/security/restricted-page.js +0 -38
- package/security/use-logged-user.d.ts +0 -5
- package/security/use-logged-user.js +0 -17
- package/ui/avatar/avatar.d.ts +0 -11
- package/ui/avatar/avatar.js +0 -47
- package/ui/avatar/get-avatar-user-letters.d.ts +0 -1
- package/ui/avatar/get-avatar-user-letters.js +0 -18
- package/ui/avatar/index.d.ts +0 -3
- package/ui/avatar/index.js +0 -5
- package/ui/avatar/theme.d.ts +0 -11
- package/ui/avatar/theme.js +0 -2
- package/ui/copy-to-clipboard/copy-to-clipboard.d.ts +0 -3
- package/ui/copy-to-clipboard/copy-to-clipboard.js +0 -45
- package/ui/copy-to-clipboard/index.d.ts +0 -2
- package/ui/copy-to-clipboard/index.js +0 -18
- package/ui/copy-to-clipboard/types.d.ts +0 -7
- package/ui/copy-to-clipboard/types.js +0 -2
- package/ui/copy-to-clipboard-button/copy-to-clipboard-button.d.ts +0 -3
- package/ui/copy-to-clipboard-button/copy-to-clipboard-button.js +0 -44
- package/ui/copy-to-clipboard-button/index.d.ts +0 -2
- package/ui/copy-to-clipboard-button/index.js +0 -18
- package/ui/copy-to-clipboard-button/types.d.ts +0 -6
- package/ui/copy-to-clipboard-button/types.js +0 -2
- package/ui/index.d.ts +0 -1
- package/ui/index.js +0 -6
- package/ui/tw-tokens/tw-box-shadow.d.ts +0 -12
- package/ui/tw-tokens/tw-box-shadow.js +0 -15
- package/ui/tw-tokens/tw-colors.d.ts +0 -475
- package/ui/tw-tokens/tw-colors.js +0 -474
- package/ui/tw-tokens/tw-containers.d.ts +0 -8
- package/ui/tw-tokens/tw-containers.js +0 -5
- package/ui/tw-tokens/tw-font-size.d.ts +0 -55
- package/ui/tw-tokens/tw-font-size.js +0 -32
- package/ui/tw-tokens/tw-font-weight.d.ts +0 -12
- package/ui/tw-tokens/tw-font-weight.js +0 -15
- package/ui/tw-tokens/tw-line-height.d.ts +0 -17
- package/ui/tw-tokens/tw-line-height.js +0 -20
- package/ui/tw-tokens/tw-screens.d.ts +0 -8
- package/ui/tw-tokens/tw-screens.js +0 -5
- package/ui/tw-tokens/tw-spacing.d.ts +0 -39
- package/ui/tw-tokens/tw-spacing.js +0 -42
- package/ui/tw-tokens/tw-z-index.d.ts +0 -21
- package/ui/tw-tokens/tw-z-index.js +0 -24
- package/ui/widget/index.d.ts +0 -2
- package/ui/widget/index.js +0 -18
- package/ui/widget/types.d.ts +0 -6
- package/ui/widget/types.js +0 -2
- package/ui/widget/widget.d.ts +0 -3
- package/ui/widget/widget.js +0 -15
- package/utils/remove-confirm-handler.d.ts +0 -1
- package/utils/remove-confirm-handler.js +0 -26
- package/utils/use-viewport-height.d.ts +0 -3
- package/utils/use-viewport-height.js +0 -28
@@ -1,28 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.mapFormDataToContentRequest = mapFormDataToContentRequest;
|
4
|
-
function mapFormDataToContentRequest(values) {
|
5
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
6
|
-
return {
|
7
|
-
author: (_b = (_a = values.author) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null,
|
8
|
-
category: (_c = values.category) === null || _c === void 0 ? void 0 : _c.id,
|
9
|
-
content: values.content,
|
10
|
-
hidden: !values.isActive,
|
11
|
-
image: (_e = (_d = values.image) === null || _d === void 0 ? void 0 : _d.id) !== null && _e !== void 0 ? _e : null,
|
12
|
-
name: (_f = values.name) !== null && _f !== void 0 ? _f : "",
|
13
|
-
parent: (_g = values.parent) === null || _g === void 0 ? void 0 : _g.id,
|
14
|
-
perex: (_h = values.perex) !== null && _h !== void 0 ? _h : "",
|
15
|
-
publishedAt: values.publishedAt,
|
16
|
-
seo: {
|
17
|
-
description: (_j = values.seo.description) !== null && _j !== void 0 ? _j : "",
|
18
|
-
name: values.seo.name,
|
19
|
-
ogDescription: (_k = values.seo.ogDescription) !== null && _k !== void 0 ? _k : "",
|
20
|
-
ogImage: (_m = (_l = values.seo.ogImage) === null || _l === void 0 ? void 0 : _l.id) !== null && _m !== void 0 ? _m : null,
|
21
|
-
ogTitle: (_o = values.seo.ogTitle) !== null && _o !== void 0 ? _o : "",
|
22
|
-
title: (_p = values.seo.title) !== null && _p !== void 0 ? _p : "",
|
23
|
-
},
|
24
|
-
tags: (_r = (_q = values.tags) === null || _q === void 0 ? void 0 : _q.map((tag) => tag.id)) !== null && _r !== void 0 ? _r : [],
|
25
|
-
type: (_s = values.type) !== null && _s !== void 0 ? _s : "",
|
26
|
-
visibilityLevel: (_t = values.visibilityLevel) !== null && _t !== void 0 ? _t : "PRIVATE",
|
27
|
-
};
|
28
|
-
}
|
@@ -1,186 +0,0 @@
|
|
1
|
-
import { CheckboxInputValue } from "@uxf/form/checkbox-input";
|
2
|
-
import { ComboboxValue } from "@uxf/form/combobox";
|
3
|
-
import { DatetimePickerInputValue } from "@uxf/form/datetime-picker-input";
|
4
|
-
import { FileInputValue } from "@uxf/form/file-input";
|
5
|
-
import { MultiComboboxValue } from "@uxf/form/multi-combobox";
|
6
|
-
import { SelectValue } from "@uxf/form/select";
|
7
|
-
import { TextInputValue } from "@uxf/form/text-input";
|
8
|
-
import { TextareaValue } from "@uxf/form/textarea";
|
9
|
-
import { SelectOption } from "@uxf/ui/select";
|
10
|
-
export type ContentBuilderFormData = {
|
11
|
-
authorText: TextInputValue;
|
12
|
-
author: ComboboxValue<number>;
|
13
|
-
category: ComboboxValue<number>;
|
14
|
-
content: {
|
15
|
-
data: any[];
|
16
|
-
search: string;
|
17
|
-
};
|
18
|
-
image: FileInputValue;
|
19
|
-
isActive: CheckboxInputValue;
|
20
|
-
name: TextInputValue;
|
21
|
-
parent: ComboboxValue<number>;
|
22
|
-
perex: TextareaValue;
|
23
|
-
publishedAt: DatetimePickerInputValue;
|
24
|
-
seo: {
|
25
|
-
description: TextInputValue;
|
26
|
-
name: TextInputValue;
|
27
|
-
ogDescription: TextInputValue;
|
28
|
-
ogImage: FileInputValue;
|
29
|
-
ogTitle: TextInputValue;
|
30
|
-
title: TextInputValue;
|
31
|
-
};
|
32
|
-
tags: MultiComboboxValue<number>;
|
33
|
-
type: SelectValue<string>;
|
34
|
-
visibilityLevel: SelectValue<VisibilityLevel>;
|
35
|
-
};
|
36
|
-
export type FieldsConfiguration = {
|
37
|
-
parent?: {
|
38
|
-
autocomplete?: Autocomplete;
|
39
|
-
};
|
40
|
-
type?: {
|
41
|
-
options?: SelectOption[];
|
42
|
-
isReadOnly?: boolean;
|
43
|
-
};
|
44
|
-
publishedAt?: {
|
45
|
-
isHidden?: boolean;
|
46
|
-
};
|
47
|
-
perex?: {
|
48
|
-
isHidden?: boolean;
|
49
|
-
};
|
50
|
-
authorText?: {
|
51
|
-
isHidden?: boolean;
|
52
|
-
};
|
53
|
-
author?: {
|
54
|
-
autocomplete?: Autocomplete;
|
55
|
-
isHidden?: boolean;
|
56
|
-
};
|
57
|
-
category?: {
|
58
|
-
autocomplete?: Autocomplete;
|
59
|
-
isHidden?: boolean;
|
60
|
-
};
|
61
|
-
tags?: {
|
62
|
-
autocomplete?: Autocomplete;
|
63
|
-
isHidden?: boolean;
|
64
|
-
};
|
65
|
-
image?: {
|
66
|
-
isHidden?: boolean;
|
67
|
-
};
|
68
|
-
visibilityLevel?: {
|
69
|
-
isHidden?: boolean;
|
70
|
-
};
|
71
|
-
isActive?: {
|
72
|
-
isHidden?: boolean;
|
73
|
-
};
|
74
|
-
seo?: {
|
75
|
-
isHidden?: boolean;
|
76
|
-
name?: {
|
77
|
-
isHidden?: boolean;
|
78
|
-
};
|
79
|
-
title?: {
|
80
|
-
isHidden?: boolean;
|
81
|
-
};
|
82
|
-
description?: {
|
83
|
-
isHidden?: boolean;
|
84
|
-
};
|
85
|
-
ogTitle?: {
|
86
|
-
isHidden?: boolean;
|
87
|
-
};
|
88
|
-
ogDescription?: {
|
89
|
-
isHidden?: boolean;
|
90
|
-
};
|
91
|
-
ogImage?: {
|
92
|
-
isHidden?: boolean;
|
93
|
-
};
|
94
|
-
};
|
95
|
-
};
|
96
|
-
export type VisibilityLevel = "PUBLIC" | "PUBLIC_WITHOUT_SITEMAP" | "PRIVATE";
|
97
|
-
export interface AutocompleteResponse {
|
98
|
-
id: number;
|
99
|
-
label: string;
|
100
|
-
}
|
101
|
-
export interface StorageImageResponse {
|
102
|
-
id: number;
|
103
|
-
uuid: string;
|
104
|
-
type: string;
|
105
|
-
extension: string;
|
106
|
-
name: string;
|
107
|
-
namespace: string;
|
108
|
-
width: number;
|
109
|
-
height: number;
|
110
|
-
size: number;
|
111
|
-
createdAt: string;
|
112
|
-
fileType: "image";
|
113
|
-
}
|
114
|
-
interface ContentSeo {
|
115
|
-
name: string | null;
|
116
|
-
title: string;
|
117
|
-
description: string;
|
118
|
-
ogTitle: string;
|
119
|
-
ogDescription: string;
|
120
|
-
ogImage: number | null;
|
121
|
-
}
|
122
|
-
interface ContentSeoResponse {
|
123
|
-
name: string | null;
|
124
|
-
title: string;
|
125
|
-
description: string;
|
126
|
-
ogTitle: string;
|
127
|
-
ogDescription: string;
|
128
|
-
ogImage: StorageImageResponse | null;
|
129
|
-
}
|
130
|
-
export interface ContentLite {
|
131
|
-
data: Array<any>;
|
132
|
-
search: string;
|
133
|
-
}
|
134
|
-
export interface ContentRequestBody {
|
135
|
-
type: string;
|
136
|
-
name: string;
|
137
|
-
perex: string;
|
138
|
-
seo: ContentSeo;
|
139
|
-
visibilityLevel: VisibilityLevel;
|
140
|
-
hidden: boolean;
|
141
|
-
image: number | null;
|
142
|
-
publishedAt: string | null;
|
143
|
-
author: number | null;
|
144
|
-
content: ContentLite;
|
145
|
-
tags: Array<number>;
|
146
|
-
parent?: number | null;
|
147
|
-
category?: number | null;
|
148
|
-
}
|
149
|
-
export interface ContentCategoryResponse {
|
150
|
-
id: number;
|
151
|
-
name: string;
|
152
|
-
}
|
153
|
-
export interface ContentPreviewResponse {
|
154
|
-
id: number;
|
155
|
-
name: string;
|
156
|
-
label: string;
|
157
|
-
}
|
158
|
-
export interface ContentAuthorResponse {
|
159
|
-
id: number;
|
160
|
-
firstName: string;
|
161
|
-
surname: string;
|
162
|
-
avatar: StorageImageResponse | null;
|
163
|
-
}
|
164
|
-
export interface ContentResponse {
|
165
|
-
id: number;
|
166
|
-
type: string;
|
167
|
-
name: string;
|
168
|
-
perex: string;
|
169
|
-
seo: ContentSeoResponse;
|
170
|
-
visibilityLevel: VisibilityLevel;
|
171
|
-
hidden: boolean;
|
172
|
-
image: StorageImageResponse | null;
|
173
|
-
publishedAt: string | null;
|
174
|
-
author: ContentAuthorResponse | null;
|
175
|
-
parent: ContentPreviewResponse | null;
|
176
|
-
category: ContentCategoryResponse | null;
|
177
|
-
content: Array<any>;
|
178
|
-
tags: Array<AutocompleteResponse>;
|
179
|
-
createdAt: string;
|
180
|
-
updatedAt: string;
|
181
|
-
}
|
182
|
-
export type Autocomplete = (value: string) => Promise<Array<{
|
183
|
-
id: string | number;
|
184
|
-
label: string;
|
185
|
-
}>>;
|
186
|
-
export {};
|
package/content-builder/types.js
DELETED
@@ -1,3 +0,0 @@
|
|
1
|
-
import { UseFormProps } from "react-hook-form";
|
2
|
-
import { ContentBuilderFormData } from "./types";
|
3
|
-
export declare function useContentBuilderFormApi(props: UseFormProps<ContentBuilderFormData>): import("react-hook-form").UseFormReturn<ContentBuilderFormData, any, undefined>;
|
@@ -1,7 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.useContentBuilderFormApi = useContentBuilderFormApi;
|
4
|
-
const react_hook_form_1 = require("react-hook-form");
|
5
|
-
function useContentBuilderFormApi(props) {
|
6
|
-
return (0, react_hook_form_1.useForm)(props);
|
7
|
-
}
|
package/context/cms-provider.js
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.CmsProvider = CmsProvider;
|
7
|
-
const react_1 = __importDefault(require("react"));
|
8
|
-
const swr_1 = require("swr");
|
9
|
-
const fetcher = (input) => fetch(input).then((res) => res.json());
|
10
|
-
function CmsProvider(props) {
|
11
|
-
var _a, _b, _c, _d;
|
12
|
-
const swrConfig = {
|
13
|
-
...props.swrConfig,
|
14
|
-
provider: (_b = (_a = props.swrConfig) === null || _a === void 0 ? void 0 : _a.provider) !== null && _b !== void 0 ? _b : (() => new Map()),
|
15
|
-
fetcher: (_d = (_c = props.swrConfig) === null || _c === void 0 ? void 0 : _c.fetcher) !== null && _d !== void 0 ? _d : fetcher,
|
16
|
-
};
|
17
|
-
return react_1.default.createElement(swr_1.SWRConfig, { value: swrConfig }, props.children);
|
18
|
-
}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { AxiosRequestConfig } from "axios";
|
2
|
-
import { NextPageContext } from "next";
|
3
|
-
export type ContextType = NextPageContext | null;
|
4
|
-
/** @deprecated */
|
5
|
-
export default class ApiClient {
|
6
|
-
private client;
|
7
|
-
constructor(basePath?: string, baseUrl?: string);
|
8
|
-
private request;
|
9
|
-
get<RESPONSE = any>(ctx: ContextType, url: string, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RESPONSE, any>>;
|
10
|
-
delete<RESPONSE = any>(ctx: ContextType, url: string, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RESPONSE, any>>;
|
11
|
-
head<RESPONSE = any>(ctx: ContextType, url: string, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RESPONSE, any>>;
|
12
|
-
post<REQUEST extends object = Record<string, any>, RESPONSE = any>(ctx: ContextType, url: string, data: REQUEST, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RESPONSE, any>>;
|
13
|
-
put<REQUEST extends object = Record<string, any>, RESPONSE = any>(ctx: ContextType, url: string, data: REQUEST, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RESPONSE, any>>;
|
14
|
-
patch<REQUEST extends object = Record<string, any>, RESPONSE = any>(ctx: ContextType, url: string, data: REQUEST, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RESPONSE, any>>;
|
15
|
-
}
|
@@ -1,86 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
const axios_1 = __importDefault(require("axios"));
|
7
|
-
const ForbiddenError_1 = require("../../errors/ForbiddenError");
|
8
|
-
const NetworkError_1 = require("../../errors/NetworkError");
|
9
|
-
const UnauthorizedError_1 = require("../../errors/UnauthorizedError");
|
10
|
-
const getClient = (options = {}) => {
|
11
|
-
const client = axios_1.default.create(options);
|
12
|
-
// Add a request interceptor
|
13
|
-
client.interceptors.request.use((requestConfig) => requestConfig, (requestError) => {
|
14
|
-
// eslint-disable-next-line no-console
|
15
|
-
console.error(requestError);
|
16
|
-
return Promise.reject(requestError);
|
17
|
-
});
|
18
|
-
// Add a response interceptor
|
19
|
-
client.interceptors.response.use((response) => response, (error) => {
|
20
|
-
if (error.response && error.response.status >= 500) {
|
21
|
-
// eslint-disable-next-line no-console
|
22
|
-
console.error(error);
|
23
|
-
}
|
24
|
-
return Promise.reject(error);
|
25
|
-
});
|
26
|
-
return client;
|
27
|
-
};
|
28
|
-
const addCookiesToHeader = (ctx, headers = {}) => {
|
29
|
-
var _a;
|
30
|
-
return ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.req) === null || _a === void 0 ? void 0 : _a.headers.cookie) ? { ...headers, cookie: ctx.req.headers.cookie } : headers;
|
31
|
-
};
|
32
|
-
const handleError = (error) => {
|
33
|
-
if (error.response) {
|
34
|
-
if (error.response.status === 401) {
|
35
|
-
throw new UnauthorizedError_1.UnauthorizedError();
|
36
|
-
}
|
37
|
-
else if (error.response.status === 403) {
|
38
|
-
throw new ForbiddenError_1.ForbiddenError();
|
39
|
-
}
|
40
|
-
else {
|
41
|
-
throw error;
|
42
|
-
}
|
43
|
-
}
|
44
|
-
else if (error.request) {
|
45
|
-
throw new NetworkError_1.NetworkError();
|
46
|
-
}
|
47
|
-
else {
|
48
|
-
throw error;
|
49
|
-
}
|
50
|
-
};
|
51
|
-
/** @deprecated */
|
52
|
-
class ApiClient {
|
53
|
-
constructor(basePath = "", baseUrl = "") {
|
54
|
-
this.client = getClient({
|
55
|
-
baseURL: `${baseUrl}${basePath}`,
|
56
|
-
});
|
57
|
-
}
|
58
|
-
request(ctx, config) {
|
59
|
-
return this.client
|
60
|
-
.request({
|
61
|
-
...config,
|
62
|
-
headers: addCookiesToHeader(ctx, config.headers),
|
63
|
-
})
|
64
|
-
.then((response) => Promise.resolve(response))
|
65
|
-
.catch((error) => handleError(error));
|
66
|
-
}
|
67
|
-
get(ctx, url, config = {}) {
|
68
|
-
return this.request(ctx, { ...config, url, method: "GET" });
|
69
|
-
}
|
70
|
-
delete(ctx, url, config = {}) {
|
71
|
-
return this.request(ctx, { ...config, url, method: "DELETE" });
|
72
|
-
}
|
73
|
-
head(ctx, url, config = {}) {
|
74
|
-
return this.request(ctx, { ...config, url, method: "HEAD" });
|
75
|
-
}
|
76
|
-
post(ctx, url, data, config = {}) {
|
77
|
-
return this.request(ctx, { ...config, url, method: "POST", data });
|
78
|
-
}
|
79
|
-
put(ctx, url, data, config = {}) {
|
80
|
-
return this.request(ctx, { ...config, url, method: "PUT", data });
|
81
|
-
}
|
82
|
-
patch(ctx, url, data, config = {}) {
|
83
|
-
return this.request(ctx, { ...config, url, method: "PATCH", data });
|
84
|
-
}
|
85
|
-
}
|
86
|
-
exports.default = ApiClient;
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { NextComponentType } from "next";
|
2
|
-
import { IAppContext } from "../types/app";
|
3
|
-
export interface IConfig {
|
4
|
-
allowedRoles?: string[];
|
5
|
-
}
|
6
|
-
export declare const withAuthenticate: <PROPS extends object, INITIAL_PROPS extends object>(config: IConfig) => (Component: any) => NextComponentType<IAppContext, INITIAL_PROPS, PROPS>;
|
@@ -1,61 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
|
-
};
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
-
exports.withAuthenticate = void 0;
|
30
|
-
const react_1 = __importStar(require("react"));
|
31
|
-
const api_1 = require("../../api");
|
32
|
-
const config_1 = require("../../config");
|
33
|
-
const UnauthorizedError_1 = require("../../errors/UnauthorizedError");
|
34
|
-
const user_1 = require("../redux/user");
|
35
|
-
const cms_authorizator_1 = __importDefault(require("../security/cms-authorizator"));
|
36
|
-
// TODO component any
|
37
|
-
const withAuthenticate = (config) => (Component) => {
|
38
|
-
var _a;
|
39
|
-
// eslint-disable-next-line import/no-named-as-default-member
|
40
|
-
return (_a = class extends react_1.Component {
|
41
|
-
static async getInitialProps(ctx) {
|
42
|
-
let user = ctx.reduxStore.getState().user.user;
|
43
|
-
if (!user) {
|
44
|
-
user = config_1.container.has("api.getLoggedUser")
|
45
|
-
? await config_1.container.get("api.getLoggedUser")(ctx)
|
46
|
-
: await (0, api_1.getLoggedUser)(ctx);
|
47
|
-
ctx.reduxStore.dispatch((0, user_1.onUserPersist)(user));
|
48
|
-
}
|
49
|
-
if (config.allowedRoles && !cms_authorizator_1.default.isGranted(config.allowedRoles, user.roles)) {
|
50
|
-
throw new UnauthorizedError_1.UnauthorizedError();
|
51
|
-
}
|
52
|
-
return typeof Component.getInitialProps === "function" ? await Component.getInitialProps(ctx) : {};
|
53
|
-
}
|
54
|
-
render() {
|
55
|
-
return react_1.default.createElement(Component, { ...this.props });
|
56
|
-
}
|
57
|
-
},
|
58
|
-
_a.displayName = "withAuthenticateHOC",
|
59
|
-
_a);
|
60
|
-
}; // TODO!
|
61
|
-
exports.withAuthenticate = withAuthenticate;
|
@@ -1,16 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.initializeStore = void 0;
|
7
|
-
const extension_1 = require("@redux-devtools/extension");
|
8
|
-
const redux_1 = require("redux");
|
9
|
-
const reducer_1 = __importDefault(require("../redux/entities/reducer"));
|
10
|
-
const reducer_2 = __importDefault(require("../redux/user/reducer"));
|
11
|
-
// TODO: create root reducer to have possibility reset store on logout...
|
12
|
-
const initializeStore = (initialState = {}) => (0, redux_1.createStore)((0, redux_1.combineReducers)({
|
13
|
-
entities: reducer_1.default,
|
14
|
-
user: reducer_2.default,
|
15
|
-
}), initialState, (0, extension_1.composeWithDevTools)((0, redux_1.applyMiddleware)()));
|
16
|
-
exports.initializeStore = initializeStore;
|
@@ -1,30 +0,0 @@
|
|
1
|
-
import { Schema } from "@uxf/data-grid";
|
2
|
-
import { EntityMetaSchema } from "../../../api";
|
3
|
-
import { EntityFormSchema } from "../../types/form";
|
4
|
-
import { ActionsUnion } from "../redux-helper";
|
5
|
-
export interface IState {
|
6
|
-
meta: Record<string, EntityMetaSchema>;
|
7
|
-
form: Record<string, EntityFormSchema>;
|
8
|
-
grid: Record<string, Schema<any>>;
|
9
|
-
}
|
10
|
-
export declare const onSetEntityMetaSchemas: (meta: Record<string, EntityMetaSchema>) => import("../redux-helper").IPayloadAction<"entities/SET_META_SCHEMAS", Record<string, EntityMetaSchema>>;
|
11
|
-
export declare const onSetFormSchema: (entityAlias: string, form: EntityFormSchema) => import("../redux-helper").IPayloadAction<"entities/SET_FORM_SCHEMA", {
|
12
|
-
entityAlias: string;
|
13
|
-
form: EntityFormSchema;
|
14
|
-
}>;
|
15
|
-
export declare const onSetGridSchema: (entityAlias: string, grid: Schema<any>) => import("../redux-helper").IPayloadAction<"entities/SET_GRID_SCHEMA", {
|
16
|
-
entityAlias: string;
|
17
|
-
grid: Schema<any>;
|
18
|
-
}>;
|
19
|
-
export declare const Actions: {
|
20
|
-
onSetEntityMetaSchemas: (meta: Record<string, EntityMetaSchema>) => import("../redux-helper").IPayloadAction<"entities/SET_META_SCHEMAS", Record<string, EntityMetaSchema>>;
|
21
|
-
onSetFormSchema: (entityAlias: string, form: EntityFormSchema) => import("../redux-helper").IPayloadAction<"entities/SET_FORM_SCHEMA", {
|
22
|
-
entityAlias: string;
|
23
|
-
form: EntityFormSchema;
|
24
|
-
}>;
|
25
|
-
onSetGridSchema: (entityAlias: string, grid: Schema<any>) => import("../redux-helper").IPayloadAction<"entities/SET_GRID_SCHEMA", {
|
26
|
-
entityAlias: string;
|
27
|
-
grid: Schema<any>;
|
28
|
-
}>;
|
29
|
-
};
|
30
|
-
export type ActionTypes = ActionsUnion<typeof Actions>;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Actions = exports.onSetGridSchema = exports.onSetFormSchema = exports.onSetEntityMetaSchemas = void 0;
|
4
|
-
const redux_helper_1 = require("../redux-helper");
|
5
|
-
const onSetEntityMetaSchemas = (meta) => (0, redux_helper_1.createAction)("entities/SET_META_SCHEMAS", meta);
|
6
|
-
exports.onSetEntityMetaSchemas = onSetEntityMetaSchemas;
|
7
|
-
const onSetFormSchema = (entityAlias, form) => (0, redux_helper_1.createAction)("entities/SET_FORM_SCHEMA", { entityAlias, form });
|
8
|
-
exports.onSetFormSchema = onSetFormSchema;
|
9
|
-
const onSetGridSchema = (entityAlias, grid) => (0, redux_helper_1.createAction)("entities/SET_GRID_SCHEMA", { entityAlias, grid });
|
10
|
-
exports.onSetGridSchema = onSetGridSchema;
|
11
|
-
exports.Actions = {
|
12
|
-
onSetEntityMetaSchemas: exports.onSetEntityMetaSchemas,
|
13
|
-
onSetFormSchema: exports.onSetFormSchema,
|
14
|
-
onSetGridSchema: exports.onSetGridSchema,
|
15
|
-
};
|
@@ -1,18 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./actions"), exports);
|
18
|
-
__exportStar(require("./selectors"), exports);
|
@@ -1,36 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const initialState = {
|
4
|
-
meta: {},
|
5
|
-
form: {},
|
6
|
-
grid: {},
|
7
|
-
};
|
8
|
-
const entitiesReducer = (state = initialState, action) => {
|
9
|
-
// tslint:disable-next-line:no-small-switch
|
10
|
-
switch (action.type) {
|
11
|
-
case "entities/SET_META_SCHEMAS":
|
12
|
-
return {
|
13
|
-
...state,
|
14
|
-
meta: action.payload,
|
15
|
-
};
|
16
|
-
case "entities/SET_FORM_SCHEMA":
|
17
|
-
return {
|
18
|
-
...state,
|
19
|
-
form: {
|
20
|
-
...state.form,
|
21
|
-
[action.payload.entityAlias]: action.payload.form,
|
22
|
-
},
|
23
|
-
};
|
24
|
-
case "entities/SET_GRID_SCHEMA":
|
25
|
-
return {
|
26
|
-
...state,
|
27
|
-
grid: {
|
28
|
-
...state.grid,
|
29
|
-
[action.payload.entityAlias]: action.payload.grid,
|
30
|
-
},
|
31
|
-
};
|
32
|
-
default:
|
33
|
-
return state;
|
34
|
-
}
|
35
|
-
};
|
36
|
-
exports.default = entitiesReducer;
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { Schema } from "@uxf/data-grid";
|
2
|
-
import { EntityMetaSchema } from "../../../api";
|
3
|
-
import { EntityFormSchema } from "../../types/form";
|
4
|
-
import { IReduxState } from "../types";
|
5
|
-
export declare const metaSchemaExistsSelector: (state: IReduxState) => boolean;
|
6
|
-
export declare const metaSchemaSelector: (entityAlias: string) => (state: IReduxState) => EntityMetaSchema;
|
7
|
-
export declare const gridSchemaExistsSelector: (entityAlias: string) => (state: IReduxState) => boolean;
|
8
|
-
export declare const gridSchemaSelector: (entityAlias: string) => (state: IReduxState) => Schema<any>;
|
9
|
-
export declare const formSchemaExistsSelector: (entityAlias: string) => (state: IReduxState) => boolean;
|
10
|
-
export declare const formSchemaSelector: (entityAlias: string) => (state: IReduxState) => EntityFormSchema;
|
@@ -1,16 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.formSchemaSelector = exports.formSchemaExistsSelector = exports.gridSchemaSelector = exports.gridSchemaExistsSelector = exports.metaSchemaSelector = exports.metaSchemaExistsSelector = void 0;
|
4
|
-
const is_not_nil_1 = require("@uxf/core/utils/is-not-nil");
|
5
|
-
const metaSchemaExistsSelector = (state) => Object.keys(state.entities.meta).length > 0;
|
6
|
-
exports.metaSchemaExistsSelector = metaSchemaExistsSelector;
|
7
|
-
const metaSchemaSelector = (entityAlias) => (state) => state.entities.meta[entityAlias];
|
8
|
-
exports.metaSchemaSelector = metaSchemaSelector;
|
9
|
-
const gridSchemaExistsSelector = (entityAlias) => (state) => (0, is_not_nil_1.isNotNil)(state.entities.grid[entityAlias]);
|
10
|
-
exports.gridSchemaExistsSelector = gridSchemaExistsSelector;
|
11
|
-
const gridSchemaSelector = (entityAlias) => (state) => state.entities.grid[entityAlias];
|
12
|
-
exports.gridSchemaSelector = gridSchemaSelector;
|
13
|
-
const formSchemaExistsSelector = (entityAlias) => (state) => (0, is_not_nil_1.isNotNil)(state.entities.form[entityAlias]);
|
14
|
-
exports.formSchemaExistsSelector = formSchemaExistsSelector;
|
15
|
-
const formSchemaSelector = (entityAlias) => (state) => state.entities.form[entityAlias];
|
16
|
-
exports.formSchemaSelector = formSchemaSelector;
|
@@ -1,22 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
exports.withReduxStore = exports.useSelector = void 0;
|
18
|
-
var react_redux_1 = require("react-redux");
|
19
|
-
Object.defineProperty(exports, "useSelector", { enumerable: true, get: function () { return react_redux_1.useSelector; } });
|
20
|
-
__exportStar(require("./types"), exports);
|
21
|
-
var with_redux_store_1 = require("./with-redux-store");
|
22
|
-
Object.defineProperty(exports, "withReduxStore", { enumerable: true, get: function () { return with_redux_store_1.withReduxStore; } });
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { Action as ReduxAction } from "redux";
|
2
|
-
export interface IAction<T extends string> extends ReduxAction {
|
3
|
-
type: T;
|
4
|
-
}
|
5
|
-
export interface IPayloadAction<T extends string, P> extends IAction<T> {
|
6
|
-
payload: P;
|
7
|
-
}
|
8
|
-
export declare function createAction<T extends string>(type: T): IAction<T>;
|
9
|
-
export declare function createAction<T extends string, P>(type: T, payload: P): IPayloadAction<T, P>;
|
10
|
-
type FunctionType = (...args: any[]) => any;
|
11
|
-
interface IActionCreatorsMapObject {
|
12
|
-
[actionCreator: string]: FunctionType;
|
13
|
-
}
|
14
|
-
export type ActionsUnion<A extends IActionCreatorsMapObject> = ReturnType<A[keyof A]>;
|
15
|
-
export {};
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { ActionTypes as EntitiesActionTypes, IState as IEntitiesState } from "../redux/entities/actions";
|
2
|
-
import { IState as IUserState, ActionTypes as UserActionTypes } from "../redux/user/actions";
|
3
|
-
export interface IReduxState {
|
4
|
-
entities: IEntitiesState;
|
5
|
-
user: IUserState;
|
6
|
-
}
|
7
|
-
export type ActionTypes = EntitiesActionTypes | UserActionTypes;
|