@bigbinary/neeto-themes-frontend 1.1.14 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +28 -104
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +29 -105
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/types.d.ts +1 -0
package/dist/index.cjs.js
CHANGED
|
@@ -2703,9 +2703,9 @@ function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) {
|
|
|
2703
2703
|
|
|
2704
2704
|
function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2705
2705
|
|
|
2706
|
-
function _objectWithoutProperties$1(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose
|
|
2706
|
+
function _objectWithoutProperties$1(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
2707
2707
|
|
|
2708
|
-
function _objectWithoutPropertiesLoose
|
|
2708
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
2709
2709
|
/**
|
|
2710
2710
|
* Convenience wrapper component for the `useDropzone` hook
|
|
2711
2711
|
*
|
|
@@ -6096,7 +6096,7 @@ var _reactInfiniteScroller2 = _interopRequireDefault(_reactInfiniteScroller);
|
|
|
6096
6096
|
|
|
6097
6097
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
6098
6098
|
|
|
6099
|
-
function _objectWithoutProperties
|
|
6099
|
+
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
|
6100
6100
|
|
|
6101
6101
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6102
6102
|
|
|
@@ -6200,7 +6200,7 @@ var MasonryInfiniteScroller = (_temp2 = _class = function (_Component) {
|
|
|
6200
6200
|
_props.packed;
|
|
6201
6201
|
_props.position;
|
|
6202
6202
|
_props.sizes;
|
|
6203
|
-
var props = _objectWithoutProperties
|
|
6203
|
+
var props = _objectWithoutProperties(_props, ['children', 'className', 'style', 'pack', 'packed', 'position', 'sizes']);
|
|
6204
6204
|
|
|
6205
6205
|
return _react2.default.createElement(
|
|
6206
6206
|
_reactInfiniteScroller2.default,
|
|
@@ -6772,7 +6772,7 @@ var Modal = function Modal(_ref) {
|
|
|
6772
6772
|
})))), /*#__PURE__*/React__default["default"].createElement("input", getInputProps()));
|
|
6773
6773
|
};
|
|
6774
6774
|
|
|
6775
|
-
var _excluded
|
|
6775
|
+
var _excluded = ["key", "label"];
|
|
6776
6776
|
var Menu = neetoui.Dropdown.Menu,
|
|
6777
6777
|
MenuItem = neetoui.Dropdown.MenuItem;
|
|
6778
6778
|
var ImageUploader = function ImageUploader(_ref) {
|
|
@@ -6892,7 +6892,7 @@ var ImageUploader = function ImageUploader(_ref) {
|
|
|
6892
6892
|
}, /*#__PURE__*/React__default["default"].createElement(Menu, null, options.map(function (_ref2) {
|
|
6893
6893
|
var key = _ref2.key,
|
|
6894
6894
|
label = _ref2.label,
|
|
6895
|
-
otherProps = _objectWithoutProperties$2(_ref2, _excluded
|
|
6895
|
+
otherProps = _objectWithoutProperties$2(_ref2, _excluded);
|
|
6896
6896
|
return /*#__PURE__*/React__default["default"].createElement(MenuItem.Button, _extends$1({}, otherProps, {
|
|
6897
6897
|
key: key
|
|
6898
6898
|
}), label);
|
|
@@ -7235,36 +7235,6 @@ var Customize = function Customize(_ref) {
|
|
|
7235
7235
|
});
|
|
7236
7236
|
};
|
|
7237
7237
|
|
|
7238
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
7239
|
-
if (source == null) return {};
|
|
7240
|
-
var target = {};
|
|
7241
|
-
var sourceKeys = Object.keys(source);
|
|
7242
|
-
var key, i;
|
|
7243
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
7244
|
-
key = sourceKeys[i];
|
|
7245
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
7246
|
-
target[key] = source[key];
|
|
7247
|
-
}
|
|
7248
|
-
return target;
|
|
7249
|
-
}
|
|
7250
|
-
|
|
7251
|
-
function _objectWithoutProperties(source, excluded) {
|
|
7252
|
-
if (source == null) return {};
|
|
7253
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
7254
|
-
var key, i;
|
|
7255
|
-
if (Object.getOwnPropertySymbols) {
|
|
7256
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
7257
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
7258
|
-
key = sourceSymbolKeys[i];
|
|
7259
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
7260
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
7261
|
-
target[key] = source[key];
|
|
7262
|
-
}
|
|
7263
|
-
}
|
|
7264
|
-
return target;
|
|
7265
|
-
}
|
|
7266
|
-
|
|
7267
|
-
var _excluded = ["id", "name", "appliedCount", "properties"];
|
|
7268
7238
|
var Card = function Card(_ref) {
|
|
7269
7239
|
var _ref$active = _ref.active,
|
|
7270
7240
|
active = _ref$active === void 0 ? false : _ref$active,
|
|
@@ -7277,30 +7247,21 @@ var Card = function Card(_ref) {
|
|
|
7277
7247
|
isApplyingTheme = _ref.isApplyingTheme,
|
|
7278
7248
|
onCloneTheme = _ref.onCloneTheme,
|
|
7279
7249
|
isHighLightedTheme = _ref.isHighLightedTheme,
|
|
7280
|
-
setThemeBeingApplied = _ref.setThemeBeingApplied
|
|
7250
|
+
setThemeBeingApplied = _ref.setThemeBeingApplied,
|
|
7251
|
+
Thumbnail = _ref.thumbnail;
|
|
7281
7252
|
var _useTranslation = reactI18next.useTranslation(),
|
|
7282
7253
|
t = _useTranslation.t;
|
|
7283
7254
|
var id = theme.id,
|
|
7284
7255
|
name = theme.name,
|
|
7285
|
-
appliedCount = theme.appliedCount
|
|
7286
|
-
properties = theme.properties,
|
|
7287
|
-
styles = _objectWithoutProperties(theme, _excluded);
|
|
7256
|
+
appliedCount = theme.appliedCount;
|
|
7288
7257
|
var _useConfigStore = useConfigStore(function (store) {
|
|
7289
7258
|
return {
|
|
7290
|
-
themeConfig: store["themeConfig"],
|
|
7291
7259
|
entityId: store["entityId"],
|
|
7292
7260
|
entityType: store["entityType"]
|
|
7293
7261
|
};
|
|
7294
7262
|
}, shallow.shallow),
|
|
7295
|
-
_useConfigStore$theme = _useConfigStore.themeConfig,
|
|
7296
|
-
themeConfig = _useConfigStore$theme === void 0 ? [] : _useConfigStore$theme,
|
|
7297
7263
|
entityId = _useConfigStore.entityId,
|
|
7298
7264
|
entityType = _useConfigStore.entityType;
|
|
7299
|
-
var _themeConfig = _slicedToArray$3(themeConfig, 2),
|
|
7300
|
-
colorObject1 = _themeConfig[0],
|
|
7301
|
-
colorObject2 = _themeConfig[1];
|
|
7302
|
-
var primaryLabel = neetoCist.humanize(colorObject1 === null || colorObject1 === void 0 ? void 0 : colorObject1.key);
|
|
7303
|
-
var secondaryLabel = neetoCist.humanize(colorObject2 === null || colorObject2 === void 0 ? void 0 : colorObject2.key);
|
|
7304
7265
|
var handleApplyThemeClick = function handleApplyThemeClick() {
|
|
7305
7266
|
if (isApplyingTheme) return;
|
|
7306
7267
|
setThemeBeingApplied(theme);
|
|
@@ -7319,64 +7280,19 @@ var Card = function Card(_ref) {
|
|
|
7319
7280
|
var handleDeleteTheme = function handleDeleteTheme() {
|
|
7320
7281
|
return onDeleteTheme(id, name, appliedCount);
|
|
7321
7282
|
};
|
|
7322
|
-
var primaryColor = neetoCist.findBy({
|
|
7323
|
-
key: colorObject1.key
|
|
7324
|
-
}, properties).value;
|
|
7325
|
-
var secondaryColor = neetoCist.findBy({
|
|
7326
|
-
key: colorObject2.key
|
|
7327
|
-
}, properties).value;
|
|
7328
|
-
var backgroundImageUrl = theme[neetoCist.snakeToCamelCase(neetoCist.findBy({
|
|
7329
|
-
useAsCardBackground: true
|
|
7330
|
-
}, themeConfig).key)].url;
|
|
7331
|
-
var isContentBackgroundEnabled = ramda.path(["layoutOptions", "isContentBackgroundEnabled"], styles);
|
|
7332
7283
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7333
7284
|
className: "group space-y-2 pt-0.5",
|
|
7334
7285
|
"data-cy": active ? "active-theme-card" : "theme-card",
|
|
7335
|
-
id: theme.id
|
|
7336
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7337
|
-
className: classnames__default["default"]("neeto-themes-theme-thumbnail neeto-ui-rounded-lg border transition-all duration-300 ease-in-out", {
|
|
7338
|
-
"neeto-ui-border-gray-400": !active,
|
|
7339
|
-
"neeto-ui-border-gray-800 neeto-themes-theme-thumbnail--active": active,
|
|
7340
|
-
"neeto-themes-theme-thumbnail--preview-active": isPreviewing,
|
|
7341
|
-
"neeto-themes-theme-thumbnail--highlight-active": isHighLightedTheme
|
|
7342
|
-
}),
|
|
7343
|
-
style: {
|
|
7344
|
-
backgroundColor: ramda.path(["colorScheme", "backgroundColor"], styles),
|
|
7345
|
-
backgroundImage: backgroundImageUrl ? "url(".concat(backgroundImageUrl, ")") : "initial",
|
|
7346
|
-
backgroundSize: "cover"
|
|
7347
|
-
},
|
|
7286
|
+
id: theme.id,
|
|
7348
7287
|
onClick: function onClick() {
|
|
7349
7288
|
return onSetPreviewTheme(theme);
|
|
7350
7289
|
}
|
|
7351
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
}
|
|
7358
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7359
|
-
className: "mb-3"
|
|
7360
|
-
}, /*#__PURE__*/React__default["default"].createElement(Typography__default["default"], {
|
|
7361
|
-
style: "h3",
|
|
7362
|
-
weight: "semibold"
|
|
7363
|
-
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
7364
|
-
style: {
|
|
7365
|
-
color: primaryColor
|
|
7366
|
-
}
|
|
7367
|
-
}, primaryLabel)), /*#__PURE__*/React__default["default"].createElement(Typography__default["default"], {
|
|
7368
|
-
className: "neeto-ui-text-gray-600",
|
|
7369
|
-
style: "body2"
|
|
7370
|
-
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
7371
|
-
style: {
|
|
7372
|
-
color: secondaryColor
|
|
7373
|
-
}
|
|
7374
|
-
}, secondaryLabel))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7375
|
-
className: "neeto-ui-rounded-lg h-5 w-12",
|
|
7376
|
-
style: {
|
|
7377
|
-
backgroundColor: ramda.path(["colorScheme", "buttonBackgroundColor"], styles)
|
|
7378
|
-
}
|
|
7379
|
-
})))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7290
|
+
}, Thumbnail && /*#__PURE__*/React__default["default"].createElement(Thumbnail, {
|
|
7291
|
+
active: active,
|
|
7292
|
+
isHighLightedTheme: isHighLightedTheme,
|
|
7293
|
+
isPreviewing: isPreviewing,
|
|
7294
|
+
theme: theme
|
|
7295
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7380
7296
|
className: "flex items-start justify-between gap-1"
|
|
7381
7297
|
}, /*#__PURE__*/React__default["default"].createElement(Typography__default["default"], {
|
|
7382
7298
|
className: "line-clamp-2 min-w-0 flex-grow break-words pt-1",
|
|
@@ -7442,7 +7358,8 @@ var Themes = function Themes(_ref) {
|
|
|
7442
7358
|
didScrollActiveThemeIntoView = _ref.didScrollActiveThemeIntoView,
|
|
7443
7359
|
isLoading = _ref.isLoading,
|
|
7444
7360
|
currentTheme = _ref.currentTheme,
|
|
7445
|
-
isCurrentThemeLoading = _ref.isCurrentThemeLoading
|
|
7361
|
+
isCurrentThemeLoading = _ref.isCurrentThemeLoading,
|
|
7362
|
+
thumbnail = _ref.thumbnail;
|
|
7446
7363
|
var _useTranslation = reactI18next.useTranslation(),
|
|
7447
7364
|
t = _useTranslation.t;
|
|
7448
7365
|
var _useThemeUtils = useThemeUtils(),
|
|
@@ -7535,6 +7452,7 @@ var Themes = function Themes(_ref) {
|
|
|
7535
7452
|
onApplyTheme: onApplyTheme,
|
|
7536
7453
|
setThemeBeingApplied: setThemeBeingApplied,
|
|
7537
7454
|
theme: theme,
|
|
7455
|
+
thumbnail: thumbnail,
|
|
7538
7456
|
active: (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id) === theme.id,
|
|
7539
7457
|
isPreviewing: (previewingTheme === null || previewingTheme === void 0 ? void 0 : previewingTheme.id) === theme.id,
|
|
7540
7458
|
key: theme.id,
|
|
@@ -7560,6 +7478,7 @@ var Themes = function Themes(_ref) {
|
|
|
7560
7478
|
onEditTheme: onEditTheme,
|
|
7561
7479
|
setThemeBeingApplied: setThemeBeingApplied,
|
|
7562
7480
|
theme: theme,
|
|
7481
|
+
thumbnail: thumbnail,
|
|
7563
7482
|
active: isActive,
|
|
7564
7483
|
isHighLightedTheme: theme.id === themeToHighlight,
|
|
7565
7484
|
key: theme.id,
|
|
@@ -7625,8 +7544,9 @@ var TitleBar = function TitleBar(_ref) {
|
|
|
7625
7544
|
};
|
|
7626
7545
|
|
|
7627
7546
|
var MemoizedAlert = /*#__PURE__*/React.memo(Alert__default["default"]);
|
|
7628
|
-
var Sidebar = function Sidebar() {
|
|
7547
|
+
var Sidebar = function Sidebar(_ref) {
|
|
7629
7548
|
var _themeToEdit$current, _themeToEdit$current2, _themeToDelete$curren2, _themeToDelete$curren3;
|
|
7549
|
+
var thumbnail = _ref.thumbnail;
|
|
7630
7550
|
var _useState = React.useState(DESIGN_SCREENS.THEMES),
|
|
7631
7551
|
_useState2 = _slicedToArray$3(_useState, 2),
|
|
7632
7552
|
currentScreen = _useState2[0],
|
|
@@ -7759,6 +7679,7 @@ var Sidebar = function Sidebar() {
|
|
|
7759
7679
|
isCurrentThemeLoading: isCurrentThemeLoading,
|
|
7760
7680
|
themeToHighlight: themeToHighlight,
|
|
7761
7681
|
themes: themes,
|
|
7682
|
+
thumbnail: thumbnail,
|
|
7762
7683
|
isLoading: isLoading || isFetchingConfig,
|
|
7763
7684
|
onDeleteTheme: handleDelete,
|
|
7764
7685
|
onEditTheme: handleEditTheme
|
|
@@ -7783,7 +7704,8 @@ var Sidebar = function Sidebar() {
|
|
|
7783
7704
|
var NeetoThemes = function NeetoThemes(_ref) {
|
|
7784
7705
|
var children = _ref.children,
|
|
7785
7706
|
entityType = _ref.entityType,
|
|
7786
|
-
entityId = _ref.entityId
|
|
7707
|
+
entityId = _ref.entityId,
|
|
7708
|
+
thumbnail = _ref.thumbnail;
|
|
7787
7709
|
var _useThemeStore = useThemeStore(function (store) {
|
|
7788
7710
|
return {
|
|
7789
7711
|
isCurrentThemeLoading: store["isCurrentThemeLoading"]
|
|
@@ -7804,7 +7726,9 @@ var NeetoThemes = function NeetoThemes(_ref) {
|
|
|
7804
7726
|
}, []);
|
|
7805
7727
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7806
7728
|
className: "neeto-themes__wrapper"
|
|
7807
|
-
}, /*#__PURE__*/React__default["default"].createElement(Sidebar,
|
|
7729
|
+
}, /*#__PURE__*/React__default["default"].createElement(Sidebar, {
|
|
7730
|
+
thumbnail: thumbnail
|
|
7731
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7808
7732
|
className: "neeto-themes-preview__wrapper"
|
|
7809
7733
|
}, isCurrentThemeLoading ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7810
7734
|
className: "m-auto flex h-full w-full items-center justify-center"
|