@univerjs-pro/drill-down-extraction 0.5.0-nightly.202411121606 → 0.5.0-nightly.202411141606
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/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/types/common/extraction-field.d.ts +24 -0
- package/lib/types/common/field-extraction-event.d.ts +34 -0
- package/lib/types/constants.d.ts +1 -0
- package/lib/types/controllers/config.schema.d.ts +5 -0
- package/lib/types/controllers/drill-down-extraction-hyper-link.controller.d.ts +21 -0
- package/lib/types/controllers/drill-down-extraction-ui.controller.d.ts +7 -0
- package/lib/types/controllers/drill-down-extraction.controller.d.ts +61 -0
- package/lib/types/index.d.ts +3 -95
- package/lib/types/locale/en-US.d.ts +3 -0
- package/lib/types/locale/fa-IR.d.ts +3 -0
- package/lib/types/locale/ru-RU.d.ts +3 -0
- package/lib/types/locale/vi-VN.d.ts +3 -0
- package/lib/types/locale/zh-CN.d.ts +46 -0
- package/lib/types/locale/zh-TW.d.ts +3 -0
- package/lib/types/plugin.d.ts +13 -0
- package/lib/types/services/suggestion-manager.service.d.ts +62 -0
- package/lib/types/views/components/ExtractionFieldForm.d.ts +2 -0
- package/lib/types/views/components/FloatingButton.d.ts +25 -0
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +12 -12
package/lib/es/locale/vi-VN.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
const _0x518fb8=_0x1332;function _0x2e39(){const _0x44569c=['Hyperlink\x20in\x20the\x20column','Confirm','Cancel','1387815XtWPSY','17406RixXsj','The\x20result\x20has\x20been\x20discarded','12kjLyLR','To\x20Install','192007qKFZiF','288835WrXCAw','Please\x20select\x20the\x20field\x20to\x20be\x20extracted','{0}\x20rows\x20extraction\x20limit\x20reached.\x20To\x20extract\x20more\x20rows,\x20please\x20subscribe.','Stop','Extracting\x20Fields...','No\x20options\x20available','\x20Fields\x20extraction\x20successfully','Begin\x20Extracting\x20Fields','Extraction\x20Fields','Fields\x20extraction\x20has\x20been\x20cancelled','Extraction\x20data\x20has\x20been\x20cancelled:\x20{0}','28827jpyCDS','Fields\x20extraction\x20Process','Feature\x20under\x20development.\x20Stay\x20tuned!','Extraction\x20field','Select\x20the\x20link\x20to\x20the\x20data\x20source','Fields\x20extraction\x20is\x20successful.\x20Check\x20whether\x20the\x20data\x20is\x20correct.','\x20Fields\x20extraction\x20process','Limited\x20per\x20extraction','20yADEwW','Retry','1078TaANnN','2XvuqDy','Select\x20the\x20fields','Fields\x20extraction\x20has\x20been\x20stopped.','\x20Fields\x20extract\x20data\x20successfully','24xaENiK','\x20Fields','3144VpzxIa','The\x20field\x20extraction\x20process\x20requires\x20the\x20Clipsheet\x20extension\x20to\x20be\x20installed.','621388KkKaEw'];_0x2e39=function(){return _0x44569c;};return _0x2e39();}(function(_0x23313a,_0x131c64){const _0x1d514f=_0x1332,_0x38f99d=_0x23313a();while(!![]){try{const _0x5cd303=-parseInt(_0x1d514f(0x178))/0x1+parseInt(_0x1d514f(0x167))/0x2*(parseInt(_0x1d514f(0x174))/0x3)+parseInt(_0x1d514f(0x16f))/0x4+-parseInt(_0x1d514f(0x179))/0x5*(-parseInt(_0x1d514f(0x16b))/0x6)+-parseInt(_0x1d514f(0x166))/0x7*(-parseInt(_0x1d514f(0x16d))/0x8)+parseInt(_0x1d514f(0x184))/0x9*(-parseInt(_0x1d514f(0x164))/0xa)+-parseInt(_0x1d514f(0x173))/0xb*(parseInt(_0x1d514f(0x176))/0xc);if(_0x5cd303===_0x131c64)break;else _0x38f99d['push'](_0x38f99d['shift']());}catch(_0xb65cca){_0x38f99d['push'](_0x38f99d['shift']());}}}(_0x2e39,0x1f4a1));const e={'drill-down-extraction':{'message':{'failed':_0x518fb8(0x183),'success':_0x518fb8(0x16a),'drop':_0x518fb8(0x175)},'config':{'title':_0x518fb8(0x185),'helper':_0x518fb8(0x162),'dataSource':_0x518fb8(0x170),'dataSourcePlaceholder':_0x518fb8(0x160),'dataSourceError':'Please\x20select\x20a\x20link','column':_0x518fb8(0x181),'columnPlaceholder':_0x518fb8(0x168),'columnError':_0x518fb8(0x17a),'columnItemTitle':_0x518fb8(0x16c),'optionsBlank':_0x518fb8(0x17e),'gettingData':_0x518fb8(0x17d),'gettingDataError':'Failed\x20to\x20extract\x20data.','stopMessage':_0x518fb8(0x169),'gettingDataSuccess':_0x518fb8(0x161),'startCompletion':_0x518fb8(0x180),'drop':'Drop','retry':_0x518fb8(0x165),'confirm':_0x518fb8(0x171),'stop':_0x518fb8(0x17c),'cancel':_0x518fb8(0x172),'subscribe':'Subscribe','toInstall':_0x518fb8(0x177),'SuccessMessage':_0x518fb8(0x17f),'cancelMessage':_0x518fb8(0x182),'dropMessage':'The\x20result\x20has\x20been\x20discarded','stayTuned':_0x518fb8(0x186),'limitDialogTitle':_0x518fb8(0x163),'limitDialogContent':_0x518fb8(0x17b),'extensionDialogTitle':'No\x20extension\x20installed','extensionDialogContent':_0x518fb8(0x16e)},'hyperLink':{'optionLabel':_0x518fb8(0x187),'placeholder':'Please\x20get\x20the\x20extraction\x20field\x20by\x20ClipSheet\x20extension'}}},t=e;function _0x1332(_0x5427dd,_0x3aa5d1){const _0x2e39ab=_0x2e39();return _0x1332=function(_0x133227,_0x29e865){_0x133227=_0x133227-0x160;let _0x4ccee3=_0x2e39ab[_0x133227];return _0x4ccee3;},_0x1332(_0x5427dd,_0x3aa5d1);}export{t as default};
|
package/lib/es/locale/zh-CN.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function
|
1
|
+
const _0x1d33f0=_0x3923;function _0x3923(_0x422168,_0x3835d8){const _0x1637b8=_0x1637();return _0x3923=function(_0x3923b3,_0x575350){_0x3923b3=_0x3923b3-0x123;let _0x4f7749=_0x1637b8[_0x3923b3];return _0x4f7749;},_0x3923(_0x422168,_0x3835d8);}(function(_0x2e3bca,_0x26ee0f){const _0x4947ab=_0x3923,_0x3ce87f=_0x2e3bca();while(!![]){try{const _0x1a37cd=parseInt(_0x4947ab(0x13f))/0x1+parseInt(_0x4947ab(0x13c))/0x2*(parseInt(_0x4947ab(0x133))/0x3)+parseInt(_0x4947ab(0x132))/0x4*(parseInt(_0x4947ab(0x136))/0x5)+parseInt(_0x4947ab(0x12b))/0x6+-parseInt(_0x4947ab(0x125))/0x7+parseInt(_0x4947ab(0x13b))/0x8*(-parseInt(_0x4947ab(0x138))/0x9)+-parseInt(_0x4947ab(0x131))/0xa;if(_0x1a37cd===_0x26ee0f)break;else _0x3ce87f['push'](_0x3ce87f['shift']());}catch(_0x2159b3){_0x3ce87f['push'](_0x3ce87f['shift']());}}}(_0x1637,0x6a025));const e={'drill-down-extraction':{'message':{'failed':_0x1d33f0(0x12a),'success':_0x1d33f0(0x137),'drop':_0x1d33f0(0x13a)},'config':{'title':_0x1d33f0(0x124),'helper':_0x1d33f0(0x135),'dataSource':_0x1d33f0(0x123),'dataSourcePlaceholder':_0x1d33f0(0x12c),'dataSourceError':_0x1d33f0(0x12d),'column':_0x1d33f0(0x129),'columnPlaceholder':_0x1d33f0(0x13e),'columnError':_0x1d33f0(0x13e),'columnItemTitle':'字段','optionsBlank':_0x1d33f0(0x12f),'gettingData':'数据采集中...','gettingDataError':_0x1d33f0(0x139),'stopMessage':_0x1d33f0(0x134),'gettingDataSuccess':'数据采集成功,请检查是否正确','startCompletion':_0x1d33f0(0x128),'drop':'丢弃','retry':'重试','confirm':'确认','stop':'停止','cancel':'取消','subscribe':'订阅','toInstall':'前去安装','SuccessMessage':'数据采集成功','cancelMessage':_0x1d33f0(0x13d),'dropMessage':'已丢弃采集数据','stayTuned':'功能正在开发中,敬请期待!','limitDialogTitle':_0x1d33f0(0x126),'limitDialogContent':'已达到\x20{0}\x20行采集上限,要采集更多数据,请订阅。','extensionDialogTitle':_0x1d33f0(0x12e),'extensionDialogContent':_0x1d33f0(0x127)},'hyperLink':{'optionLabel':'采集字段','placeholder':_0x1d33f0(0x130)}}};export{e as default};function _0x1637(){const _0x58e0a5=['56OOytTN','587966YznDMx','已取消数据采集','选择采集字段','865059MMCIZs','超链接所在列','数据采集','2901472kqENlb','采集限制提醒','采集字段写入数据需要安装\x20Clipsheet\x20扩展。','开始数据采集','采集字段','数据采集失败:\x20{0}','4085202XSiKYb','选择数据源链接','请选择数据源链接','未安装扩展','暂无选项','请使用插件获取采集字段','2711990byadlL','92PuvMJz','3HhMFjp','数据采集已暂停','用采集字段写入数据','23095EzuKHv','数据采集完成','1062306aYLglA','采集数据失败','已丢弃采集数据'];_0x1637=function(){return _0x58e0a5;};return _0x1637();}
|
package/lib/es/locale/zh-TW.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function
|
1
|
+
const _0x51dcf7=_0x39ae;function _0x39ae(_0x309fb3,_0x24fc29){const _0x45ce06=_0x45ce();return _0x39ae=function(_0x39ae41,_0x2a2958){_0x39ae41=_0x39ae41-0x139;let _0x4789e4=_0x45ce06[_0x39ae41];return _0x4789e4;},_0x39ae(_0x309fb3,_0x24fc29);}function _0x45ce(){const _0x5b6b47=['Please\x20select\x20the\x20field\x20to\x20be\x20extracted','\x20Fields\x20extraction\x20process','1988CmvJRA','Retry','220xMlvpY','\x20Fields\x20extraction\x20successfully','3445jxbiix','The\x20result\x20has\x20been\x20discarded','\x20Fields\x20extract\x20data\x20successfully','The\x20field\x20extraction\x20process\x20requires\x20the\x20Clipsheet\x20extension\x20to\x20be\x20installed.','Confirm','1713572mYJitd','No\x20extension\x20installed','Extraction\x20data\x20has\x20been\x20cancelled:\x20{0}','Limited\x20per\x20extraction','\x20Fields','250eZXsks','{0}\x20rows\x20extraction\x20limit\x20reached.\x20To\x20extract\x20more\x20rows,\x20please\x20subscribe.','Select\x20the\x20fields','6723HuCFqK','161091bfGEjm','No\x20options\x20available','Subscribe','Stop','Fields\x20extraction\x20is\x20successful.\x20Check\x20whether\x20the\x20data\x20is\x20correct.','2446926hJAsMY','147785vGXFNy','893592oGaBqA','Cancel','Fields\x20extraction\x20Process','Select\x20the\x20link\x20to\x20the\x20data\x20source','Please\x20get\x20the\x20extraction\x20field\x20by\x20ClipSheet\x20extension','To\x20Install','Fields\x20extraction\x20has\x20been\x20stopped.','Please\x20select\x20a\x20link','Begin\x20Extracting\x20Fields','Hyperlink\x20in\x20the\x20column'];_0x45ce=function(){return _0x5b6b47;};return _0x45ce();}(function(_0x18114d,_0x190453){const _0x4e1137=_0x39ae,_0x5e0373=_0x18114d();while(!![]){try{const _0x5b397a=parseInt(_0x4e1137(0x159))/0x1+parseInt(_0x4e1137(0x143))/0x2*(parseInt(_0x4e1137(0x152))/0x3)+-parseInt(_0x4e1137(0x141))/0x4*(-parseInt(_0x4e1137(0x145))/0x5)+-parseInt(_0x4e1137(0x158))/0x6+parseInt(_0x4e1137(0x14a))/0x7+parseInt(_0x4e1137(0x15a))/0x8+parseInt(_0x4e1137(0x153))/0x9*(-parseInt(_0x4e1137(0x14f))/0xa);if(_0x5b397a===_0x190453)break;else _0x5e0373['push'](_0x5e0373['shift']());}catch(_0x41bba9){_0x5e0373['push'](_0x5e0373['shift']());}}}(_0x45ce,0x3a167));const e={'drill-down-extraction':{'message':{'failed':_0x51dcf7(0x14c),'success':_0x51dcf7(0x147),'drop':'The\x20result\x20has\x20been\x20discarded'},'config':{'title':_0x51dcf7(0x15c),'helper':_0x51dcf7(0x140),'dataSource':_0x51dcf7(0x13e),'dataSourcePlaceholder':_0x51dcf7(0x15d),'dataSourceError':_0x51dcf7(0x13c),'column':'Extraction\x20Fields','columnPlaceholder':_0x51dcf7(0x151),'columnError':_0x51dcf7(0x13f),'columnItemTitle':_0x51dcf7(0x14e),'optionsBlank':_0x51dcf7(0x154),'gettingData':'Extracting\x20Fields...','gettingDataError':'Failed\x20to\x20extract\x20data.','stopMessage':_0x51dcf7(0x13b),'gettingDataSuccess':_0x51dcf7(0x157),'startCompletion':_0x51dcf7(0x13d),'drop':'Drop','retry':_0x51dcf7(0x142),'confirm':_0x51dcf7(0x149),'stop':_0x51dcf7(0x156),'cancel':_0x51dcf7(0x15b),'subscribe':_0x51dcf7(0x155),'toInstall':_0x51dcf7(0x13a),'SuccessMessage':_0x51dcf7(0x144),'cancelMessage':'Fields\x20extraction\x20has\x20been\x20cancelled','dropMessage':_0x51dcf7(0x146),'stayTuned':'Feature\x20under\x20development.\x20Stay\x20tuned!','limitDialogTitle':_0x51dcf7(0x14d),'limitDialogContent':_0x51dcf7(0x150),'extensionDialogTitle':_0x51dcf7(0x14b),'extensionDialogContent':_0x51dcf7(0x148)},'hyperLink':{'optionLabel':'Extraction\x20field','placeholder':_0x51dcf7(0x139)}}},t=e;export{t as default};
|
@@ -0,0 +1,24 @@
|
|
1
|
+
export declare const EXTRACTION_FIELD_TYPE = "extract_field";
|
2
|
+
export interface ISelectorItem {
|
3
|
+
selector: string;
|
4
|
+
text: string;
|
5
|
+
}
|
6
|
+
export interface IExtractionFieldData {
|
7
|
+
url: string;
|
8
|
+
type: typeof EXTRACTION_FIELD_TYPE;
|
9
|
+
selectors: Array<ISelectorItem>;
|
10
|
+
}
|
11
|
+
export declare const extractionFieldLinkHelper: {
|
12
|
+
payloadPattern: RegExp;
|
13
|
+
getSelectorItems(data: IExtractionFieldData): {
|
14
|
+
text: string;
|
15
|
+
payload: string;
|
16
|
+
}[];
|
17
|
+
generateLinkPayload(url: string, selector: string): string;
|
18
|
+
isPayload(payload: string): boolean;
|
19
|
+
parsePayload(payload: string): [string, string] | null;
|
20
|
+
};
|
21
|
+
export declare const extractionFieldHelper: {
|
22
|
+
parsePlainText(clipboard: string): IExtractionFieldData | null;
|
23
|
+
checkData(data: any): data is IExtractionFieldData;
|
24
|
+
};
|
@@ -0,0 +1,34 @@
|
|
1
|
+
export interface IFieldExtractionRequestEvent {
|
2
|
+
id: string;
|
3
|
+
interval: number;
|
4
|
+
url: string;
|
5
|
+
selectors: string[];
|
6
|
+
}
|
7
|
+
export interface IFieldExtractionResponseEvent {
|
8
|
+
id: string;
|
9
|
+
url: string;
|
10
|
+
datum: Array<{
|
11
|
+
selector: string;
|
12
|
+
text: string;
|
13
|
+
}>;
|
14
|
+
success: boolean;
|
15
|
+
}
|
16
|
+
export declare enum FieldExtractionEvents {
|
17
|
+
Request = "univer-field-extraction-request",
|
18
|
+
Response = "univer-field-extraction-response",
|
19
|
+
Installed = "univer-field-extraction-installed"
|
20
|
+
}
|
21
|
+
declare function sendRequestFieldExtractionEvent(detail: IFieldExtractionRequestEvent): void;
|
22
|
+
declare function sendResponseFieldExtractionEvent(detail: IFieldExtractionResponseEvent): void;
|
23
|
+
declare function listenFieldExtractionRequestEvent(callback: (params: IFieldExtractionRequestEvent) => void): () => void;
|
24
|
+
declare function listenFieldExtractionResponseEvent(callback: (params: IFieldExtractionResponseEvent) => void): () => void;
|
25
|
+
declare function listenExtensionInstalledEvent(callback: () => void): () => void;
|
26
|
+
export declare const fieldExtractionEvent: {
|
27
|
+
sendRequest: typeof sendRequestFieldExtractionEvent;
|
28
|
+
sendResponse: typeof sendResponseFieldExtractionEvent;
|
29
|
+
broadcastInstalled: () => boolean;
|
30
|
+
listenInstalled: typeof listenExtensionInstalledEvent;
|
31
|
+
listenRequest: typeof listenFieldExtractionRequestEvent;
|
32
|
+
listenResponse: typeof listenFieldExtractionResponseEvent;
|
33
|
+
};
|
34
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const UniverSheetsDrillDownExtractionPluginName: "UNIVER_DRILL_DOWN_EXTRACTION_PLUGIN";
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { Disposable, Injector, LocaleService } from '@univerjs/core';
|
2
|
+
import { SheetInterceptorService } from '@univerjs/sheets';
|
3
|
+
import { HyperLinkModel } from '@univerjs/sheets-hyper-link';
|
4
|
+
import { SheetsHyperLinkCopyPasteController, SheetsHyperLinkSidePanelService } from '@univerjs/sheets-hyper-link-ui';
|
5
|
+
import { ISheetClipboardService } from '@univerjs/sheets-ui';
|
6
|
+
export declare class SheetsDrillDownExtractionHyperLinkController extends Disposable {
|
7
|
+
private _sheetClipboardService;
|
8
|
+
private readonly _sheetInterceptorService;
|
9
|
+
private _sheetHyperLinkSidePanelService;
|
10
|
+
private _hyperLinkModel;
|
11
|
+
private _injector;
|
12
|
+
private _localeService;
|
13
|
+
private _hyperLinkCopyPasteController;
|
14
|
+
private _copyInfo;
|
15
|
+
constructor(_sheetClipboardService: ISheetClipboardService, _sheetInterceptorService: SheetInterceptorService, _sheetHyperLinkSidePanelService: SheetsHyperLinkSidePanelService, _hyperLinkModel: HyperLinkModel, _injector: Injector, _localeService: LocaleService, _hyperLinkCopyPasteController: SheetsHyperLinkCopyPasteController);
|
16
|
+
private _registerHyperLink;
|
17
|
+
private _initCopyPaste;
|
18
|
+
private _initSetRangeValuesCommandInterceptor;
|
19
|
+
private _collect;
|
20
|
+
private _generateMutations;
|
21
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Disposable } from '@univerjs/core';
|
2
|
+
import { ComponentManager } from '@univerjs/ui';
|
3
|
+
export declare class DrillDownExtractionUIController extends Disposable {
|
4
|
+
private readonly _componentManager;
|
5
|
+
constructor(_componentManager: ComponentManager);
|
6
|
+
private _initComponent;
|
7
|
+
}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import { ICellData, IObjectMatrixPrimitiveType, IRange, Disposable, ICommandService, IPermissionService, IUniverInstanceService, LocaleService, ThemeService, UserManagerService } from '@univerjs/core';
|
2
|
+
import { ISheetCommandSharedParams, RangeProtectionRuleModel, RefRangeService, SheetsSelectionsService } from '@univerjs/sheets';
|
3
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
4
|
+
import { HTTPService } from '@univerjs/network';
|
5
|
+
import { HyperLinkModel } from '@univerjs/sheets-hyper-link';
|
6
|
+
import { SheetCanvasPopManagerService } from '@univerjs/sheets-ui';
|
7
|
+
import { ITelemetryService } from '@univerjs/telemetry';
|
8
|
+
import { IMessageService } from '@univerjs/ui';
|
9
|
+
import { SuggestionManagerService } from '../services/suggestion-manager.service';
|
10
|
+
export declare const DrillDownExtractionFloatingButtonName = "DrillDownExtractionFloatingButtonName";
|
11
|
+
export declare const DrillDownExtractionFloatingRectName = "DrillDownExtractionFloatingRectName";
|
12
|
+
export declare const DrillDownExtractionFloatingRectZIndex = 100;
|
13
|
+
export interface IFieldsExtractionCommandParams extends ISheetCommandSharedParams {
|
14
|
+
urlToRowsMap: Map<string, number[]>;
|
15
|
+
selectorToColumnsMap: Map<string, number[]>;
|
16
|
+
}
|
17
|
+
export declare function generateNullCellValue(range: IRange[]): IObjectMatrixPrimitiveType<ICellData>;
|
18
|
+
export declare class DrillDownExtractionController extends Disposable {
|
19
|
+
private _selectionProtectionRuleModel;
|
20
|
+
private _permissionService;
|
21
|
+
private readonly _selectionManagerService;
|
22
|
+
private readonly _sheetPopManagerService;
|
23
|
+
private readonly _httpService;
|
24
|
+
private readonly _refRangeService;
|
25
|
+
private readonly _localeService;
|
26
|
+
private readonly _commandService;
|
27
|
+
private readonly _messageService;
|
28
|
+
private readonly _instanceService;
|
29
|
+
private readonly _hyperLinkModel;
|
30
|
+
private readonly _suggestionManagerService;
|
31
|
+
private readonly _renderManagerService;
|
32
|
+
private readonly _themeService;
|
33
|
+
private readonly _userManagerService;
|
34
|
+
private readonly _telemetryService;
|
35
|
+
private _rectsDisposer;
|
36
|
+
constructor(_selectionProtectionRuleModel: RangeProtectionRuleModel, _permissionService: IPermissionService, _selectionManagerService: SheetsSelectionsService, _sheetPopManagerService: SheetCanvasPopManagerService, _httpService: HTTPService, _refRangeService: RefRangeService, _localeService: LocaleService, _commandService: ICommandService, _messageService: IMessageService, _instanceService: IUniverInstanceService, _hyperLinkModel: HyperLinkModel, _suggestionManagerService: SuggestionManagerService, _renderManagerService: IRenderManagerService, _themeService: ThemeService, _userManagerService: UserManagerService, _telemetryService: ITelemetryService);
|
37
|
+
getRowsLimit(): Promise<number>;
|
38
|
+
private _initCommand;
|
39
|
+
private _initActiveSheetChange;
|
40
|
+
private _initSelectionChangeListener;
|
41
|
+
private _initRequestingRangeListener;
|
42
|
+
private _selectionContentShouldBeDrillDownExtract;
|
43
|
+
private _showDrillDownExtractButton;
|
44
|
+
private _operationHandlerListener;
|
45
|
+
private _generateSuggestOptions;
|
46
|
+
private _requestingRange;
|
47
|
+
private _getScale;
|
48
|
+
private _clearSuggestionContent;
|
49
|
+
private _getClearRangeByColumns;
|
50
|
+
private _isHyperLink;
|
51
|
+
private _getExtractionField;
|
52
|
+
private _getHyperlinkFromCell;
|
53
|
+
private _generateCellValue;
|
54
|
+
private _getExtractionInterval;
|
55
|
+
private _getRequest;
|
56
|
+
private _stopSubscription;
|
57
|
+
private _requestDrillDownExtract;
|
58
|
+
stopDrillDown(): void;
|
59
|
+
_trackService(): void;
|
60
|
+
}
|
61
|
+
export declare function hasURL(text: string): boolean;
|
package/lib/types/index.d.ts
CHANGED
@@ -1,95 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
import { Injector } from '@univerjs/core';
|
5
|
-
import { IRange } from '@univerjs/core';
|
6
|
-
import { Nullable } from '@univerjs/core';
|
7
|
-
import { Observable } from 'rxjs';
|
8
|
-
import { Plugin as Plugin_2 } from '@univerjs/core';
|
9
|
-
import { UniverInstanceType } from '@univerjs/core';
|
10
|
-
|
11
|
-
declare interface ISuggestionManagerOptions {
|
12
|
-
label: string;
|
13
|
-
value: string;
|
14
|
-
selected?: boolean;
|
15
|
-
}
|
16
|
-
|
17
|
-
declare interface ISuggestionManagerServiceParam {
|
18
|
-
unitId: string;
|
19
|
-
subUnitId: string;
|
20
|
-
range: IRange;
|
21
|
-
disposable: DisposableCollection;
|
22
|
-
}
|
23
|
-
|
24
|
-
declare interface ISuggestManagerServiceRequestParam {
|
25
|
-
minInterval: number | null;
|
26
|
-
maxInterval: number | null;
|
27
|
-
}
|
28
|
-
|
29
|
-
declare interface IUniverDrillDownExtractionConfig {
|
30
|
-
}
|
31
|
-
|
32
|
-
declare enum OperationTypeEnum {
|
33
|
-
REQUEST = 0,
|
34
|
-
CLEAR = 1,
|
35
|
-
STOP = 2,
|
36
|
-
START = 3
|
37
|
-
}
|
38
|
-
|
39
|
-
export declare class SuggestionManagerService {
|
40
|
-
private _suggestionParam;
|
41
|
-
private _requestParam;
|
42
|
-
private _suggestState;
|
43
|
-
private _request$;
|
44
|
-
readonly request$: Observable<SuggestStateEnum>;
|
45
|
-
private _operation$;
|
46
|
-
readonly operation$: Observable<OperationTypeEnum>;
|
47
|
-
private _extensionInstalled;
|
48
|
-
constructor();
|
49
|
-
get extensionInstalled(): boolean;
|
50
|
-
get suggestState(): SuggestStateEnum;
|
51
|
-
dispose(): void;
|
52
|
-
suggest(suggestState?: SuggestStateEnum): void;
|
53
|
-
operation(state?: OperationTypeEnum): void;
|
54
|
-
isSuggesting(): boolean;
|
55
|
-
updateRange(range: IRange): void;
|
56
|
-
disposeSuggestion(): void;
|
57
|
-
addDisposable(disposable: IDisposable): void;
|
58
|
-
setRequestParam(value: Nullable<ISuggestManagerServiceRequestParam>): void;
|
59
|
-
setSuggestionParam(value: Nullable<ISuggestionManagerServiceParam>): void;
|
60
|
-
getRequestParam(): Nullable<ISuggestManagerServiceRequestParam>;
|
61
|
-
getSuggestionParam(): Nullable<ISuggestionManagerServiceParam>;
|
62
|
-
getSuggestionRange(): IRange | undefined;
|
63
|
-
private _hyperlinkOptions;
|
64
|
-
getHyperlinkOptions(): ISuggestionManagerOptions[];
|
65
|
-
setHyperlinkOptions(options: ISuggestionManagerOptions[]): void;
|
66
|
-
private _columnOptions;
|
67
|
-
getColumnOptions(): ISuggestionManagerOptions[];
|
68
|
-
setColumnOptions(options: ISuggestionManagerOptions[]): void;
|
69
|
-
getSelectedColumns(): number[];
|
70
|
-
}
|
71
|
-
|
72
|
-
export declare enum SuggestStateEnum {
|
73
|
-
CONFIG = 0,
|
74
|
-
REQUESTING = 1,
|
75
|
-
COMPLETE = 2,
|
76
|
-
ERROR = 3,
|
77
|
-
STOP = 4,
|
78
|
-
IDLE = 5
|
79
|
-
}
|
80
|
-
|
81
|
-
export declare class UniverSheetsDrillDownExtractionPlugin extends Plugin_2 {
|
82
|
-
private readonly _config;
|
83
|
-
protected _injector: Injector;
|
84
|
-
private readonly _configService;
|
85
|
-
static pluginName: "UNIVER_DRILL_DOWN_EXTRACTION_PLUGIN";
|
86
|
-
static type: UniverInstanceType;
|
87
|
-
constructor(_config: IUniverDrillDownExtractionConfig | undefined, _injector: Injector, _configService: IConfigService);
|
88
|
-
onStarting(): void;
|
89
|
-
onReady(): void;
|
90
|
-
onSteady(): void;
|
91
|
-
}
|
92
|
-
|
93
|
-
export declare const UniverSheetsDrillDownExtractionPluginName: "UNIVER_DRILL_DOWN_EXTRACTION_PLUGIN";
|
94
|
-
|
95
|
-
export { }
|
1
|
+
export { UniverSheetsDrillDownExtractionPlugin } from './plugin';
|
2
|
+
export { UniverSheetsDrillDownExtractionPluginName } from './constants';
|
3
|
+
export { SuggestionManagerService, SuggestStateEnum } from './services/suggestion-manager.service';
|
@@ -0,0 +1,46 @@
|
|
1
|
+
declare const locales: {
|
2
|
+
'drill-down-extraction': {
|
3
|
+
message: {
|
4
|
+
failed: string;
|
5
|
+
success: string;
|
6
|
+
drop: string;
|
7
|
+
};
|
8
|
+
config: {
|
9
|
+
title: string;
|
10
|
+
helper: string;
|
11
|
+
dataSource: string;
|
12
|
+
dataSourcePlaceholder: string;
|
13
|
+
dataSourceError: string;
|
14
|
+
column: string;
|
15
|
+
columnPlaceholder: string;
|
16
|
+
columnError: string;
|
17
|
+
columnItemTitle: string;
|
18
|
+
optionsBlank: string;
|
19
|
+
gettingData: string;
|
20
|
+
gettingDataError: string;
|
21
|
+
stopMessage: string;
|
22
|
+
gettingDataSuccess: string;
|
23
|
+
startCompletion: string;
|
24
|
+
drop: string;
|
25
|
+
retry: string;
|
26
|
+
confirm: string;
|
27
|
+
stop: string;
|
28
|
+
cancel: string;
|
29
|
+
subscribe: string;
|
30
|
+
toInstall: string;
|
31
|
+
SuccessMessage: string;
|
32
|
+
cancelMessage: string;
|
33
|
+
dropMessage: string;
|
34
|
+
stayTuned: string;
|
35
|
+
limitDialogTitle: string;
|
36
|
+
limitDialogContent: string;
|
37
|
+
extensionDialogTitle: string;
|
38
|
+
extensionDialogContent: string;
|
39
|
+
};
|
40
|
+
hyperLink: {
|
41
|
+
optionLabel: string;
|
42
|
+
placeholder: string;
|
43
|
+
};
|
44
|
+
};
|
45
|
+
};
|
46
|
+
export default locales;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { IUniverDrillDownExtractionConfig } from './controllers/config.schema';
|
2
|
+
import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
3
|
+
export declare class UniverSheetsDrillDownExtractionPlugin extends Plugin {
|
4
|
+
private readonly _config;
|
5
|
+
protected _injector: Injector;
|
6
|
+
private readonly _configService;
|
7
|
+
static pluginName: "UNIVER_DRILL_DOWN_EXTRACTION_PLUGIN";
|
8
|
+
static type: UniverInstanceType;
|
9
|
+
constructor(_config: IUniverDrillDownExtractionConfig | undefined, _injector: Injector, _configService: IConfigService);
|
10
|
+
onStarting(): void;
|
11
|
+
onReady(): void;
|
12
|
+
onSteady(): void;
|
13
|
+
}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import { DisposableCollection, IDisposable, IRange, Nullable } from '@univerjs/core';
|
2
|
+
export interface ISuggestionManagerServiceParam {
|
3
|
+
unitId: string;
|
4
|
+
subUnitId: string;
|
5
|
+
range: IRange;
|
6
|
+
disposable: DisposableCollection;
|
7
|
+
}
|
8
|
+
export interface ISuggestManagerServiceRequestParam {
|
9
|
+
minInterval: number | null;
|
10
|
+
maxInterval: number | null;
|
11
|
+
}
|
12
|
+
export declare enum SuggestStateEnum {
|
13
|
+
CONFIG = 0,
|
14
|
+
REQUESTING = 1,
|
15
|
+
COMPLETE = 2,
|
16
|
+
ERROR = 3,
|
17
|
+
STOP = 4,
|
18
|
+
IDLE = 5
|
19
|
+
}
|
20
|
+
export declare enum OperationTypeEnum {
|
21
|
+
REQUEST = 0,
|
22
|
+
CLEAR = 1,
|
23
|
+
STOP = 2,
|
24
|
+
START = 3
|
25
|
+
}
|
26
|
+
export interface ISuggestionManagerOptions {
|
27
|
+
label: string;
|
28
|
+
value: string;
|
29
|
+
selected?: boolean;
|
30
|
+
}
|
31
|
+
export declare class SuggestionManagerService {
|
32
|
+
private _suggestionParam;
|
33
|
+
private _requestParam;
|
34
|
+
private _suggestState;
|
35
|
+
private _request$;
|
36
|
+
readonly request$: import('rxjs').Observable<SuggestStateEnum>;
|
37
|
+
private _operation$;
|
38
|
+
readonly operation$: import('rxjs').Observable<OperationTypeEnum>;
|
39
|
+
private _extensionInstalled;
|
40
|
+
constructor();
|
41
|
+
get extensionInstalled(): boolean;
|
42
|
+
get suggestState(): SuggestStateEnum;
|
43
|
+
dispose(): void;
|
44
|
+
suggest(suggestState?: SuggestStateEnum): void;
|
45
|
+
operation(state?: OperationTypeEnum): void;
|
46
|
+
isSuggesting(): boolean;
|
47
|
+
updateRange(range: IRange): void;
|
48
|
+
disposeSuggestion(): void;
|
49
|
+
addDisposable(disposable: IDisposable): void;
|
50
|
+
setRequestParam(value: Nullable<ISuggestManagerServiceRequestParam>): void;
|
51
|
+
setSuggestionParam(value: Nullable<ISuggestionManagerServiceParam>): void;
|
52
|
+
getRequestParam(): Nullable<ISuggestManagerServiceRequestParam>;
|
53
|
+
getSuggestionParam(): Nullable<ISuggestionManagerServiceParam>;
|
54
|
+
getSuggestionRange(): IRange | undefined;
|
55
|
+
private _hyperlinkOptions;
|
56
|
+
getHyperlinkOptions(): ISuggestionManagerOptions[];
|
57
|
+
setHyperlinkOptions(options: ISuggestionManagerOptions[]): void;
|
58
|
+
private _columnOptions;
|
59
|
+
getColumnOptions(): ISuggestionManagerOptions[];
|
60
|
+
setColumnOptions(options: ISuggestionManagerOptions[]): void;
|
61
|
+
getSelectedColumns(): number[];
|
62
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
export default function DrillDownExtractionFloatingButton(): React.JSX.Element;
|
3
|
+
interface IDrillDownExtractionColumnSelectorProps {
|
4
|
+
options: {
|
5
|
+
label: string;
|
6
|
+
value: string;
|
7
|
+
}[];
|
8
|
+
value: string[];
|
9
|
+
onChange: (value: string[]) => void;
|
10
|
+
}
|
11
|
+
export declare function DrillDownExtractionColumnSelector(props: IDrillDownExtractionColumnSelectorProps): React.JSX.Element;
|
12
|
+
export declare function DrillDownExtractionFloatingHeader(): React.JSX.Element;
|
13
|
+
export declare function DrillDownExtractionLimitationDialog(props: {
|
14
|
+
visible: boolean;
|
15
|
+
onClose?: () => void;
|
16
|
+
limit?: number;
|
17
|
+
}): React.JSX.Element;
|
18
|
+
export declare function InstallExtensionDialog(props: {
|
19
|
+
visible: boolean;
|
20
|
+
onClose?: () => void;
|
21
|
+
}): React.JSX.Element;
|
22
|
+
export declare function DrillDownExtractionStartFooter(props: {
|
23
|
+
onStart: () => void;
|
24
|
+
}): React.JSX.Element;
|
25
|
+
export {};
|