@univerjs-pro/drill-down-extraction 0.5.0-nightly.202411120616 → 0.5.0-nightly.202411131606
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
|
-
const
|
1
|
+
const _0x21d02e=_0x55a9;function _0x2824(){const _0x4dbf53=['Cancel','130430SEXpmZ','23TabtEX','The\x20result\x20has\x20been\x20discarded','The\x20field\x20extraction\x20process\x20requires\x20the\x20Clipsheet\x20extension\x20to\x20be\x20installed.','No\x20extension\x20installed','Limited\x20per\x20extraction','Please\x20select\x20the\x20field\x20to\x20be\x20extracted','Please\x20get\x20the\x20extraction\x20field\x20by\x20ClipSheet\x20extension','\x20Fields','Please\x20select\x20a\x20link','To\x20Install','3348205AdGLAF','Fields\x20extraction\x20Process','No\x20options\x20available','Failed\x20to\x20extract\x20data.','9LXfriM','2338936YMUcHw','Hyperlink\x20in\x20the\x20column','Begin\x20Extracting\x20Fields','110215PwHCAm','Extracting\x20Fields...','\x20Fields\x20extraction\x20process','4mzCGoe','Extraction\x20data\x20has\x20been\x20cancelled:\x20{0}','46162OSARew','Fields\x20extraction\x20is\x20successful.\x20Check\x20whether\x20the\x20data\x20is\x20correct.','Subscribe','Feature\x20under\x20development.\x20Stay\x20tuned!','515043oUtpND','15087312iApPnY','11EUPUVR','396FZDStT','Extraction\x20field','{0}\x20rows\x20extraction\x20limit\x20reached.\x20To\x20extract\x20more\x20rows,\x20please\x20subscribe.','Select\x20the\x20link\x20to\x20the\x20data\x20source'];_0x2824=function(){return _0x4dbf53;};return _0x2824();}(function(_0x148ac4,_0xa4487d){const _0x6b0c6a=_0x55a9,_0x3ad476=_0x148ac4();while(!![]){try{const _0x335cb9=parseInt(_0x6b0c6a(0x1db))/0x1*(-parseInt(_0x6b0c6a(0x1ce))/0x2)+-parseInt(_0x6b0c6a(0x1d2))/0x3+parseInt(_0x6b0c6a(0x1cc))/0x4*(-parseInt(_0x6b0c6a(0x1c1))/0x5)+-parseInt(_0x6b0c6a(0x1d5))/0x6*(-parseInt(_0x6b0c6a(0x1c9))/0x7)+-parseInt(_0x6b0c6a(0x1c6))/0x8*(parseInt(_0x6b0c6a(0x1c5))/0x9)+parseInt(_0x6b0c6a(0x1da))/0xa*(parseInt(_0x6b0c6a(0x1d4))/0xb)+parseInt(_0x6b0c6a(0x1d3))/0xc;if(_0x335cb9===_0xa4487d)break;else _0x3ad476['push'](_0x3ad476['shift']());}catch(_0x27f995){_0x3ad476['push'](_0x3ad476['shift']());}}}(_0x2824,0x9d749));const e={'drill-down-extraction':{'message':{'failed':_0x21d02e(0x1cd),'success':'\x20Fields\x20extract\x20data\x20successfully','drop':_0x21d02e(0x1dc)},'config':{'title':_0x21d02e(0x1c2),'helper':_0x21d02e(0x1cb),'dataSource':_0x21d02e(0x1c7),'dataSourcePlaceholder':_0x21d02e(0x1d8),'dataSourceError':_0x21d02e(0x1e3),'column':'Extraction\x20Fields','columnPlaceholder':'Select\x20the\x20fields','columnError':_0x21d02e(0x1e0),'columnItemTitle':_0x21d02e(0x1e2),'optionsBlank':_0x21d02e(0x1c3),'gettingData':_0x21d02e(0x1ca),'gettingDataError':_0x21d02e(0x1c4),'stopMessage':'Fields\x20extraction\x20has\x20been\x20stopped.','gettingDataSuccess':_0x21d02e(0x1cf),'startCompletion':_0x21d02e(0x1c8),'drop':'Drop','retry':'Retry','confirm':'Confirm','stop':'Stop','cancel':_0x21d02e(0x1d9),'subscribe':_0x21d02e(0x1d0),'toInstall':_0x21d02e(0x1e4),'SuccessMessage':'\x20Fields\x20extraction\x20successfully','cancelMessage':'Fields\x20extraction\x20has\x20been\x20cancelled','dropMessage':'The\x20result\x20has\x20been\x20discarded','stayTuned':_0x21d02e(0x1d1),'limitDialogTitle':_0x21d02e(0x1df),'limitDialogContent':_0x21d02e(0x1d7),'extensionDialogTitle':_0x21d02e(0x1de),'extensionDialogContent':_0x21d02e(0x1dd)},'hyperLink':{'optionLabel':_0x21d02e(0x1d6),'placeholder':_0x21d02e(0x1e1)}}},t=e;function _0x55a9(_0x43e0b0,_0x370447){const _0x28242d=_0x2824();return _0x55a9=function(_0x55a9b8,_0x3b2df8){_0x55a9b8=_0x55a9b8-0x1c1;let _0x997a5a=_0x28242d[_0x55a9b8];return _0x997a5a;},_0x55a9(_0x43e0b0,_0x370447);}export{t as default};
|
package/lib/es/locale/zh-CN.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0x5a4742=_0x4507;function _0x4507(_0x4d8308,_0x366ea1){const _0x35b84f=_0x35b8();return _0x4507=function(_0x450739,_0x31b19d){_0x450739=_0x450739-0x158;let _0x185f7f=_0x35b84f[_0x450739];return _0x185f7f;},_0x4507(_0x4d8308,_0x366ea1);}(function(_0x54823c,_0x4727ef){const _0x4fa761=_0x4507,_0x387ea8=_0x54823c();while(!![]){try{const _0x452ff7=parseInt(_0x4fa761(0x15e))/0x1*(parseInt(_0x4fa761(0x173))/0x2)+-parseInt(_0x4fa761(0x16b))/0x3+parseInt(_0x4fa761(0x15d))/0x4+parseInt(_0x4fa761(0x174))/0x5+parseInt(_0x4fa761(0x15b))/0x6*(-parseInt(_0x4fa761(0x161))/0x7)+parseInt(_0x4fa761(0x15f))/0x8*(-parseInt(_0x4fa761(0x163))/0x9)+-parseInt(_0x4fa761(0x167))/0xa*(-parseInt(_0x4fa761(0x15a))/0xb);if(_0x452ff7===_0x4727ef)break;else _0x387ea8['push'](_0x387ea8['shift']());}catch(_0x391e93){_0x387ea8['push'](_0x387ea8['shift']());}}}(_0x35b8,0x7ec2c));function _0x35b8(){const _0x5b7dad=['超链接所在列','请使用插件获取采集字段','用采集字段写入数据','9970dxRpXz','数据采集成功,请检查是否正确','选择采集字段','前去安装','1829883CyHGOl','已丢弃采集数据','已达到\x20{0}\x20行采集上限,要采集更多数据,请订阅。','数据采集','采集限制提醒','选择数据源链接','数据采集已暂停','采集字段写入数据需要安装\x20Clipsheet\x20扩展。','64ZdpTCC','3771885QJomcr','采集字段','数据采集中...','77iQSWcw','599178cAERLq','已取消数据采集','2576272cfiEVK','22816ebYDUp','174408luzrRx','数据采集成功','14ofWxSz','数据采集失败:\x20{0}','333mNiooS'];_0x35b8=function(){return _0x5b7dad;};return _0x35b8();}const e={'drill-down-extraction':{'message':{'failed':_0x5a4742(0x162),'success':'数据采集完成','drop':_0x5a4742(0x16c)},'config':{'title':_0x5a4742(0x16e),'helper':_0x5a4742(0x166),'dataSource':_0x5a4742(0x164),'dataSourcePlaceholder':_0x5a4742(0x170),'dataSourceError':'请选择数据源链接','column':_0x5a4742(0x158),'columnPlaceholder':_0x5a4742(0x169),'columnError':'选择采集字段','columnItemTitle':'字段','optionsBlank':'暂无选项','gettingData':_0x5a4742(0x159),'gettingDataError':'采集数据失败','stopMessage':_0x5a4742(0x171),'gettingDataSuccess':_0x5a4742(0x168),'startCompletion':'开始数据采集','drop':'丢弃','retry':'重试','confirm':'确认','stop':'停止','cancel':'取消','subscribe':'订阅','toInstall':_0x5a4742(0x16a),'SuccessMessage':_0x5a4742(0x160),'cancelMessage':_0x5a4742(0x15c),'dropMessage':_0x5a4742(0x16c),'stayTuned':'功能正在开发中,敬请期待!','limitDialogTitle':_0x5a4742(0x16f),'limitDialogContent':_0x5a4742(0x16d),'extensionDialogTitle':'未安装扩展','extensionDialogContent':_0x5a4742(0x172)},'hyperLink':{'optionLabel':_0x5a4742(0x158),'placeholder':_0x5a4742(0x165)}}};export{e as default};
|
package/lib/es/locale/zh-TW.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0x805e95=_0x4fb2;function _0x1ebf(){const _0x3bbf69=['2601070fbODiD','3UMSUwE','Please\x20get\x20the\x20extraction\x20field\x20by\x20ClipSheet\x20extension','2950014oNSvoG','Fields\x20extraction\x20is\x20successful.\x20Check\x20whether\x20the\x20data\x20is\x20correct.','Drop','13825450rAtbZq','Feature\x20under\x20development.\x20Stay\x20tuned!','The\x20result\x20has\x20been\x20discarded','Please\x20select\x20a\x20link','\x20Fields\x20extraction\x20process','14gFSNvB','No\x20extension\x20installed','Cancel','Fields\x20extraction\x20Process','Select\x20the\x20link\x20to\x20the\x20data\x20source','\x20Fields','Hyperlink\x20in\x20the\x20column','No\x20options\x20available','\x20Fields\x20extract\x20data\x20successfully','Confirm','Extraction\x20field','696357aFhedN','Fields\x20extraction\x20has\x20been\x20cancelled','Extraction\x20Fields','The\x20field\x20extraction\x20process\x20requires\x20the\x20Clipsheet\x20extension\x20to\x20be\x20installed.','Begin\x20Extracting\x20Fields','Select\x20the\x20fields','3979000KNjNba','6095718TaTxjw','Please\x20select\x20the\x20field\x20to\x20be\x20extracted','{0}\x20rows\x20extraction\x20limit\x20reached.\x20To\x20extract\x20more\x20rows,\x20please\x20subscribe.','Subscribe','2015980qIrknr','Limited\x20per\x20extraction','To\x20Install','\x20Fields\x20extraction\x20successfully','2nSrWdL','Failed\x20to\x20extract\x20data.','Extraction\x20data\x20has\x20been\x20cancelled:\x20{0}','Fields\x20extraction\x20has\x20been\x20stopped.'];_0x1ebf=function(){return _0x3bbf69;};return _0x1ebf();}(function(_0x37e623,_0x2c14d2){const _0xfe78b2=_0x4fb2,_0x1fa5f6=_0x37e623();while(!![]){try{const _0x28edfa=-parseInt(_0xfe78b2(0xfc))/0x1*(-parseInt(_0xfe78b2(0x10b))/0x2)+parseInt(_0xfe78b2(0x110))/0x3*(-parseInt(_0xfe78b2(0x107))/0x4)+parseInt(_0xfe78b2(0x10f))/0x5+parseInt(_0xfe78b2(0x112))/0x6*(parseInt(_0xfe78b2(0xf1))/0x7)+-parseInt(_0xfe78b2(0x102))/0x8+parseInt(_0xfe78b2(0x103))/0x9+-parseInt(_0xfe78b2(0x115))/0xa;if(_0x28edfa===_0x2c14d2)break;else _0x1fa5f6['push'](_0x1fa5f6['shift']());}catch(_0x2bdd22){_0x1fa5f6['push'](_0x1fa5f6['shift']());}}}(_0x1ebf,0x786f0));function _0x4fb2(_0xc0664d,_0x107a26){const _0x1ebffb=_0x1ebf();return _0x4fb2=function(_0x4fb28f,_0x113ab7){_0x4fb28f=_0x4fb28f-0xf0;let _0x889cf4=_0x1ebffb[_0x4fb28f];return _0x889cf4;},_0x4fb2(_0xc0664d,_0x107a26);}const e={'drill-down-extraction':{'message':{'failed':_0x805e95(0x10d),'success':_0x805e95(0xf9),'drop':_0x805e95(0x117)},'config':{'title':_0x805e95(0xf4),'helper':_0x805e95(0xf0),'dataSource':_0x805e95(0xf7),'dataSourcePlaceholder':_0x805e95(0xf5),'dataSourceError':_0x805e95(0x118),'column':_0x805e95(0xfe),'columnPlaceholder':_0x805e95(0x101),'columnError':_0x805e95(0x104),'columnItemTitle':_0x805e95(0xf6),'optionsBlank':_0x805e95(0xf8),'gettingData':'Extracting\x20Fields...','gettingDataError':_0x805e95(0x10c),'stopMessage':_0x805e95(0x10e),'gettingDataSuccess':_0x805e95(0x113),'startCompletion':_0x805e95(0x100),'drop':_0x805e95(0x114),'retry':'Retry','confirm':_0x805e95(0xfa),'stop':'Stop','cancel':_0x805e95(0xf3),'subscribe':_0x805e95(0x106),'toInstall':_0x805e95(0x109),'SuccessMessage':_0x805e95(0x10a),'cancelMessage':_0x805e95(0xfd),'dropMessage':_0x805e95(0x117),'stayTuned':_0x805e95(0x116),'limitDialogTitle':_0x805e95(0x108),'limitDialogContent':_0x805e95(0x105),'extensionDialogTitle':_0x805e95(0xf2),'extensionDialogContent':_0x805e95(0xff)},'hyperLink':{'optionLabel':_0x805e95(0xfb),'placeholder':_0x805e95(0x111)}}},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 {};
|