@univerjs/sheets-hyper-link-ui 0.2.7 → 0.2.9

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 (32) hide show
  1. package/README.md +23 -0
  2. package/lib/cjs/index.js +2 -2
  3. package/lib/es/index.js +544 -428
  4. package/lib/types/commands/commands/add-hyper-link.command.d.ts +11 -0
  5. package/lib/types/commands/commands/remove-hyper-link.command.d.ts +11 -0
  6. package/lib/types/commands/commands/update-hyper-link.command.d.ts +9 -0
  7. package/lib/types/commands/operations/sidebar.operations.d.ts +0 -1
  8. package/lib/types/common/util.d.ts +0 -1
  9. package/lib/types/controllers/auto-fill.controller.d.ts +0 -1
  10. package/lib/types/controllers/copy-paste.controller.d.ts +0 -1
  11. package/lib/types/controllers/hyper-link-permission.controller.d.ts +0 -1
  12. package/lib/types/controllers/menu.d.ts +0 -1
  13. package/lib/types/controllers/popup.controller.d.ts +4 -3
  14. package/lib/types/controllers/remove-sheet.controller.d.ts +0 -1
  15. package/lib/types/controllers/render-controllers/render.controller.d.ts +0 -1
  16. package/lib/types/controllers/set-range.controller.d.ts +0 -1
  17. package/lib/types/controllers/ui.controller.d.ts +0 -1
  18. package/lib/types/controllers/url.controller.d.ts +0 -1
  19. package/lib/types/index.d.ts +3 -7
  20. package/lib/types/locale/en-US.d.ts +0 -1
  21. package/lib/types/locale/ru-RU.d.ts +0 -1
  22. package/lib/types/locale/vi-VN.d.ts +0 -1
  23. package/lib/types/locale/zh-TW.d.ts +0 -1
  24. package/lib/types/plugin.d.ts +0 -1
  25. package/lib/types/services/popup.service.d.ts +0 -1
  26. package/lib/types/services/resolver.service.d.ts +0 -1
  27. package/lib/types/services/side-panel.service.d.ts +0 -1
  28. package/lib/types/types/interfaces/i-config.d.ts +0 -1
  29. package/lib/types/views/CellLinkEdit/index.d.ts +0 -1
  30. package/lib/types/views/CellLinkPopup/index.d.ts +0 -1
  31. package/lib/umd/index.js +2 -2
  32. package/package.json +23 -23
@@ -0,0 +1,11 @@
1
+ import { ICommand } from '@univerjs/core';
2
+ import { ICellHyperLink } from '@univerjs/sheets-hyper-link';
3
+ export interface IAddHyperLinkCommandParams {
4
+ unitId: string;
5
+ subUnitId: string;
6
+ link: ICellHyperLink;
7
+ }
8
+ /**
9
+ * Command for add hyperlink
10
+ */
11
+ export declare const AddHyperLinkCommand: ICommand<IAddHyperLinkCommandParams>;
@@ -0,0 +1,11 @@
1
+ import { ICommand } from '@univerjs/core';
2
+ export interface IRemoveHyperLinkCommandParams {
3
+ unitId: string;
4
+ subUnitId: string;
5
+ /**
6
+ * id of link
7
+ */
8
+ id: string;
9
+ }
10
+ export declare const RemoveHyperLinkCommand: ICommand<IRemoveHyperLinkCommandParams>;
11
+ export declare const CancelHyperLinkCommand: ICommand<IRemoveHyperLinkCommandParams>;
@@ -0,0 +1,9 @@
1
+ import { ICommand } from '@univerjs/core';
2
+ import { ICellLinkContent } from '@univerjs/sheets-hyper-link';
3
+ export interface IUpdateHyperLinkCommandParams {
4
+ unitId: string;
5
+ subUnitId: string;
6
+ id: string;
7
+ payload: ICellLinkContent;
8
+ }
9
+ export declare const UpdateHyperLinkCommand: ICommand<IUpdateHyperLinkCommandParams>;
@@ -1,6 +1,5 @@
1
1
  import { ICommand } from '@univerjs/core';
2
2
  import { ISheetCommandSharedParams } from '@univerjs/sheets';
3
-
4
3
  export interface IOpenHyperLinkSidebarOperationParams extends ISheetCommandSharedParams {
5
4
  row: number;
6
5
  column: number;
@@ -1,5 +1,4 @@
1
1
  import { ICellData, Nullable } from '@univerjs/core';
2
-
3
2
  export declare function isLegalLink(link: string): boolean;
4
3
  export declare function hasProtocol(urlString: string): boolean;
5
4
  export declare function isEmail(url: string): boolean;
@@ -1,7 +1,6 @@
1
1
  import { Disposable } from '@univerjs/core';
2
2
  import { HyperLinkModel } from '@univerjs/sheets-hyper-link';
3
3
  import { IAutoFillService } from '@univerjs/sheets-ui';
4
-
5
4
  export declare class SheetsHyperLinkAutoFillController extends Disposable {
6
5
  private readonly _autoFillService;
7
6
  private readonly _hyperLinkModel;
@@ -2,7 +2,6 @@ import { Disposable, Injector } from '@univerjs/core';
2
2
  import { HyperLinkModel } from '@univerjs/sheets-hyper-link';
3
3
  import { ISheetClipboardService } from '@univerjs/sheets-ui';
4
4
  import { SheetsHyperLinkResolverService } from '../services/resolver.service';
5
-
6
5
  export declare class SheetsHyperLinkCopyPasteController extends Disposable {
7
6
  private _sheetClipboardService;
8
7
  private _hyperLinkModel;
@@ -1,6 +1,5 @@
1
1
  import { Disposable, ICommandService, LocaleService } from '@univerjs/core';
2
2
  import { SheetPermissionInterceptorBaseController } from '@univerjs/sheets-ui';
3
-
4
3
  export declare class SheetsHyperLinkPermissionController extends Disposable {
5
4
  private _localeService;
6
5
  private readonly _commandService;
@@ -1,6 +1,5 @@
1
1
  import { IMenuItem, IShortcutItem, MenuGroup, MenuItemType, MenuPosition } from '@univerjs/ui';
2
2
  import { IAccessor } from '@univerjs/core';
3
-
4
3
  export declare const insertLinkMenuFactory: (accessor: IAccessor) => IMenuItem;
5
4
  export declare const insertLinkMenuToolbarFactory: (accessor: IAccessor) => {
6
5
  tooltip: string;
@@ -1,14 +1,15 @@
1
- import { Disposable, IPermissionService } from '@univerjs/core';
1
+ import { Disposable, ICommandService, IPermissionService } from '@univerjs/core';
2
2
  import { HoverManagerService, SheetPermissionInterceptorBaseController } from '@univerjs/sheets-ui';
3
3
  import { IRenderManagerService } from '@univerjs/engine-render';
4
4
  import { SheetsHyperLinkPopupService } from '../services/popup.service';
5
-
6
5
  export declare class SheetsHyperLinkPopupController extends Disposable {
7
6
  private readonly _hoverManagerService;
8
7
  private readonly _sheetsHyperLinkPopupService;
9
8
  private readonly _renderManagerService;
10
9
  private readonly _permissionService;
11
10
  private readonly _sheetPermissionInterceptorBaseController;
12
- constructor(_hoverManagerService: HoverManagerService, _sheetsHyperLinkPopupService: SheetsHyperLinkPopupService, _renderManagerService: IRenderManagerService, _permissionService: IPermissionService, _sheetPermissionInterceptorBaseController: SheetPermissionInterceptorBaseController);
11
+ private readonly _commandService;
12
+ constructor(_hoverManagerService: HoverManagerService, _sheetsHyperLinkPopupService: SheetsHyperLinkPopupService, _renderManagerService: IRenderManagerService, _permissionService: IPermissionService, _sheetPermissionInterceptorBaseController: SheetPermissionInterceptorBaseController, _commandService: ICommandService);
13
13
  private _initHoverListener;
14
+ private _initCommandListener;
14
15
  }
@@ -1,7 +1,6 @@
1
1
  import { Disposable, IUniverInstanceService } from '@univerjs/core';
2
2
  import { SheetInterceptorService } from '@univerjs/sheets';
3
3
  import { HyperLinkModel } from '@univerjs/sheets-hyper-link';
4
-
5
4
  export declare class SheetsHyperLinkRemoveSheetController extends Disposable {
6
5
  private _sheetInterceptorService;
7
6
  private _univerInstanceService;
@@ -3,7 +3,6 @@ import { SheetInterceptorService } from '@univerjs/sheets';
3
3
  import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';
4
4
  import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
5
5
  import { HyperLinkModel } from '@univerjs/sheets-hyper-link';
6
-
7
6
  export declare class SheetsHyperLinkRenderController extends Disposable implements IRenderModule {
8
7
  private readonly _context;
9
8
  private readonly _hyperLinkModel;
@@ -2,7 +2,6 @@ import { Disposable, Injector, IUniverInstanceService } from '@univerjs/core';
2
2
  import { SheetInterceptorService, SheetsSelectionsService } from '@univerjs/sheets';
3
3
  import { HyperLinkModel } from '@univerjs/sheets-hyper-link';
4
4
  import { IEditorBridgeService } from '@univerjs/sheets-ui';
5
-
6
5
  export declare class SheetHyperLinkSetRangeController extends Disposable {
7
6
  private readonly _sheetInterceptorService;
8
7
  private readonly _injector;
@@ -1,7 +1,6 @@
1
1
  import { Nullable, Disposable, ICommandService, Injector, LocaleService } from '@univerjs/core';
2
2
  import { ComponentManager, IMenuService, IShortcutService } from '@univerjs/ui';
3
3
  import { IUniverSheetsHyperLinkUIConfig } from '../types/interfaces/i-config';
4
-
5
4
  export declare class SheetsHyperLinkUIController extends Disposable {
6
5
  private _config;
7
6
  private _componentManager;
@@ -1,6 +1,5 @@
1
1
  import { Disposable } from '@univerjs/core';
2
2
  import { SheetsHyperLinkResolverService } from '../services/resolver.service';
3
-
4
3
  export declare class SheetHyperLinkUrlController extends Disposable {
5
4
  private _resolverService;
6
5
  constructor(_resolverService: SheetsHyperLinkResolverService);
@@ -13,18 +13,14 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export { SheetsHyperLinkRemoveSheetController } from './controllers/remove-sheet.controller';
17
- export { SheetsHyperLinkRenderManagerController, SheetsHyperLinkRenderController } from './controllers/render-controllers/render.controller';
18
16
  export { SheetsHyperLinkSidePanelService, type ICustomHyperLinkView } from './services/side-panel.service';
19
17
  export { SheetsHyperLinkPopupService } from './services/popup.service';
20
18
  export { SheetsHyperLinkResolverService } from './services/resolver.service';
21
- export { SheetHyperLinkSetRangeController } from './controllers/set-range.controller';
22
- export { SheetsHyperLinkPopupController } from './controllers/popup.controller';
23
- export { SheetsHyperLinkUIController } from './controllers/ui.controller';
24
- export { SheetsHyperLinkAutoFillController } from './controllers/auto-fill.controller';
25
19
  export { SheetsHyperLinkCopyPasteController } from './controllers/copy-paste.controller';
26
- export { SheetHyperLinkUrlController } from './controllers/url.controller';
27
20
  export { UniverSheetsHyperLinkUIPlugin } from './plugin';
28
21
  export { InsertLinkShortcut } from './controllers/menu';
29
22
  export type { IUrlHandler, IUniverSheetsHyperLinkUIConfig } from './types/interfaces/i-config';
30
23
  export { OpenHyperLinkSidebarOperation, InsertHyperLinkOperation, CloseHyperLinkSidebarOperation, type IOpenHyperLinkSidebarOperationParams, } from './commands/operations/sidebar.operations';
24
+ export { AddHyperLinkCommand, type IAddHyperLinkCommandParams } from './commands/commands/add-hyper-link.command';
25
+ export { RemoveHyperLinkCommand, CancelHyperLinkCommand, type IRemoveHyperLinkCommandParams } from './commands/commands/remove-hyper-link.command';
26
+ export { UpdateHyperLinkCommand, type IUpdateHyperLinkCommandParams } from './commands/commands/update-hyper-link.command';
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const enUS: typeof zhCN;
4
3
  export default enUS;
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const enUS: typeof zhCN;
4
3
  export default enUS;
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -1,7 +1,6 @@
1
1
  import { Nullable, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
2
2
  import { IRenderManagerService } from '@univerjs/engine-render';
3
3
  import { IUniverSheetsHyperLinkUIConfig } from './types/interfaces/i-config';
4
-
5
4
  export declare class UniverSheetsHyperLinkUIPlugin extends Plugin {
6
5
  private _config;
7
6
  protected _injector: Injector;
@@ -2,7 +2,6 @@ import { ISheetLocationBase } from '@univerjs/sheets';
2
2
  import { HyperLinkModel } from '@univerjs/sheets-hyper-link';
3
3
  import { SheetCanvasPopManagerService } from '@univerjs/sheets-ui';
4
4
  import { IDisposable, Disposable } from '@univerjs/core';
5
-
6
5
  export interface IHyperLinkPopup {
7
6
  unitId: string;
8
7
  subUnitId: string;
@@ -2,7 +2,6 @@ import { IRange, Nullable, Worksheet, ICommandService, IUniverInstanceService, L
2
2
  import { IDefinedNamesService } from '@univerjs/engine-formula';
3
3
  import { IMessageService } from '@univerjs/ui';
4
4
  import { IUrlHandler } from '../types/interfaces/i-config';
5
-
6
5
  interface ISheetUrlParams {
7
6
  gid?: string;
8
7
  range?: string;
@@ -1,7 +1,6 @@
1
1
  import { Disposable } from '@univerjs/core';
2
2
  import { ICellHyperLink } from '@univerjs/sheets-hyper-link';
3
3
  import { default as React } from 'react';
4
-
5
4
  export interface CustomHyperLinkFormProps {
6
5
  linkId: string;
7
6
  payload: string;
@@ -1,5 +1,4 @@
1
1
  import { MenuConfig } from '@univerjs/ui';
2
-
3
2
  export interface IUrlHandler {
4
3
  navigateToOtherWebsite?: (url: string) => void;
5
4
  }
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare const CellLinkEdit: {
4
3
  (): React.JSX.Element | undefined;
5
4
  componentKey: string;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare const CellLinkPopup: {
4
3
  (): React.JSX.Element | null;
5
4
  componentKey: string;