@zextras/carbonio-shell-ui 4.0.1 → 5.0.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.
Files changed (18) hide show
  1. package/README.md +13 -2
  2. package/dist/CHANGELOG.md +15 -0
  3. package/dist/PKGBUILD +7 -7
  4. package/dist/commit +1 -1
  5. package/dist/component.json +3 -3
  6. package/dist/index.html +1 -1
  7. package/dist/{src_boot_bootstrapper_tsx-node_modules_moment_locale_sync_recursive_.b9ce0d5d.chunk.js → src_boot_bootstrapper_tsx-node_modules_moment_locale_sync_recursive_.35d8a04f.chunk.js} +41 -35
  8. package/dist/src_boot_bootstrapper_tsx-node_modules_moment_locale_sync_recursive_.35d8a04f.chunk.js.map +1 -0
  9. package/dist/{src_workers_folder_ts.64e0e475.chunk.js → src_workers_folder_ts.8fc4735a.chunk.js} +2 -2
  10. package/dist/{src_workers_folder_ts.64e0e475.chunk.js.map → src_workers_folder_ts.8fc4735a.chunk.js.map} +1 -1
  11. package/dist/{style.a7b508b5.css → style.f5ce32fb.css} +29 -29
  12. package/dist/{style.a7b508b5.css.map → style.f5ce32fb.css.map} +1 -1
  13. package/dist/{vendors-node_modules_tinymce_skins_ui_oxide_skin_min_css-node_modules_reduxjs_toolkit_dist_re-3b2651.b25dfd0f.chunk.js → vendors-node_modules_tinymce_skins_ui_oxide_skin_min_css-node_modules_reduxjs_toolkit_dist_re-3b2651.46159311.chunk.js} +53382 -51937
  14. package/dist/{vendors-node_modules_tinymce_skins_ui_oxide_skin_min_css-node_modules_reduxjs_toolkit_dist_re-3b2651.b25dfd0f.chunk.js.map → vendors-node_modules_tinymce_skins_ui_oxide_skin_min_css-node_modules_reduxjs_toolkit_dist_re-3b2651.46159311.chunk.js.map} +1 -1
  15. package/dist/zapp-shell.bundle.js +2 -2
  16. package/dist/zapp-shell.bundle.js.map +1 -1
  17. package/package.json +3 -3
  18. package/dist/src_boot_bootstrapper_tsx-node_modules_moment_locale_sync_recursive_.b9ce0d5d.chunk.js.map +0 -1
package/README.md CHANGED
@@ -23,12 +23,13 @@ The main Carbonio Web Client interface
23
23
 
24
24
  <h4>Setup</h4>
25
25
 
26
- - clone this repo
26
+ - clone the repo
27
27
 
28
28
  - install the dependencies:
29
+
29
30
  ```
31
+ nvm use
30
32
  npm install
31
- npm run sdk-setup
32
33
  ```
33
34
 
34
35
  <h4>Watch Mode</h4>
@@ -39,6 +40,16 @@ npm run start -- -h <host>
39
40
 
40
41
  The host parameter is required to proxy requests and content from an existing Carbonio installation.
41
42
 
43
+ <h4>Deploy</h4>
44
+
45
+ To deploy to a host:
46
+
47
+ ```
48
+ npm run deploy -- -h <host>
49
+ ```
50
+
51
+ The host parameter is required to proxy requests and content from an existing Carbonio installation.
52
+
42
53
  <h4>Build</h4>
43
54
 
44
55
  ```
package/dist/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [5.0.0](https://github.com/zextras/carbonio-shell-ui/compare/v4.0.1...v5.0.0) (2023-11-22)
6
+
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * bump @zextras/carbonio-design-system dep to 4.0.0
11
+ Refs: SHELL-180
12
+
13
+ ### Bug Fixes
14
+
15
+ * **RouteLeavingGuard:** translate modal labels with shell instance ([bcf59a0](https://github.com/zextras/carbonio-shell-ui/commit/bcf59a09c37c9dcbceaba64b0258a8bf7609a1ab)), closes [#359](https://github.com/zextras/carbonio-shell-ui/issues/359)
16
+
17
+
18
+ * update ChipInput usages ([9366341](https://github.com/zextras/carbonio-shell-ui/commit/93663414f8b8312e826591f4667d8b470b0980e5))
19
+
5
20
  ### [4.0.1](https://github.com/zextras/carbonio-shell-ui/compare/v4.0.0...v4.0.1) (2023-11-06)
6
21
 
7
22
  ## [4.0.0](https://github.com/zextras/carbonio-shell-ui/compare/v3.4.3...v4.0.0) (2023-10-24)
package/dist/PKGBUILD CHANGED
@@ -10,7 +10,7 @@ targets=(
10
10
  "ubuntu"
11
11
  )
12
12
  pkgname="carbonio-shell-ui"
13
- pkgver="4.0.1"
13
+ pkgver="5.0.0"
14
14
  pkgrel="1"
15
15
  pkgdesc="The Zextras Carbonio web client"
16
16
  pkgdesclong=(
@@ -35,11 +35,11 @@ preinst() {
35
35
 
36
36
  package() {
37
37
  cd "${srcdir}"
38
- mkdir -p "${pkgdir}/opt/zextras/web/iris/${pkgname}/7a5930e241a9a27e56bce7478d0118f7d8eacb8c"
39
- cp -a ../dist/* "${pkgdir}/opt/zextras/web/iris/${pkgname}/7a5930e241a9a27e56bce7478d0118f7d8eacb8c" || true
40
- chown root:root -R "${pkgdir}/opt/zextras/web/iris/${pkgname}/7a5930e241a9a27e56bce7478d0118f7d8eacb8c"
41
- chmod 644 -R "${pkgdir}/opt/zextras/web/iris/${pkgname}/7a5930e241a9a27e56bce7478d0118f7d8eacb8c"
42
- find "${pkgdir}/opt/zextras/web/iris/${pkgname}/7a5930e241a9a27e56bce7478d0118f7d8eacb8c" -type d -exec chmod a+x "{}" \;
38
+ mkdir -p "${pkgdir}/opt/zextras/web/iris/${pkgname}/ae6f74cbcaea5512d1ce14d150825c1b8038a83a"
39
+ cp -a ../dist/* "${pkgdir}/opt/zextras/web/iris/${pkgname}/ae6f74cbcaea5512d1ce14d150825c1b8038a83a" || true
40
+ chown root:root -R "${pkgdir}/opt/zextras/web/iris/${pkgname}/ae6f74cbcaea5512d1ce14d150825c1b8038a83a"
41
+ chmod 644 -R "${pkgdir}/opt/zextras/web/iris/${pkgname}/ae6f74cbcaea5512d1ce14d150825c1b8038a83a"
42
+ find "${pkgdir}/opt/zextras/web/iris/${pkgname}/ae6f74cbcaea5512d1ce14d150825c1b8038a83a" -type d -exec chmod a+x "{}" \;
43
43
  }
44
44
 
45
45
  postinst() {
@@ -47,7 +47,7 @@ postinst() {
47
47
  mkdir -p "/opt/zextras/web/iris/${pkgname}/current"
48
48
 
49
49
  # not every package has a index.html
50
- cd "/opt/zextras/web/iris/${pkgname}/7a5930e241a9a27e56bce7478d0118f7d8eacb8c"
50
+ cd "/opt/zextras/web/iris/${pkgname}/ae6f74cbcaea5512d1ce14d150825c1b8038a83a"
51
51
  find . -name "*.html" -exec cp --parents "{}" /opt/zextras/web/iris/${pkgname}/current/ \;
52
52
 
53
53
  # re-generate the component list, for every component
package/dist/commit CHANGED
@@ -1 +1 @@
1
- 7a5930e241a9a27e56bce7478d0118f7d8eacb8c
1
+ ae6f74cbcaea5512d1ce14d150825c1b8038a83a
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "carbonio-shell-ui",
3
- "js_entrypoint": "/static/iris/carbonio-shell-ui/7a5930e241a9a27e56bce7478d0118f7d8eacb8c/zapp-shell.bundle.js",
3
+ "js_entrypoint": "/static/iris/carbonio-shell-ui/ae6f74cbcaea5512d1ce14d150825c1b8038a83a/zapp-shell.bundle.js",
4
4
  "description": "The Zextras Carbonio web client",
5
- "version": "4.0.1",
6
- "commit": "7a5930e241a9a27e56bce7478d0118f7d8eacb8c",
5
+ "version": "5.0.0",
6
+ "commit": "ae6f74cbcaea5512d1ce14d150825c1b8038a83a",
7
7
  "priority": -1,
8
8
  "type": "shell",
9
9
  "attrKey": "",
package/dist/index.html CHANGED
@@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
16
16
  <meta http-equiv="Cache-Control" content="no-cache" />
17
17
  <meta http-equiv="Pragma" content="no-cache" />
18
18
  <meta http-equiv="Expires" content="0" />
19
- <script defer src="/static/iris/carbonio-shell-ui/7a5930e241a9a27e56bce7478d0118f7d8eacb8c/zapp-shell.bundle.js"></script><link href="/static/iris/carbonio-shell-ui/7a5930e241a9a27e56bce7478d0118f7d8eacb8c/style.a7b508b5.css" rel="stylesheet"></head>
19
+ <script defer src="/static/iris/carbonio-shell-ui/ae6f74cbcaea5512d1ce14d150825c1b8038a83a/zapp-shell.bundle.js"></script><link href="/static/iris/carbonio-shell-ui/ae6f74cbcaea5512d1ce14d150825c1b8038a83a/style.f5ce32fb.css" rel="stylesheet"></head>
20
20
 
21
21
  <body>
22
22
  <div id="app"></div>
@@ -3087,7 +3087,7 @@ const OutlinedIconButton = (0,styled_components__WEBPACK_IMPORTED_MODULE_9__["de
3087
3087
  const StyledChipInput = (0,styled_components__WEBPACK_IMPORTED_MODULE_9__["default"])(_zextras_carbonio_design_system__WEBPACK_IMPORTED_MODULE_10__.ChipInput).withConfig({
3088
3088
  displayName: "search-bar__StyledChipInput",
3089
3089
  componentId: "sc-1h49lt8-1"
3090
- })(["padding:0 1rem;&:hover{outline:none;background:", ";}"], _ref2 => {
3090
+ })(["cursor:pointer;overflow-x:hidden;padding:0 1rem;&:hover{outline:none;background:", ";}"], _ref2 => {
3091
3091
  let {
3092
3092
  theme,
3093
3093
  disabled
@@ -3313,12 +3313,17 @@ const SearchBar = () => {
3313
3313
  options: options,
3314
3314
  placeholder: placeholder,
3315
3315
  confirmChipOnBlur: false,
3316
- separators: ['Enter', 'NumpadEnter', 'Comma', 'Space'],
3316
+ separators: [{
3317
+ key: 'Enter',
3318
+ ctrlKey: false
3319
+ }, {
3320
+ key: ',',
3321
+ ctrlKey: false
3322
+ }, {
3323
+ key: ' ',
3324
+ ctrlKey: false
3325
+ }],
3317
3326
  background: searchDisabled ? 'gray5' : 'gray6',
3318
- style: {
3319
- cursor: 'pointer',
3320
- overflowX: 'hidden'
3321
- },
3322
3327
  onChange: onQueryChange,
3323
3328
  onInputType: onInputType,
3324
3329
  onInputTypeDebounce: 0,
@@ -11350,7 +11355,7 @@ const defaultI18nInitOptions = {
11350
11355
  console.warn(`Missing translation with key '${key}'`);
11351
11356
  },
11352
11357
  backend: {
11353
- loadPath: `${"/static/iris/carbonio-shell-ui/7a5930e241a9a27e56bce7478d0118f7d8eacb8c/"}/i18n/{{lng}}.json`
11358
+ loadPath: `${"/static/iris/carbonio-shell-ui/ae6f74cbcaea5512d1ce14d150825c1b8038a83a/"}/i18n/{{lng}}.json`
11354
11359
  }
11355
11360
  };
11356
11361
  const useI18nStore = (0,zustand__WEBPACK_IMPORTED_MODULE_6__.create)()(set => ({
@@ -11384,7 +11389,7 @@ const useI18nStore = (0,zustand__WEBPACK_IMPORTED_MODULE_6__.create)()(set => ({
11384
11389
  ...defaultI18nInitOptions,
11385
11390
  lng: locale,
11386
11391
  backend: {
11387
- loadPath: app.name === _constants__WEBPACK_IMPORTED_MODULE_4__.SHELL_APP_ID ? `${"/static/iris/carbonio-shell-ui/7a5930e241a9a27e56bce7478d0118f7d8eacb8c/"}/i18n/{{lng}}.json` : `${(0,lodash__WEBPACK_IMPORTED_MODULE_2__.dropRight)(app.js_entrypoint.split('/')).join('/')}/i18n/{{lng}}.json`
11392
+ loadPath: app.name === _constants__WEBPACK_IMPORTED_MODULE_4__.SHELL_APP_ID ? `${"/static/iris/carbonio-shell-ui/ae6f74cbcaea5512d1ce14d150825c1b8038a83a/"}/i18n/{{lng}}.json` : `${(0,lodash__WEBPACK_IMPORTED_MODULE_2__.dropRight)(app.js_entrypoint.split('/')).join('/')}/i18n/{{lng}}.json`
11388
11393
  }
11389
11394
  });
11390
11395
  // eslint-disable-next-line no-param-reassign
@@ -11581,8 +11586,8 @@ const Composer = _ref => {
11581
11586
  });
11582
11587
  }, [inlineLabel, onFileClick, onFileSelect, t]);
11583
11588
  const editorInitConfig = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => ({
11584
- content_css: `${"/static/iris/carbonio-shell-ui/7a5930e241a9a27e56bce7478d0118f7d8eacb8c/"}/tinymce/skins/content/default/content.css`,
11585
- language_url: `${"/static/iris/carbonio-shell-ui/7a5930e241a9a27e56bce7478d0118f7d8eacb8c/"}tinymce/langs/${language}.js`,
11589
+ content_css: `${"/static/iris/carbonio-shell-ui/ae6f74cbcaea5512d1ce14d150825c1b8038a83a/"}/tinymce/skins/content/default/content.css`,
11590
+ language_url: `${"/static/iris/carbonio-shell-ui/ae6f74cbcaea5512d1ce14d150825c1b8038a83a/"}tinymce/langs/${language}.js`,
11586
11591
  language,
11587
11592
  setup: setupCallback,
11588
11593
  min_height: 350,
@@ -12104,7 +12109,7 @@ const useLoginConfigStore = (0,zustand__WEBPACK_IMPORTED_MODULE_0__.create)()(()
12104
12109
  // setup defaults for fields which does not depend on dark mode
12105
12110
  carbonioWebUiTitle: 'Carbonio Client',
12106
12111
  // default to png because this icon is used also in notification, and svg are not supported there
12107
- carbonioWebUiFavicon: `${"/static/iris/carbonio-shell-ui/7a5930e241a9a27e56bce7478d0118f7d8eacb8c/"}favicon.png`
12112
+ carbonioWebUiFavicon: `${"/static/iris/carbonio-shell-ui/ae6f74cbcaea5512d1ce14d150825c1b8038a83a/"}favicon.png`
12108
12113
  }));
12109
12114
 
12110
12115
  /***/ }),
@@ -12494,8 +12499,8 @@ __webpack_require__.r(__webpack_exports__);
12494
12499
  /* harmony import */ var _zextras_carbonio_design_system__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_zextras_carbonio_design_system__WEBPACK_IMPORTED_MODULE_5__);
12495
12500
  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
12496
12501
  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
12497
- /* harmony import */ var react_i18next__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-i18next */ "./node_modules/react-i18next/dist/es/index.js");
12498
12502
  /* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router/esm/react-router.js");
12503
+ /* harmony import */ var _store_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../store/i18n */ "./src/store/i18n/index.ts");
12499
12504
 
12500
12505
  /*
12501
12506
  * SPDX-FileCopyrightText: 2021 Zextras <https://www.zextras.com>
@@ -12518,22 +12523,29 @@ const RouteLeavingGuard = _ref => {
12518
12523
  const history = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_4__.useHistory)();
12519
12524
  const lastLocationInitial = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(() => history.location, [history]);
12520
12525
  const [modalVisible, setModalVisible] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
12521
- const [lastLocation, setLastLocation] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(lastLocationInitial);
12522
- const [confirmedNavigation, setConfirmedNavigation] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
12523
- const [t] = (0,react_i18next__WEBPACK_IMPORTED_MODULE_3__.useTranslation)();
12524
- const cancel = () => {
12526
+ const lastLocationRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(lastLocationInitial);
12527
+ const confirmedNavigationRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);
12528
+ const t = (0,_store_i18n__WEBPACK_IMPORTED_MODULE_3__.getT)();
12529
+ const cancel = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(() => {
12525
12530
  setModalVisible(false);
12526
- setConfirmedNavigation(false);
12527
- };
12528
- const handleBlockedNavigation = nextLocation => {
12529
- if (!confirmedNavigation && `${nextLocation.pathname}${nextLocation.search || ''}` !== `${history.location.pathname}${history.location.search}`) {
12531
+ confirmedNavigationRef.current = false;
12532
+ }, []);
12533
+ const confirmNavigation = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(() => {
12534
+ confirmedNavigationRef.current = true;
12535
+ if (lastLocationRef.current) {
12536
+ // Navigate to the previous blocked location with your navigate function
12537
+ history.push(lastLocationRef.current);
12538
+ }
12539
+ }, [history]);
12540
+ const handleBlockedNavigation = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(nextLocation => {
12541
+ if (!confirmedNavigationRef.current && `${nextLocation.pathname}${nextLocation.search || ''}` !== `${history.location.pathname}${history.location.search}`) {
12530
12542
  setModalVisible(true);
12531
- setLastLocation(nextLocation);
12543
+ lastLocationRef.current = nextLocation;
12532
12544
  return false;
12533
12545
  }
12534
12546
  return true;
12535
- };
12536
- const onConfirm = () => {
12547
+ }, [history.location.pathname, history.location.search]);
12548
+ const onConfirm = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(() => {
12537
12549
  onSave().then(results => {
12538
12550
  const rejected = (0,lodash__WEBPACK_IMPORTED_MODULE_2__.filter)(results, result => result.status === 'rejected');
12539
12551
  if (rejected.length > 0) {
@@ -12541,23 +12553,17 @@ const RouteLeavingGuard = _ref => {
12541
12553
  cancel();
12542
12554
  } else {
12543
12555
  setModalVisible(false);
12544
- setConfirmedNavigation(true);
12556
+ confirmNavigation();
12545
12557
  }
12546
12558
  }).catch(reason => {
12547
12559
  console.error(reason);
12548
12560
  cancel();
12549
12561
  });
12550
- };
12551
- const onSecondaryAction = () => {
12562
+ }, [cancel, confirmNavigation, onSave]);
12563
+ const onSecondaryAction = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(() => {
12552
12564
  setModalVisible(false);
12553
- setConfirmedNavigation(true);
12554
- };
12555
- (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
12556
- if (confirmedNavigation && lastLocation) {
12557
- // Navigate to the previous blocked location with your navigate function
12558
- history.push(lastLocation);
12559
- }
12560
- }, [confirmedNavigation, history, lastLocation]);
12565
+ confirmNavigation();
12566
+ }, [confirmNavigation]);
12561
12567
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.Prompt, {
12562
12568
  when: when,
12563
12569
  message: handleBlockedNavigation
@@ -13499,4 +13505,4 @@ module.exports = __webpack_require__.p + "20d012c938e8d0dcc703.mp3";
13499
13505
  /***/ })
13500
13506
 
13501
13507
  }]);
13502
- //# sourceMappingURL=src_boot_bootstrapper_tsx-node_modules_moment_locale_sync_recursive_.b9ce0d5d.chunk.js.map
13508
+ //# sourceMappingURL=src_boot_bootstrapper_tsx-node_modules_moment_locale_sync_recursive_.35d8a04f.chunk.js.map