@uxf/cms 10.0.0-beta.6 → 10.0.0-beta.61

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/cms",
3
- "version": "10.0.0-beta.6",
3
+ "version": "10.0.0-beta.61",
4
4
  "description": "UXF Cms",
5
5
  "author": "UXFans <dev@uxf.cz>",
6
6
  "homepage": "https://gitlab.com/uxf-npm/cms#readme",
@@ -40,52 +40,29 @@
40
40
  "@types/qs": "^6.9.7",
41
41
  "@types/react": "18.2.6",
42
42
  "@types/react-dom": "18.2.4",
43
- "@uxf/core": "^4.5.1",
44
- "@uxf/data-grid": "10.0.0-beta.4",
45
- "@uxf/eslint-config": "^1.3.0",
46
- "@uxf/form": "10.0.0-beta.4",
47
- "@uxf/icons-generator": "^1.3.0",
48
- "@uxf/router": "10.0.0-beta.3",
49
- "@uxf/ui": "10.0.0-beta.4",
50
- "@uxf/wysiwyg": "2.0.0-beta.28",
51
- "autoprefixer": "^10.4.14",
43
+ "@uxf/core": "10.0.0-beta.37",
44
+ "@uxf/data-grid": "10.0.0-beta.61",
45
+ "@uxf/form": "10.0.0-beta.61",
46
+ "@uxf/icons-generator": "10.0.0-beta.19",
47
+ "@uxf/router": "10.0.0-beta.15",
48
+ "@uxf/ui": "10.0.0-beta.61",
49
+ "@uxf/wysiwyg": "10.0.0-beta.61",
52
50
  "axios": "^1.4.0",
53
51
  "axios-hooks": "^4.0.0",
54
- "concurrently": "^8.1.0",
55
- "coordinate-parser": "^1.0.7",
52
+ "coordinate-parser": "1.0.7",
56
53
  "dayjs": "^1.11.7",
57
- "eslint": "^8.41.0",
58
- "eslint-plugin-tailwindcss": "3.12.1",
59
- "express": "^4.18.2",
60
- "express-http-proxy": "^1.6.3",
61
- "http-proxy-middleware": "^2.0.6",
62
54
  "next": "^13.4.4",
63
55
  "path": "^0.12.7",
64
- "postcss": "^8.4.24",
65
- "postcss-focus-visible": "^8.0.2",
66
- "postcss-import": "^15.1.0",
67
- "postcss-pxtorem": "^6.0.0",
68
- "postcss-syntax": "^0.36.2",
69
- "prettier": "^2.8.8",
70
- "prettier-plugin-tailwindcss": "^0.3.0",
71
56
  "qs": "^6.11.2",
72
57
  "react": "^18.2.0",
73
- "react-dom": "^18.2.0",
74
- "redux-devtools-extension": "^2.13.9",
75
- "stylelint": "^15.6.2",
76
- "stylelint-config-standard": "^33.0.0",
77
- "stylelint-config-tailwindcss": "^0.0.7",
78
- "stylelint-use-nesting": "^4.1.0",
79
- "tailwindcss": "^3.3.2",
80
- "ts-node": "^10.9.1",
81
- "typescript": "^5.0.4"
58
+ "react-dom": "^18.2.0"
82
59
  },
83
60
  "peerDependencies": {
84
- "@uxf/core": ">= 4.5.1",
85
- "@uxf/data-grid": "10.0.0-beta.6",
86
- "@uxf/form": "10.0.0-beta.6",
87
- "@uxf/ui": "10.0.0-beta.6",
88
- "@uxf/wysiwyg": "2.0.0-beta.28",
61
+ "@uxf/core": "10.0.0-beta.37",
62
+ "@uxf/data-grid": "10.0.0-beta.61",
63
+ "@uxf/form": "10.0.0-beta.61",
64
+ "@uxf/ui": "10.0.0-beta.61",
65
+ "@uxf/wysiwyg": "10.0.0-beta.61",
89
66
  "axios": "^1.4.0",
90
67
  "axios-hooks": "^4.0.0",
91
68
  "dayjs": "^1.11.7",
@@ -84,7 +84,7 @@ const GridPageComponent = (props) => {
84
84
  ].filter(Boolean);
85
85
  return (react_1.default.createElement(Layout, { key: entityAlias, title: (_a = title !== null && title !== void 0 ? title : metaSchema === null || metaSchema === void 0 ? void 0 : metaSchema.title) !== null && _a !== void 0 ? _a : "" },
86
86
  react_1.default.createElement("div", { className: "mb-10" },
87
- react_1.default.createElement(tailwindui_1.DataGrid, { noBorder: true, callbackRef: callbackRef, schema: gridSchema, initialState: query.filter ? (0, router_1.queryParamToString)(query.filter) : undefined, title: title !== null && title !== void 0 ? title : metaSchema === null || metaSchema === void 0 ? void 0 : metaSchema.title, gridName: entityAlias, loader: loader !== null && loader !== void 0 ? loader : universalLoader, ...hiddenColumnProps, onOpen: onOpen && ((row) => onOpen(entityAlias, row, actionsBag)), getOpenUrl: getOpenUrl && ((row) => getOpenUrl(entityAlias, row)), onEdit: onEdit && ((row) => onEdit(entityAlias, row, actionsBag)), getEditUrl: getEditUrl && ((row) => getEditUrl(entityAlias, row)), onRemove: onRemove && ((row) => onRemove(entityAlias, row, actionsBag)), rowHeight: rowHeight, defaultConfig: defaultConfig, ui: dataGridUi, selectedRows: selectable ? selectedRows : undefined, onChangeSelectedRows: selectable ? setSelectedRows : undefined, customActions: cActions, mode: (_b = uiContextValues === null || uiContextValues === void 0 ? void 0 : uiContextValues.colorScheme.getUserSettings()) !== null && _b !== void 0 ? _b : "light" }))));
87
+ react_1.default.createElement(tailwindui_1.DataGrid, { noBorder: true, callbackRef: callbackRef, schema: gridSchema, initialState: query.filter ? (0, router_1.queryParamToString)(query.filter) : undefined, title: title !== null && title !== void 0 ? title : metaSchema === null || metaSchema === void 0 ? void 0 : metaSchema.title, gridName: entityAlias, loader: loader !== null && loader !== void 0 ? loader : universalLoader, ...hiddenColumnProps, onOpen: onOpen && ((row) => onOpen(entityAlias, row, actionsBag)), getOpenUrl: getOpenUrl && ((row) => getOpenUrl(entityAlias, row)), onEdit: onEdit && ((row) => onEdit(entityAlias, row, actionsBag)), getEditUrl: getEditUrl && ((row) => getEditUrl(entityAlias, row)), onRemove: onRemove && ((row) => onRemove(entityAlias, row, actionsBag)), rowHeight: rowHeight, defaultConfig: defaultConfig, ui: dataGridUi, selectedRows: selectable ? selectedRows : undefined, onChangeSelectedRows: selectable ? setSelectedRows : undefined, customActions: cActions, mode: (_b = uiContextValues === null || uiContextValues === void 0 ? void 0 : uiContextValues.colorScheme.getUserSettings()) !== null && _b !== void 0 ? _b : "light", onCsvDownload: (r) => window.open(`/api/cms/datagrid/export/${entityAlias}?${(0, qs_1.stringify)(r)}`) }))));
88
88
  };
89
89
  GridPageComponent.displayName = "GridPageComponent";
90
90
  const GridPage = (config) => {
@@ -0,0 +1,30 @@
1
+ .uxf-cms-breadcrumbs {
2
+ @apply uxf-typo-body;
3
+
4
+ align-items: center;
5
+ color: theme("colors.lightLow");
6
+ display: flex;
7
+ flex-wrap: wrap;
8
+ margin-bottom: theme("spacing.4");
9
+
10
+ &__item {
11
+ margin-right: theme("spacing.2");
12
+
13
+ &:last-child {
14
+ margin-right: 0;
15
+ }
16
+ }
17
+
18
+ &__divide-icon {
19
+ display: inline;
20
+ margin-right: theme("spacing.2");
21
+ }
22
+
23
+ &__link {
24
+ @apply transition-colors;
25
+
26
+ &:hover {
27
+ color: theme("colors.lightHigh");
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,132 @@
1
+ .uxf-cms-layout {
2
+ display: flex;
3
+
4
+ &__wrapper {
5
+ display: flex;
6
+ width: 100%;
7
+
8
+ :root .light & {
9
+ background-color: theme("colors.gray.100");
10
+ }
11
+
12
+ :root .dark & {
13
+ background-color: theme("colors.gray.900");
14
+ color: theme("colors.darkHigh");
15
+ }
16
+ }
17
+
18
+ &__main {
19
+ --drawer-width: 264px;
20
+
21
+ min-height: 100vh;
22
+ padding-bottom: theme("spacing.16");
23
+ width: 100%;
24
+
25
+ @screen md {
26
+ margin-left: var(--drawer-width);
27
+ padding-bottom: 0;
28
+ width: calc(100% - var(--drawer-width));
29
+ }
30
+ }
31
+
32
+ &__loading {
33
+ align-items: center;
34
+ display: flex;
35
+ flex-direction: column;
36
+ height: theme("spacing.96");
37
+ justify-content: center;
38
+
39
+ &-inner {
40
+ text-align: center;
41
+ }
42
+
43
+ &-text {
44
+ margin-top: theme("spacing.2");
45
+ }
46
+ }
47
+
48
+ &__header {
49
+ :root .light & {
50
+ background-color: theme("colors.white");
51
+ }
52
+
53
+ :root .dark & {
54
+ background-color: theme("colors.gray.950");
55
+ }
56
+
57
+ &--sticky {
58
+ box-shadow: theme("boxShadow.md");
59
+ position: sticky;
60
+ top: 0;
61
+ z-index: 10;
62
+
63
+ :root .light & {
64
+ background-color: theme("colors.white");
65
+ }
66
+
67
+ :root .dark & {
68
+ background-color: theme("colors.gray.950");
69
+ }
70
+ }
71
+ }
72
+
73
+ &__toolbar {
74
+ align-items: center;
75
+ background-color: theme("colors.sidebar.background");
76
+ display: flex;
77
+ height: theme("spacing.12");
78
+ justify-content: flex-end;
79
+ padding: 0 theme("spacing.6");
80
+
81
+ :root .light & {
82
+ color: theme("colors.darkMedium");
83
+ }
84
+
85
+ :root .dark & {
86
+ color: theme("colors.lightMedium");
87
+ }
88
+ }
89
+
90
+ &__container {
91
+ margin: 0 auto;
92
+ padding: 0 theme("spacing.4");
93
+
94
+ @screen md {
95
+ padding-left: theme("spacing.10");
96
+ padding-right: theme("spacing.10");
97
+ }
98
+
99
+ &--basic {
100
+ padding-bottom: theme("spacing.9");
101
+ padding-top: theme("spacing.12");
102
+ }
103
+
104
+ &--narrow {
105
+ max-width: 49.25rem;
106
+ }
107
+
108
+ &--wide {
109
+ max-width: 64rem;
110
+ }
111
+ }
112
+
113
+ &__title-wrapper {
114
+ align-items: center;
115
+ display: flex;
116
+ justify-content: space-between;
117
+ }
118
+
119
+ &__avatar-title-wrapper {
120
+ align-items: center;
121
+ display: flex;
122
+ gap: 20px;
123
+ }
124
+
125
+ &__breadcrumbs-title-wrapper {
126
+ width: 100%;
127
+ }
128
+
129
+ &__title {
130
+ @apply uxf-typo-h4;
131
+ }
132
+ }
@@ -0,0 +1,52 @@
1
+ .uxf-cms-login-layout {
2
+ align-items: center;
3
+ display: flex;
4
+ flex-direction: column;
5
+ justify-content: center;
6
+ min-height: 100vh;
7
+ padding: theme("spacing.4");
8
+
9
+ :root .light & {
10
+ background-color: theme("colors.gray.100");
11
+ }
12
+
13
+ :root .dark & {
14
+ background-color: theme("colors.gray.900");
15
+ color: theme("colors.darkHigh");
16
+ }
17
+
18
+ &__logo-wrapper {
19
+ margin-bottom: theme("spacing.8");
20
+ }
21
+
22
+ &__title {
23
+ @apply uxf-typo-h4;
24
+
25
+ &--hidden {
26
+ @apply sr-only;
27
+ }
28
+ }
29
+
30
+ &__subtitle {
31
+ margin-top: theme("spacing.2");
32
+
33
+ :root .light & {
34
+ color: theme("colors.lightMedium");
35
+ }
36
+
37
+ :root .dark & {
38
+ color: theme("colors.darkMedium");
39
+ }
40
+ }
41
+
42
+ &__body {
43
+ margin-top: theme("spacing.8");
44
+ max-width: 100%;
45
+ padding: theme("spacing.6");
46
+ width: 28rem;
47
+
48
+ :root .dark & {
49
+ background-color: theme("colors.gray.950");
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,213 @@
1
+ .uxf-cms-menu {
2
+ background-color: theme("colors.sidebar.background");
3
+ padding: 0 theme("spacing.2") theme("spacing.4");
4
+
5
+ &__item-wrapper {
6
+ &--super {
7
+ &:first-child {
8
+ & > .uxf-cms-menu__item--super {
9
+ margin-top: 0;
10
+ }
11
+ }
12
+ }
13
+
14
+ &--user-menu {
15
+ @screen md {
16
+ display: none;
17
+ }
18
+ }
19
+ }
20
+
21
+ &__item {
22
+ &--super {
23
+ @apply uxf-typo-overline;
24
+
25
+ color: theme("colors.darkLow");
26
+ margin-bottom: theme("spacing.3");
27
+ margin-top: theme("spacing.6");
28
+ padding-left: theme("spacing.2");
29
+ text-transform: uppercase;
30
+ }
31
+
32
+ &--basic {
33
+ align-items: center;
34
+ background-color: theme("colors.sidebar.background");
35
+ border-radius: theme("borderRadius.lg");
36
+ color: theme("colors.darkMedium");
37
+ cursor: pointer;
38
+ display: flex;
39
+ margin-bottom: theme("spacing[0.5]");
40
+ padding: theme("spacing[2.5]") theme("spacing.1") theme("spacing[2.5]") theme("spacing[2.5]");
41
+
42
+ &:hover {
43
+ background-color: theme("colors.sidebar.hover");
44
+ }
45
+
46
+ &.is-selected {
47
+ background-color: theme("colors.sidebar.highlight");
48
+ color: theme("colors.darkHigh");
49
+ font-weight: bold;
50
+ }
51
+
52
+ .uxf-cms-menu__icon-wrapper {
53
+ width: theme("spacing.7");
54
+
55
+ &--level-one {
56
+ width: theme("spacing.9");
57
+ }
58
+ }
59
+
60
+ .uxf-cms-menu__caret {
61
+ margin-left: auto;
62
+ margin-right: theme("spacing.2");
63
+
64
+ &.is-open {
65
+ transform: rotate(-90deg);
66
+ }
67
+ }
68
+ }
69
+ }
70
+
71
+ &__icon-wrapper {
72
+ flex-shrink: 0;
73
+ }
74
+
75
+ &__submenu-button {
76
+ width: 100%;
77
+
78
+ &--initially-closed {
79
+ @screen md {
80
+ display: none;
81
+ }
82
+ }
83
+
84
+ &--initially-open {
85
+ @screen md {
86
+ pointer-events: none;
87
+ }
88
+ }
89
+ }
90
+ }
91
+
92
+ .uxf-cms-user-menu {
93
+ border-top: 1px solid theme("colors.darkBorder");
94
+ color: theme("colors.darkMedium");
95
+ display: none;
96
+
97
+ @screen md {
98
+ display: block;
99
+ }
100
+
101
+ &.is-open {
102
+ background-color: theme("colors.sidebar.hover");
103
+
104
+ .uxf-cms-menu__item {
105
+ background-color: theme("colors.sidebar.hover");
106
+
107
+ &:hover {
108
+ background-color: theme("colors.sidebar.background");
109
+ }
110
+ }
111
+ }
112
+
113
+ &__button {
114
+ align-items: center;
115
+ display: flex;
116
+ padding: theme("spacing.3") theme("spacing.4");
117
+ text-align: left;
118
+ width: 100%;
119
+
120
+ &:hover {
121
+ background-color: theme("colors.sidebar.hover");
122
+ }
123
+ }
124
+
125
+ &__avatar {
126
+ flex-shrink: 0;
127
+ height: 32px;
128
+ margin-right: theme("spacing.3");
129
+ width: 32px;
130
+ }
131
+
132
+ &__label-wrapper {
133
+ @apply truncate;
134
+ }
135
+
136
+ &__name {
137
+ @apply uxf-typo-body2;
138
+ }
139
+
140
+ &__roles {
141
+ @apply uxf-typo-caption truncate;
142
+
143
+ color: theme("colors.darkLow");
144
+ }
145
+
146
+ &__caret-wrapper {
147
+ margin-left: auto;
148
+ }
149
+
150
+ &__caret {
151
+ margin-left: theme("spacing.2");
152
+
153
+ &.is-open {
154
+ transform: rotate(-90deg);
155
+ }
156
+ }
157
+
158
+ &__sub-menu {
159
+ padding: 0 theme("spacing.3") theme("spacing.4");
160
+ }
161
+ }
162
+
163
+ .uxf-cms-sub-menu {
164
+ display: none;
165
+
166
+ @screen md {
167
+ display: block;
168
+ }
169
+
170
+ &__wrapper {
171
+ background-color: theme("colors.sidebar.highlight");
172
+ border-radius: theme("borderRadius.xl");
173
+ box-shadow: theme("boxShadow.lg");
174
+ overflow-y: auto;
175
+ width: 100%;
176
+ z-index: theme("zIndex.dropdown");
177
+ }
178
+
179
+ &__wrapper-mobile {
180
+ background-color: theme("colors.sidebar.background");
181
+ border-radius: theme("borderRadius.xl");
182
+ box-shadow: theme("boxShadow.lg");
183
+ left: theme("spacing.4");
184
+ overflow-y: auto;
185
+ width: calc(100vw - 32px);
186
+ z-index: theme("zIndex.dropdown");
187
+ }
188
+
189
+ &__item {
190
+ @apply md:text-body2;
191
+
192
+ background-color: theme("colors.sidebar.highlight");
193
+ color: theme("colors.darkMedium");
194
+ font-size: theme("fontSize.body");
195
+ padding: theme("spacing[3.5]");
196
+ width: 100%;
197
+
198
+ &:hover {
199
+ background-color: theme("colors.sidebar.background");
200
+ color: theme("colors.darkLow");
201
+ }
202
+ }
203
+
204
+ &__title {
205
+ @apply uxf-typo-body;
206
+
207
+ background-color: theme("colors.sidebar.background");
208
+ color: theme("colors.darkHigh");
209
+ font-weight: bold;
210
+ padding: theme("spacing[3.5]") theme("spacing.4");
211
+ width: 100%;
212
+ }
213
+ }
@@ -0,0 +1,34 @@
1
+ .uxf-cms-mobile-bar {
2
+ align-items: center;
3
+ background-color: theme("colors.sidebar.background");
4
+ bottom: 0;
5
+ color: theme("colors.darkMedium");
6
+ display: flex;
7
+ height: 52px;
8
+ left: 0;
9
+ padding: 0 theme("spacing.1");
10
+ position: fixed;
11
+ right: 0;
12
+
13
+ @screen md {
14
+ display: none;
15
+ }
16
+
17
+ &__button {
18
+ align-items: center;
19
+ display: flex;
20
+ flex-grow: 1;
21
+ flex-shrink: 0;
22
+ height: theme("spacing.11");
23
+ justify-content: center;
24
+ }
25
+
26
+ &__avatar {
27
+ height: theme("spacing.7");
28
+ width: theme("spacing.7");
29
+ }
30
+
31
+ &__caret {
32
+ margin-left: theme("spacing.1");
33
+ }
34
+ }
@@ -0,0 +1,108 @@
1
+ .uxf-cms-sidebar {
2
+ display: flex;
3
+ flex-direction: column;
4
+ position: fixed;
5
+ width: 100%;
6
+ z-index: 15;
7
+
8
+ @screen xs {
9
+ right: 0;
10
+ width: var(--drawer-width);
11
+ }
12
+
13
+ @screen md {
14
+ border-bottom: none;
15
+ left: 0;
16
+ right: unset;
17
+ z-index: 1;
18
+ }
19
+
20
+ &__content {
21
+ --device-height: 100vh;
22
+
23
+ background-color: theme("colors.sidebar.background");
24
+ border-bottom: 1px solid theme("colors.gray.700");
25
+ flex-direction: column;
26
+ height: calc(var(--device-height) - 52px);
27
+ padding-top: theme("spacing.5");
28
+
29
+ @screen md {
30
+ border-bottom: none;
31
+ height: 100vh;
32
+ }
33
+
34
+ &--open {
35
+ display: flex;
36
+ }
37
+
38
+ &--closed {
39
+ display: none;
40
+
41
+ @screen md {
42
+ display: flex;
43
+ }
44
+ }
45
+ }
46
+
47
+ &__logo {
48
+ padding: 0 theme("spacing.4");
49
+ }
50
+
51
+ &__nav {
52
+ flex-grow: 1;
53
+ margin-top: theme("spacing.8");
54
+ overflow: auto;
55
+ padding: 0 0 theme("spacing.4");
56
+
57
+ @screen md {
58
+ padding: 0;
59
+ }
60
+
61
+ &--super-section {
62
+ margin-top: theme("spacing.4");
63
+ }
64
+
65
+ /* width */
66
+ &::-webkit-scrollbar {
67
+ width: 8px;
68
+ }
69
+
70
+ /* Track */
71
+ &::-webkit-scrollbar-track {
72
+ background: theme("colors.sidebar.background");
73
+ }
74
+
75
+ /* Handle */
76
+ &::-webkit-scrollbar-thumb {
77
+ background: theme("colors.sidebar.highlight");
78
+ border-radius: 999px;
79
+ }
80
+
81
+ /* Handle on hover */
82
+ &::-webkit-scrollbar-thumb:hover {
83
+ background: theme("colors.sidebar.hover");
84
+ }
85
+ }
86
+
87
+ &__scrollbar {
88
+ --scrollbar-color: theme("colors.darkBorder");
89
+
90
+ -ms-overflow-style: -ms-autohiding-scrollbar;
91
+ scrollbar-color: var(--scrollbar-color) transparent;
92
+ scrollbar-width: thin;
93
+
94
+ &::-webkit-scrollbar {
95
+ width: theme("spacing.2");
96
+ }
97
+
98
+ &::-webkit-scrollbar-track {
99
+ background: theme("colors.sidebar.highlight");
100
+ }
101
+
102
+ &::-webkit-scrollbar-thumb {
103
+ background-color: var(--scrollbar-color);
104
+ border: none;
105
+ border-radius: 999px;
106
+ }
107
+ }
108
+ }
@@ -2,7 +2,7 @@
2
2
  module.exports = {
3
3
  ...require("@uxf/ui/utils/icons-config"),
4
4
  ...require("@uxf/data-grid/icons-config"),
5
- ...require("@uxf/wysiwyg/icons"),
5
+ ...require("@uxf/wysiwyg/utils/icons-config"),
6
6
  angleRight: {
7
7
  width: 256,
8
8
  height: 512,