@bigbinary/neeto-themes-frontend 3.1.14 → 3.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -9
- package/dist/NeetoThemesBuilder.js +14 -7
- package/dist/NeetoThemesBuilder.js.map +1 -1
- package/dist/cjs/NeetoThemesBuilder.js +14 -7
- package/dist/cjs/NeetoThemesBuilder.js.map +1 -1
- package/dist/cjs/hooks.js +2 -2
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/utils.js +1 -1
- package/dist/hooks.js +2 -2
- package/dist/{index-Bxlleq-V.js → index-CFGmwZqT.js} +5 -1
- package/dist/index-CFGmwZqT.js.map +1 -0
- package/dist/{index-D6OhrVJO.js → index-Yv0AE3Ax.js} +5 -1
- package/dist/index-Yv0AE3Ax.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/{useThemeUtils-Dx-g0zNJ.js → useThemeUtils-Bc7fcmee.js} +2 -2
- package/dist/{useThemeUtils-Dx-g0zNJ.js.map → useThemeUtils-Bc7fcmee.js.map} +1 -1
- package/dist/{useThemeUtils-Do1vR9LD.js → useThemeUtils-Dc4lCLOF.js} +2 -2
- package/dist/{useThemeUtils-Do1vR9LD.js.map → useThemeUtils-Dc4lCLOF.js.map} +1 -1
- package/dist/utils.js +1 -1
- package/package.json +8 -8
- package/types.d.ts +3 -0
- package/dist/index-Bxlleq-V.js.map +0 -1
- package/dist/index-D6OhrVJO.js.map +0 -1
package/README.md
CHANGED
|
@@ -105,8 +105,8 @@ and `neeto-themes-engine` Rails engine.
|
|
|
105
105
|
- `parent_class`: This key needs to be added for custom css feature to work
|
|
106
106
|
properly. See more on [custom css](#custom-css) feature.
|
|
107
107
|
|
|
108
|
-
- `use_default_image_size`: Used to apply defaultImageSize prop
|
|
109
|
-
|
|
108
|
+
- `use_default_image_size`: Used to apply defaultImageSize prop passed to
|
|
109
|
+
ImageUploader component.
|
|
110
110
|
|
|
111
111
|
3. **Provide a css variable prefix**
|
|
112
112
|
|
|
@@ -197,17 +197,19 @@ for step-by-step instructions to develop the frontend package.
|
|
|
197
197
|
### Custom CSS
|
|
198
198
|
|
|
199
199
|
`neeto-themes-nano` will inject custom css into your application as part of a
|
|
200
|
-
theme.
|
|
200
|
+
theme. You can provide `enabledFeatures={{ customCSS: false }}` in
|
|
201
|
+
`NeetoThemesBuilder` to manually disable the CustomCSS feature. This feature
|
|
202
|
+
requires the initializer to be set with the additional property
|
|
201
203
|
`{ kind: "custom_css", key: "custom_css", default_value: "", parent_class: "neeto-form-eui" }`.
|
|
202
204
|
The `parent_class` key will be used as a parent to inject styles and for CSS
|
|
203
205
|
nesting. This ensures that styles are not injected on pages where you do not
|
|
204
206
|
want it and also ensures that style rules targeting elements outside this class
|
|
205
|
-
will not be applied. Please ensure that the value provided to
|
|
206
|
-
present in your application as a wrapper CSS class. For example
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
207
|
+
will not be applied. Please ensure that the value provided to`parent_class`is
|
|
208
|
+
present in your application as a wrapper CSS class. For example:`neeto-form-eui`
|
|
209
|
+
in neetoForm is present in all external pages where theme needs to be applied. .
|
|
210
|
+
It also provides a code editor with syntax highlighting which depends on
|
|
211
|
+
[Monaco editor](https://github.com/suren-atoyan/monaco-react) as a peer
|
|
212
|
+
dependency. Please install it in the host application for proper working.
|
|
211
213
|
|
|
212
214
|
## Instructions for Publishing
|
|
213
215
|
|
|
@@ -4,10 +4,10 @@ import { hyphenate, isPresent, findBy, findIndexBy, isNot, filterBy, snakeToCame
|
|
|
4
4
|
import { useMutationWithInvalidation, useBreakpoints, PageTitle } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
5
5
|
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
6
6
|
import { useTranslation, Trans } from 'react-i18next';
|
|
7
|
-
import { B as BASE_URL, b as scrollElementIntoView, c as setCustomCSS, g as getDominantColorFromUrl, i as isEditThemeRoute, d as isFunction, e as isNewThemeRoute } from './index-
|
|
7
|
+
import { B as BASE_URL, b as scrollElementIntoView, c as setCustomCSS, g as getDominantColorFromUrl, i as isEditThemeRoute, d as isFunction, e as isNewThemeRoute } from './index-CFGmwZqT.js';
|
|
8
8
|
import { useQuery, useQueryClient } from '@tanstack/react-query';
|
|
9
9
|
import axios from 'axios';
|
|
10
|
-
import { Q as QUERY_KEYS, a as useConfigStore, b as useThemeStore, u as useThemeUtils, P as POSITION_OPTIONS, O as OVERLAY_OPACITY_SLIDER_MARKS, H as HUNDRED, F as FONT_OPTIONS, T as THEME_VALIDATION_SCHEMA } from './useThemeUtils-
|
|
10
|
+
import { Q as QUERY_KEYS, a as useConfigStore, b as useThemeStore, u as useThemeUtils, P as POSITION_OPTIONS, O as OVERLAY_OPACITY_SLIDER_MARKS, H as HUNDRED, F as FONT_OPTIONS, T as THEME_VALIDATION_SCHEMA } from './useThemeUtils-Dc4lCLOF.js';
|
|
11
11
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
12
12
|
import classnames from 'classnames';
|
|
13
13
|
import { joinHyphenCase, buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
|
|
@@ -1158,13 +1158,15 @@ var Customize = function Customize(_ref) {
|
|
|
1158
1158
|
themePropertiesSchema: store["themePropertiesSchema"],
|
|
1159
1159
|
entityType: store["entityType"],
|
|
1160
1160
|
isFetchingSchema: store["isFetchingSchema"],
|
|
1161
|
-
helpPopoverProps: store["helpPopoverProps"]
|
|
1161
|
+
helpPopoverProps: store["helpPopoverProps"],
|
|
1162
|
+
enabledFeatures: store["enabledFeatures"]
|
|
1162
1163
|
};
|
|
1163
1164
|
}, shallow),
|
|
1164
1165
|
themePropertiesSchema = _useConfigStore.themePropertiesSchema,
|
|
1165
1166
|
entityType = _useConfigStore.entityType,
|
|
1166
1167
|
isFetchingSchema = _useConfigStore.isFetchingSchema,
|
|
1167
|
-
helpPopoverProps = _useConfigStore.helpPopoverProps
|
|
1168
|
+
helpPopoverProps = _useConfigStore.helpPopoverProps,
|
|
1169
|
+
enabledFeatures = _useConfigStore.enabledFeatures;
|
|
1168
1170
|
var _useParams = useParams(),
|
|
1169
1171
|
themeId = _useParams.themeId;
|
|
1170
1172
|
var _useThemeStore = useThemeStore(function (store) {
|
|
@@ -1295,7 +1297,7 @@ var Customize = function Customize(_ref) {
|
|
|
1295
1297
|
}),
|
|
1296
1298
|
key: key
|
|
1297
1299
|
});
|
|
1298
|
-
}), /*#__PURE__*/jsx(CustomCSS, {
|
|
1300
|
+
}), enabledFeatures.customCSS && /*#__PURE__*/jsx(CustomCSS, {
|
|
1299
1301
|
currentScreen: currentScreen,
|
|
1300
1302
|
onEditCSSClick: onEditCSSClick
|
|
1301
1303
|
}), /*#__PURE__*/jsxs("div", {
|
|
@@ -2172,7 +2174,11 @@ var NeetoThemesBuilder = function NeetoThemesBuilder(_ref) {
|
|
|
2172
2174
|
_ref$onApplyGlobalThe = _ref.onApplyGlobalThemeSuccess,
|
|
2173
2175
|
onApplyGlobalThemeSuccess = _ref$onApplyGlobalThe === void 0 ? noop : _ref$onApplyGlobalThe,
|
|
2174
2176
|
_ref$helpPopoverProps = _ref.helpPopoverProps,
|
|
2175
|
-
helpPopoverProps = _ref$helpPopoverProps === void 0 ? {} : _ref$helpPopoverProps
|
|
2177
|
+
helpPopoverProps = _ref$helpPopoverProps === void 0 ? {} : _ref$helpPopoverProps,
|
|
2178
|
+
_ref$enabledFeatures = _ref.enabledFeatures,
|
|
2179
|
+
enabledFeatures = _ref$enabledFeatures === void 0 ? {
|
|
2180
|
+
customCSS: true
|
|
2181
|
+
} : _ref$enabledFeatures;
|
|
2176
2182
|
var _useThemeStore = useThemeStore(function (store) {
|
|
2177
2183
|
return {
|
|
2178
2184
|
setThemeState: store["setThemeState"]
|
|
@@ -2203,7 +2209,8 @@ var NeetoThemesBuilder = function NeetoThemesBuilder(_ref) {
|
|
|
2203
2209
|
entityId: entityId,
|
|
2204
2210
|
isTemplateThemesEnabled: isTemplateThemesEnabled,
|
|
2205
2211
|
helpDocUrl: helpDocUrl,
|
|
2206
|
-
helpPopoverProps: helpPopoverProps
|
|
2212
|
+
helpPopoverProps: helpPopoverProps,
|
|
2213
|
+
enabledFeatures: enabledFeatures
|
|
2207
2214
|
});
|
|
2208
2215
|
}, []);
|
|
2209
2216
|
useEffect(function () {
|