ll-plus 2.2.18 → 2.2.19
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/es/component.mjs +3 -1
- package/es/component.mjs.map +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +2 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/upload-drag/index.d.ts +1 -2
- package/es/components/upload-drag/index.mjs.map +1 -1
- package/es/components/uri-input/index.d.ts +51 -0
- package/es/components/uri-input/index.mjs +10 -0
- package/es/components/uri-input/index.mjs.map +1 -0
- package/es/components/uri-input/src/uri-input.d.ts +22 -0
- package/es/components/uri-input/src/uri-input.mjs +51 -0
- package/es/components/uri-input/src/uri-input.mjs.map +1 -0
- package/es/components/uri-input/src/uri-input.vue.d.ts +42 -0
- package/es/components/uri-input/src/uri-input.vue.mjs +8 -0
- package/es/components/uri-input/src/uri-input.vue.mjs.map +1 -0
- package/es/components/uri-input/src/uri-input.vue2.mjs +82 -0
- package/es/components/uri-input/src/uri-input.vue2.mjs.map +1 -0
- package/es/index.mjs +2 -0
- package/es/index.mjs.map +1 -1
- package/global.d.ts +1 -0
- package/index.full.js +293 -163
- package/index.full.min.js +15 -15
- package/index.full.min.js.map +1 -1
- package/index.full.min.mjs +15 -15
- package/index.full.min.mjs.map +1 -1
- package/index.full.mjs +289 -164
- package/lib/component.js +3 -1
- package/lib/component.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +7 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/upload-drag/index.d.ts +1 -2
- package/lib/components/upload-drag/index.js.map +1 -1
- package/lib/components/uri-input/index.d.ts +51 -0
- package/lib/components/uri-input/index.js +19 -0
- package/lib/components/uri-input/index.js.map +1 -0
- package/lib/components/uri-input/src/uri-input.d.ts +22 -0
- package/lib/components/uri-input/src/uri-input.js +56 -0
- package/lib/components/uri-input/src/uri-input.js.map +1 -0
- package/lib/components/uri-input/src/uri-input.vue.d.ts +42 -0
- package/lib/components/uri-input/src/uri-input.vue.js +12 -0
- package/lib/components/uri-input/src/uri-input.vue.js.map +1 -0
- package/lib/components/uri-input/src/uri-input.vue2.js +86 -0
- package/lib/components/uri-input/src/uri-input.vue2.js.map +1 -0
- package/lib/index.js +7 -0
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/types/packages/components/index.d.ts +1 -0
- package/types/packages/components/upload-drag/index.d.ts +1 -2
- package/types/packages/components/uri-input/index.d.ts +51 -0
- package/types/packages/components/uri-input/src/uri-input.d.ts +22 -0
- package/types/packages/components/uri-input/src/uri-input.vue.d.ts +42 -0
package/es/component.mjs
CHANGED
|
@@ -45,6 +45,7 @@ import { LlTreeSearch } from './components/tree-search/index.mjs';
|
|
|
45
45
|
import { LlTree } from './components/tree/index.mjs';
|
|
46
46
|
import { LlDropdown } from './components/dropdown/index.mjs';
|
|
47
47
|
import { LlUploadDrag } from './components/upload-drag/index.mjs';
|
|
48
|
+
import { LlUriInput } from './components/uri-input/index.mjs';
|
|
48
49
|
|
|
49
50
|
"use strict";
|
|
50
51
|
var Components = [
|
|
@@ -100,7 +101,8 @@ var Components = [
|
|
|
100
101
|
LlTreeSearch,
|
|
101
102
|
LlTree,
|
|
102
103
|
LlDropdown,
|
|
103
|
-
LlUploadDrag
|
|
104
|
+
LlUploadDrag,
|
|
105
|
+
LlUriInput
|
|
104
106
|
];
|
|
105
107
|
|
|
106
108
|
export { Components as default };
|
package/es/component.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.mjs","sources":["../../packages/ll-plus/component.ts"],"sourcesContent":["import type { Plugin } from 'vue'\n\nimport {\n LlAdvancedFiltering,\n LlAdvancedFilteringParams,\n LlAdvancedFilteringTags,\n LlApiComponent,\n LlAvatar,\n LlButton,\n LlCascader,\n LlCheckbox,\n LlCheckboxGroup,\n LlCodeEditor,\n LlConfigProvider,\n LlDatePicker,\n LlDateRange,\n LlDescriptions,\n LlDescriptionsItem,\n LlDrawer,\n LlEasyCron,\n LlEmpty,\n LlForm,\n LlFormItem,\n LlIcon,\n LlIconBase,\n LlIconPicker,\n LlInput,\n LlInputNumber,\n LlKeyValue,\n LlModal,\n LlNumberRange,\n LlOperateIcon,\n LlOperateTree,\n LlRadio,\n LlRadioButton,\n LlRadioGroup,\n LlSecondConfirmation,\n LlSegmented,\n LlSelect,\n LlSelectOption,\n LlSelectOptGroup,\n LlSelectGroup,\n LlSpace,\n LlSteps,\n LlSwitch,\n LlTable,\n LlTabsSimple,\n LlTagGroup,\n LlTextarea,\n LlTimePicker,\n LlTimeRange,\n LlTooltip,\n LlTreeSearch,\n LlTree,\n LlDropdown,\n LlUploadDrag\n} from '@ll-plus/components/index'\n\nexport default [\n LlAdvancedFiltering,\n LlAdvancedFilteringParams,\n LlAdvancedFilteringTags,\n LlApiComponent,\n LlAvatar,\n LlButton,\n LlCascader,\n LlCheckbox,\n LlCheckboxGroup,\n LlCodeEditor,\n LlConfigProvider,\n LlDatePicker,\n LlDateRange,\n LlDescriptions,\n LlDescriptionsItem,\n LlDrawer,\n LlEasyCron,\n LlEmpty,\n LlForm,\n LlFormItem,\n LlIcon,\n LlIconBase,\n LlIconPicker,\n LlInput,\n LlInputNumber,\n LlKeyValue,\n LlModal,\n LlNumberRange,\n LlOperateIcon,\n LlOperateTree,\n LlRadio,\n LlRadioButton,\n LlRadioGroup,\n LlSecondConfirmation,\n LlSegmented,\n LlSelect,\n LlSelectOption,\n LlSelectOptGroup,\n LlSelectGroup,\n LlSpace,\n LlSteps,\n LlSwitch,\n LlTable,\n LlTabsSimple,\n LlTagGroup,\n LlTextarea,\n LlTimePicker,\n LlTimeRange,\n LlTooltip,\n LlTreeSearch,\n LlTree,\n LlDropdown,\n LlUploadDrag\n] as Plugin[]\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.mjs","sources":["../../packages/ll-plus/component.ts"],"sourcesContent":["import type { Plugin } from 'vue'\n\nimport {\n LlAdvancedFiltering,\n LlAdvancedFilteringParams,\n LlAdvancedFilteringTags,\n LlApiComponent,\n LlAvatar,\n LlButton,\n LlCascader,\n LlCheckbox,\n LlCheckboxGroup,\n LlCodeEditor,\n LlConfigProvider,\n LlDatePicker,\n LlDateRange,\n LlDescriptions,\n LlDescriptionsItem,\n LlDrawer,\n LlEasyCron,\n LlEmpty,\n LlForm,\n LlFormItem,\n LlIcon,\n LlIconBase,\n LlIconPicker,\n LlInput,\n LlInputNumber,\n LlKeyValue,\n LlModal,\n LlNumberRange,\n LlOperateIcon,\n LlOperateTree,\n LlRadio,\n LlRadioButton,\n LlRadioGroup,\n LlSecondConfirmation,\n LlSegmented,\n LlSelect,\n LlSelectOption,\n LlSelectOptGroup,\n LlSelectGroup,\n LlSpace,\n LlSteps,\n LlSwitch,\n LlTable,\n LlTabsSimple,\n LlTagGroup,\n LlTextarea,\n LlTimePicker,\n LlTimeRange,\n LlTooltip,\n LlTreeSearch,\n LlTree,\n LlDropdown,\n LlUploadDrag,\n LlUriInput\n} from '@ll-plus/components/index'\n\nexport default [\n LlAdvancedFiltering,\n LlAdvancedFilteringParams,\n LlAdvancedFilteringTags,\n LlApiComponent,\n LlAvatar,\n LlButton,\n LlCascader,\n LlCheckbox,\n LlCheckboxGroup,\n LlCodeEditor,\n LlConfigProvider,\n LlDatePicker,\n LlDateRange,\n LlDescriptions,\n LlDescriptionsItem,\n LlDrawer,\n LlEasyCron,\n LlEmpty,\n LlForm,\n LlFormItem,\n LlIcon,\n LlIconBase,\n LlIconPicker,\n LlInput,\n LlInputNumber,\n LlKeyValue,\n LlModal,\n LlNumberRange,\n LlOperateIcon,\n LlOperateTree,\n LlRadio,\n LlRadioButton,\n LlRadioGroup,\n LlSecondConfirmation,\n LlSegmented,\n LlSelect,\n LlSelectOption,\n LlSelectOptGroup,\n LlSelectGroup,\n LlSpace,\n LlSteps,\n LlSwitch,\n LlTable,\n LlTabsSimple,\n LlTagGroup,\n LlTextarea,\n LlTimePicker,\n LlTimeRange,\n LlTooltip,\n LlTreeSearch,\n LlTree,\n LlDropdown,\n LlUploadDrag,\n LlUriInput\n] as Plugin[]\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DA,iBAAe;AAAA,EACb,mBAAA;AAAA,EACA,yBAAA;AAAA,EACA,uBAAA;AAAA,EACA,cAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,eAAA;AAAA,EACA,YAAA;AAAA,EACA,gBAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA;AAAA,EACA,cAAA;AAAA,EACA,kBAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAA;AAAA,EACA,aAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA;AAAA,EACA,aAAA;AAAA,EACA,aAAA;AAAA,EACA,aAAA;AAAA,EACA,OAAA;AAAA,EACA,aAAA;AAAA,EACA,YAAA;AAAA,EACA,oBAAA;AAAA,EACA,WAAA;AAAA,EACA,QAAA;AAAA,EACA,cAAA;AAAA,EACA,gBAAA;AAAA,EACA,aAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,YAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA;AAAA,EACA,SAAA;AAAA,EACA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,YAAA;AAAA,EACA,UAAA;AACF,CAAA;;;;"}
|
package/es/components/index.d.ts
CHANGED
package/es/components/index.mjs
CHANGED
|
@@ -43,6 +43,7 @@ export { LlTreeSearch } from './tree-search/index.mjs';
|
|
|
43
43
|
export { LlTree } from './tree/index.mjs';
|
|
44
44
|
export { LlDropdown, LlDropdownButton } from './dropdown/index.mjs';
|
|
45
45
|
export { LlUploadDrag } from './upload-drag/index.mjs';
|
|
46
|
+
export { LlUriInput } from './uri-input/index.mjs';
|
|
46
47
|
export { advancedFilteringEmits, advancedFilteringParamsEmits, advancedFilteringParamsProps, advancedFilteringProps, advancedFilteringTagsEmits } from './advanced-filtering/src/advanced-filtering.mjs';
|
|
47
48
|
export { DEFAULT_METHOD, apiComponentEmits, apiComponentProps, bodyList, requestList } from './api-component/src/config/api-component.mjs';
|
|
48
49
|
export { apiModalEmits, apiModalProps } from './api-component/src/config/api-modal.mjs';
|
|
@@ -98,6 +99,7 @@ export { treeSearchEmits, treeSearchEmits1, treeSearchOperateWayType, treeSearch
|
|
|
98
99
|
export { treeEmits, treeProps } from './tree/src/tree.mjs';
|
|
99
100
|
export { dropdownButtonEmits, dropdownButtonProps, dropdownEmits, dropdownProps } from './dropdown/src/dropdown.mjs';
|
|
100
101
|
export { ILlUploadDragProps } from './upload-drag/src/upload-drag.mjs';
|
|
102
|
+
export { getHttpMethodUri, httpUriOptions, uriInputEmits, uriInputProps } from './uri-input/src/uri-input.mjs';
|
|
101
103
|
|
|
102
104
|
"use strict";
|
|
103
105
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import UploadDrag from './src/upload-drag.vue';
|
|
2
1
|
export declare const LlUploadDrag: import("ll-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
3
2
|
value: {
|
|
4
3
|
type: ArrayConstructor;
|
|
@@ -104,6 +103,6 @@ export default LlUploadDrag;
|
|
|
104
103
|
export * from './src/upload-drag';
|
|
105
104
|
declare module 'vue' {
|
|
106
105
|
interface GlobalComponents {
|
|
107
|
-
LlUploadDrag: typeof
|
|
106
|
+
LlUploadDrag: typeof LlUploadDrag;
|
|
108
107
|
}
|
|
109
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../packages/components/upload-drag/index.ts"],"sourcesContent":["import { withInstall } from '@ll-plus/utils'\
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../packages/components/upload-drag/index.ts"],"sourcesContent":["import { withInstall } from '@ll-plus/utils'\n\nimport UploadDrag from './src/upload-drag.vue'\n\nexport const LlUploadDrag = withInstall(UploadDrag)\nexport default LlUploadDrag\nexport * from './src/upload-drag'\n\ndeclare module 'vue' {\n export interface GlobalComponents {\n LlUploadDrag: typeof LlUploadDrag\n }\n}\n"],"names":[],"mappings":";;;;;;AAIa,MAAA,YAAA,GAAe,YAAY,UAAU;;;;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file LlUriInput组件引出
|
|
3
|
+
*/
|
|
4
|
+
export declare const LlUriInput: import("ll-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
5
|
+
readonly value: import("ll-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
6
|
+
readonly suffix: import("ll-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
7
|
+
readonly disabled: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
8
|
+
}, {
|
|
9
|
+
props: import("@vue/shared").LooseRequired<{
|
|
10
|
+
readonly value: string;
|
|
11
|
+
readonly disabled: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
12
|
+
readonly suffix: string;
|
|
13
|
+
readonly onChange?: ((value: string) => any) | undefined;
|
|
14
|
+
readonly "onUpdate:value"?: ((value: string) => any) | undefined;
|
|
15
|
+
} & {}>;
|
|
16
|
+
emits: ((event: "change", value: string) => void) & ((event: "update:value", value: string) => void);
|
|
17
|
+
attrs: {
|
|
18
|
+
[x: string]: unknown;
|
|
19
|
+
};
|
|
20
|
+
innerValue: import("vue").Ref<any>;
|
|
21
|
+
innerPrefix: import("vue").Ref<any>;
|
|
22
|
+
getBindValue: import("vue").ComputedRef<import("lodash").Omit<{
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
}, string>>;
|
|
25
|
+
handleChange: () => void;
|
|
26
|
+
readonly httpUriOptions: {
|
|
27
|
+
label: string;
|
|
28
|
+
value: string;
|
|
29
|
+
}[];
|
|
30
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
+
'update:value': (value: string) => boolean;
|
|
32
|
+
change: (value: string) => boolean;
|
|
33
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
+
readonly value: import("ll-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
35
|
+
readonly suffix: import("ll-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
36
|
+
readonly disabled: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
37
|
+
}>> & {
|
|
38
|
+
onChange?: ((value: string) => any) | undefined;
|
|
39
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
readonly value: string;
|
|
42
|
+
readonly disabled: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
43
|
+
readonly suffix: string;
|
|
44
|
+
}, {}>>;
|
|
45
|
+
export default LlUriInput;
|
|
46
|
+
export * from './src/uri-input';
|
|
47
|
+
declare module 'vue' {
|
|
48
|
+
interface GlobalComponents {
|
|
49
|
+
LlUriInput: typeof LlUriInput;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import '../../utils/index.mjs';
|
|
2
|
+
import UriInput from './src/uri-input.vue.mjs';
|
|
3
|
+
export { getHttpMethodUri, httpUriOptions, uriInputEmits, uriInputProps } from './src/uri-input.mjs';
|
|
4
|
+
import { withInstall } from '../../utils/with-install.mjs';
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
const LlUriInput = withInstall(UriInput);
|
|
8
|
+
|
|
9
|
+
export { LlUriInput, LlUriInput as default };
|
|
10
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../packages/components/uri-input/index.ts"],"sourcesContent":["/**\n * @file LlUriInput组件引出\n */\n\nimport { withInstall } from '@ll-plus/utils'\n\nimport UriInput from './src/uri-input.vue'\n\nexport const LlUriInput = withInstall(UriInput)\nexport default LlUriInput\nexport * from './src/uri-input'\n\ndeclare module 'vue' {\n export interface GlobalComponents {\n LlUriInput: typeof LlUriInput\n }\n}\n"],"names":[],"mappings":";;;;;;AAQa,MAAA,UAAA,GAAa,YAAY,QAAQ;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
import type UriInput from './uri-input.vue';
|
|
3
|
+
export declare const httpUriOptions: {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}[];
|
|
7
|
+
export declare const getHttpMethodUri: (uri: string) => {
|
|
8
|
+
prefix: string;
|
|
9
|
+
url: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const uriInputProps: {
|
|
12
|
+
readonly value: import("ll-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
13
|
+
readonly suffix: import("ll-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
14
|
+
readonly disabled: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
15
|
+
};
|
|
16
|
+
export declare const uriInputEmits: {
|
|
17
|
+
'update:value': (value: string) => boolean;
|
|
18
|
+
change: (value: string) => boolean;
|
|
19
|
+
};
|
|
20
|
+
export type UriInputProps = ExtractPropTypes<typeof uriInputProps>;
|
|
21
|
+
export type UriInputEmits = typeof uriInputEmits;
|
|
22
|
+
export type UriInputInstance = InstanceType<typeof UriInput>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { buildProps } from '../../../utils/props/runtime.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
const httpUriOptions = [
|
|
6
|
+
{
|
|
7
|
+
label: "Http://",
|
|
8
|
+
value: "http://"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
label: "Https://",
|
|
12
|
+
value: "https://"
|
|
13
|
+
}
|
|
14
|
+
];
|
|
15
|
+
const getHttpMethodUri = (uri) => {
|
|
16
|
+
let prefix = "http://";
|
|
17
|
+
let url = uri;
|
|
18
|
+
try {
|
|
19
|
+
const urlObject = new URL(uri);
|
|
20
|
+
if (!prefix.includes(urlObject.protocol)) {
|
|
21
|
+
prefix = "https://";
|
|
22
|
+
}
|
|
23
|
+
url = urlObject.host ? `${urlObject.host}${urlObject.pathname}` : urlObject.href;
|
|
24
|
+
} catch (error) {
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
prefix,
|
|
28
|
+
url
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
const uriInputProps = buildProps({
|
|
32
|
+
value: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: ""
|
|
35
|
+
},
|
|
36
|
+
suffix: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: ""
|
|
39
|
+
},
|
|
40
|
+
disabled: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
const uriInputEmits = {
|
|
46
|
+
"update:value": (value) => typeof value === "string",
|
|
47
|
+
change: (value) => typeof value === "string"
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export { getHttpMethodUri, httpUriOptions, uriInputEmits, uriInputProps };
|
|
51
|
+
//# sourceMappingURL=uri-input.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uri-input.mjs","sources":["../../../../../packages/components/uri-input/src/uri-input.ts"],"sourcesContent":["import { buildProps } from '@ll-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\n\nimport type UriInput from './uri-input.vue'\n\nexport const httpUriOptions = [\n {\n label: 'Http://',\n value: 'http://'\n },\n {\n label: 'Https://',\n value: 'https://'\n }\n]\n\nexport const getHttpMethodUri = (uri: string) => {\n let prefix = 'http://'\n let url = uri\n try {\n const urlObject = new URL(uri)\n if (!prefix.includes(urlObject.protocol)) {\n prefix = 'https://'\n }\n url = urlObject.host\n ? `${urlObject.host}${urlObject.pathname}`\n : urlObject.href\n } catch (error) {\n // Ignore the error\n }\n\n return {\n prefix,\n url\n }\n}\n\nexport const uriInputProps = buildProps({\n value: {\n type: String,\n default: ''\n },\n suffix: {\n type: String,\n default: ''\n },\n disabled: {\n type: Boolean,\n default: false\n }\n} as const)\n\nexport const uriInputEmits = {\n 'update:value': (value: string) => typeof value === 'string',\n change: (value: string) => typeof value === 'string'\n}\n\n// props\nexport type UriInputProps = ExtractPropTypes<typeof uriInputProps>\n\n// emits\nexport type UriInputEmits = typeof uriInputEmits\n\n// instance\nexport type UriInputInstance = InstanceType<typeof UriInput>\n"],"names":[],"mappings":";;;;AAMO,MAAM,cAAiB,GAAA;AAAA,EAC5B;AAAA,IACE,KAAO,EAAA,SAAA;AAAA,IACP,KAAO,EAAA,SAAA;AAAA,GACT;AAAA,EACA;AAAA,IACE,KAAO,EAAA,UAAA;AAAA,IACP,KAAO,EAAA,UAAA;AAAA,GACT;AACF,EAAA;AAEa,MAAA,gBAAA,GAAmB,CAAC,GAAgB,KAAA;AAC/C,EAAA,IAAI,MAAS,GAAA,SAAA,CAAA;AACb,EAAA,IAAI,GAAM,GAAA,GAAA,CAAA;AACV,EAAI,IAAA;AACF,IAAM,MAAA,SAAA,GAAY,IAAI,GAAA,CAAI,GAAG,CAAA,CAAA;AAC7B,IAAA,IAAI,CAAC,MAAA,CAAO,QAAS,CAAA,SAAA,CAAU,QAAQ,CAAG,EAAA;AACxC,MAAS,MAAA,GAAA,UAAA,CAAA;AAAA,KACX;AACA,IAAM,GAAA,GAAA,SAAA,CAAU,OACZ,CAAG,EAAA,SAAA,CAAU,IAAI,CAAG,EAAA,SAAA,CAAU,QAAQ,CAAA,CAAA,GACtC,SAAU,CAAA,IAAA,CAAA;AAAA,WACP,KAAO,EAAA;AAAA,GAEhB;AAEA,EAAO,OAAA;AAAA,IACL,MAAA;AAAA,IACA,GAAA;AAAA,GACF,CAAA;AACF,EAAA;AAEO,MAAM,gBAAgB,UAAW,CAAA;AAAA,EACtC,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AACF,CAAU,EAAA;AAEH,MAAM,aAAgB,GAAA;AAAA,EAC3B,cAAgB,EAAA,CAAC,KAAkB,KAAA,OAAO,KAAU,KAAA,QAAA;AAAA,EACpD,MAAQ,EAAA,CAAC,KAAkB,KAAA,OAAO,KAAU,KAAA,QAAA;AAC9C;;;;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
readonly value: import("ll-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
3
|
+
readonly suffix: import("ll-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
4
|
+
readonly disabled: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
5
|
+
}, {
|
|
6
|
+
props: import("@vue/shared").LooseRequired<{
|
|
7
|
+
readonly value: string;
|
|
8
|
+
readonly disabled: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
9
|
+
readonly suffix: string;
|
|
10
|
+
readonly onChange?: ((value: string) => any) | undefined;
|
|
11
|
+
readonly "onUpdate:value"?: ((value: string) => any) | undefined;
|
|
12
|
+
} & {}>;
|
|
13
|
+
emits: ((event: "change", value: string) => void) & ((event: "update:value", value: string) => void);
|
|
14
|
+
attrs: {
|
|
15
|
+
[x: string]: unknown;
|
|
16
|
+
};
|
|
17
|
+
innerValue: import("vue").Ref<any>;
|
|
18
|
+
innerPrefix: import("vue").Ref<any>;
|
|
19
|
+
getBindValue: import("vue").ComputedRef<import("lodash").Omit<{
|
|
20
|
+
[x: string]: unknown;
|
|
21
|
+
}, string>>;
|
|
22
|
+
handleChange: () => void;
|
|
23
|
+
readonly httpUriOptions: {
|
|
24
|
+
label: string;
|
|
25
|
+
value: string;
|
|
26
|
+
}[];
|
|
27
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
|
+
'update:value': (value: string) => boolean;
|
|
29
|
+
change: (value: string) => boolean;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
|
+
readonly value: import("ll-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
32
|
+
readonly suffix: import("ll-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
33
|
+
readonly disabled: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
34
|
+
}>> & {
|
|
35
|
+
onChange?: ((value: string) => any) | undefined;
|
|
36
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
readonly value: string;
|
|
39
|
+
readonly disabled: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
40
|
+
readonly suffix: string;
|
|
41
|
+
}, {}>;
|
|
42
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import _sfc_main from './uri-input.vue2.mjs';
|
|
2
|
+
import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
var UriInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "uri-input.vue"]]);
|
|
6
|
+
|
|
7
|
+
export { UriInput as default };
|
|
8
|
+
//# sourceMappingURL=uri-input.vue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uri-input.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { defineComponent, useAttrs, ref, computed, watch, resolveComponent, openBlock, createBlock, mergeProps, createSlots, withCtx, createVNode, unref, createElementVNode, toDisplayString } from 'vue';
|
|
2
|
+
import { omit } from 'lodash-es';
|
|
3
|
+
import { uriInputProps, uriInputEmits, getHttpMethodUri, httpUriOptions } from './uri-input.mjs';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
...{ name: "LlUriInput" },
|
|
8
|
+
__name: "uri-input",
|
|
9
|
+
props: uriInputProps,
|
|
10
|
+
emits: uriInputEmits,
|
|
11
|
+
setup(__props, { emit: __emit }) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
const emits = __emit;
|
|
14
|
+
const attrs = useAttrs();
|
|
15
|
+
const innerValue = ref();
|
|
16
|
+
const innerPrefix = ref();
|
|
17
|
+
const getBindValue = computed(() => {
|
|
18
|
+
return omit(attrs, Object.keys(uriInputProps));
|
|
19
|
+
});
|
|
20
|
+
const handleChange = () => {
|
|
21
|
+
const url = innerPrefix.value + innerValue.value + (props.suffix || "");
|
|
22
|
+
emits("update:value", url);
|
|
23
|
+
emits("change", url);
|
|
24
|
+
};
|
|
25
|
+
watch(
|
|
26
|
+
() => props.value,
|
|
27
|
+
(val) => {
|
|
28
|
+
const { prefix, url } = getHttpMethodUri(val);
|
|
29
|
+
innerPrefix.value = prefix;
|
|
30
|
+
innerValue.value = url;
|
|
31
|
+
if (props.suffix) {
|
|
32
|
+
innerValue.value = url.replace(props.suffix, "");
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
immediate: true
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
watch(innerValue, () => {
|
|
40
|
+
handleChange();
|
|
41
|
+
});
|
|
42
|
+
return (_ctx, _cache) => {
|
|
43
|
+
const _component_ll_select = resolveComponent("ll-select");
|
|
44
|
+
const _component_ll_input = resolveComponent("ll-input");
|
|
45
|
+
return openBlock(), createBlock(_component_ll_input, mergeProps({
|
|
46
|
+
value: innerValue.value,
|
|
47
|
+
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => innerValue.value = $event),
|
|
48
|
+
disabled: props.disabled
|
|
49
|
+
}, getBindValue.value), createSlots({
|
|
50
|
+
addonBefore: withCtx(() => [
|
|
51
|
+
createVNode(_component_ll_select, {
|
|
52
|
+
value: innerPrefix.value,
|
|
53
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => innerPrefix.value = $event),
|
|
54
|
+
options: unref(httpUriOptions),
|
|
55
|
+
style: { "width": "90px" },
|
|
56
|
+
disabled: props.disabled,
|
|
57
|
+
onChange: handleChange
|
|
58
|
+
}, null, 8, ["value", "options", "disabled"])
|
|
59
|
+
]),
|
|
60
|
+
_: 2
|
|
61
|
+
/* DYNAMIC */
|
|
62
|
+
}, [
|
|
63
|
+
props.suffix ? {
|
|
64
|
+
name: "suffix",
|
|
65
|
+
fn: withCtx(() => [
|
|
66
|
+
createElementVNode(
|
|
67
|
+
"span",
|
|
68
|
+
null,
|
|
69
|
+
toDisplayString(props.suffix),
|
|
70
|
+
1
|
|
71
|
+
/* TEXT */
|
|
72
|
+
)
|
|
73
|
+
]),
|
|
74
|
+
key: "0"
|
|
75
|
+
} : void 0
|
|
76
|
+
]), 1040, ["value", "disabled"]);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export { _sfc_main as default };
|
|
82
|
+
//# sourceMappingURL=uri-input.vue2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uri-input.vue2.mjs","sources":["../../../../../packages/components/uri-input/src/uri-input.vue"],"sourcesContent":["<template>\n <ll-input\n v-model:value=\"innerValue\"\n :disabled=\"props.disabled\"\n v-bind=\"getBindValue\"\n >\n <template #addonBefore>\n <ll-select\n v-model:value=\"innerPrefix\"\n :options=\"httpUriOptions\"\n style=\"width: 90px\"\n :disabled=\"props.disabled\"\n @change=\"handleChange\"\n />\n </template>\n <template v-if=\"props.suffix\" #suffix>\n <span>{{ props.suffix }}</span>\n </template>\n </ll-input>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, useAttrs, watch, computed } from 'vue'\nimport { omit } from 'lodash-es'\nimport {\n uriInputProps,\n uriInputEmits,\n httpUriOptions,\n getHttpMethodUri\n} from './uri-input'\n\n//Component Config\ndefineOptions({ name: 'LlUriInput' })\nconst props = defineProps(uriInputProps)\nconst emits = defineEmits(uriInputEmits)\nconst attrs = useAttrs()\n\nconst innerValue = ref()\nconst innerPrefix = ref()\n\nconst getBindValue = computed(() => {\n return omit(attrs, Object.keys(uriInputProps))\n})\n\nconst handleChange = () => {\n const url = innerPrefix.value + innerValue.value + (props.suffix || '')\n emits('update:value', url)\n emits('change', url)\n}\n\nwatch(\n () => props.value,\n val => {\n const { prefix, url } = getHttpMethodUri(val)\n innerPrefix.value = prefix\n innerValue.value = url\n if (props.suffix) {\n innerValue.value = url.replace(props.suffix, '')\n }\n },\n {\n immediate: true\n }\n)\n\nwatch(innerValue, () => {\n handleChange()\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;AAiCA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AACd,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAA,MAAM,aAAa,GAAI,EAAA,CAAA;AACvB,IAAA,MAAM,cAAc,GAAI,EAAA,CAAA;AAExB,IAAM,MAAA,YAAA,GAAe,SAAS,MAAM;AAClC,MAAA,OAAO,IAAK,CAAA,KAAA,EAAO,MAAO,CAAA,IAAA,CAAK,aAAa,CAAC,CAAA,CAAA;AAAA,KAC9C,CAAA,CAAA;AAED,IAAA,MAAM,eAAe,MAAM;AACzB,MAAA,MAAM,MAAM,WAAY,CAAA,KAAA,GAAQ,UAAW,CAAA,KAAA,IAAS,MAAM,MAAU,IAAA,EAAA,CAAA,CAAA;AACpE,MAAA,KAAA,CAAM,gBAAgB,GAAG,CAAA,CAAA;AACzB,MAAA,KAAA,CAAM,UAAU,GAAG,CAAA,CAAA;AAAA,KACrB,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,CAAO,GAAA,KAAA;AACL,QAAA,MAAM,EAAE,MAAA,EAAQ,GAAI,EAAA,GAAI,iBAAiB,GAAG,CAAA,CAAA;AAC5C,QAAA,WAAA,CAAY,KAAQ,GAAA,MAAA,CAAA;AACpB,QAAA,UAAA,CAAW,KAAQ,GAAA,GAAA,CAAA;AACnB,QAAA,IAAI,MAAM,MAAQ,EAAA;AAChB,UAAA,UAAA,CAAW,KAAQ,GAAA,GAAA,CAAI,OAAQ,CAAA,KAAA,CAAM,QAAQ,EAAE,CAAA,CAAA;AAAA,SACjD;AAAA,OACF;AAAA,MACA;AAAA,QACE,SAAW,EAAA,IAAA;AAAA,OACb;AAAA,KACF,CAAA;AAEA,IAAA,KAAA,CAAM,YAAY,MAAM;AACtB,MAAa,YAAA,EAAA,CAAA;AAAA,KACd,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/es/index.mjs
CHANGED
|
@@ -100,6 +100,8 @@ export { dropdownButtonEmits, dropdownButtonProps, dropdownEmits, dropdownProps
|
|
|
100
100
|
export { LlDropdown, LlDropdownButton } from './components/dropdown/index.mjs';
|
|
101
101
|
export { ILlUploadDragProps } from './components/upload-drag/src/upload-drag.mjs';
|
|
102
102
|
export { LlUploadDrag } from './components/upload-drag/index.mjs';
|
|
103
|
+
export { getHttpMethodUri, httpUriOptions, uriInputEmits, uriInputProps } from './components/uri-input/src/uri-input.mjs';
|
|
104
|
+
export { LlUriInput } from './components/uri-input/index.mjs';
|
|
103
105
|
|
|
104
106
|
"use strict";
|
|
105
107
|
const install = installer.install;
|
package/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../packages/ll-plus/index.ts"],"sourcesContent":["import installer from './defaults'\n// 按需导入 import {ZIcon} from 'll-plus'\nexport * from '@ll-plus/components/index'\n\nexport const install = installer.install\nexport default installer\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../packages/ll-plus/index.ts"],"sourcesContent":["import installer from './defaults'\n// 按需导入 import {ZIcon} from 'll-plus'\nexport * from '@ll-plus/components/index'\n\nexport const install = installer.install\nexport default installer\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,MAAM,UAAU,SAAU,CAAA;;;;"}
|
package/global.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ declare module '@vue/runtime-core' {
|
|
|
34
34
|
LlTabsSimple: typeof import('ll-plus')['LlTabsSimple']
|
|
35
35
|
LlTooltip: typeof import('ll-plus')['LlTooltip']
|
|
36
36
|
LlTreeSearch: typeof import('ll-plus')['LlTreeSearch']
|
|
37
|
+
LlUriIput: typeof import('ll-plus')['LlUriIput']
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
|