@jeecg/online 3.5.3-beta2 → 3.5.3-vite4

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 (154) hide show
  1. package/AuthButtonConfig-2f71787c.mjs +125 -0
  2. package/AuthButtonTree-d73bccf5.mjs +156 -0
  3. package/AuthDataConfig-32cf23d2.mjs +212 -0
  4. package/AuthDataTree-03d62d3f.mjs +139 -0
  5. package/AuthFieldConfig-b1217a0c.mjs +139 -0
  6. package/AuthFieldTree-888e04a9.mjs +232 -0
  7. package/AuthManagerDrawer-f127b8a2.mjs +114 -0
  8. package/AuthSetterModal-37da78ed.mjs +261 -0
  9. package/CgformCopyList-3adab58f.mjs +245 -0
  10. package/CgformModal-6938d8c2.mjs +613 -0
  11. package/CgreportModal-77ec8c17.mjs +12 -0
  12. package/CgreportModal.vue_vue_type_script_setup_true_lang-52dcec5e.mjs +567 -0
  13. package/CheckDictTable-414313f2.mjs +211 -0
  14. package/CodeFileListModal-4831ce3d.mjs +158 -0
  15. package/CodeFileViewModal-5990dac4.mjs +244 -0
  16. package/CodeGeneratorModal-7df9e25d.mjs +234 -0
  17. package/CustomButtonList-1c9bd859.mjs +363 -0
  18. package/DBAttributeTable-cd1c41e5.mjs +473 -0
  19. package/DbToOnlineModal-dc5d2030.mjs +160 -0
  20. package/DetailForm-e4538e7a.mjs +446 -0
  21. package/EnhanceJavaModal-7f53d2ca.mjs +260 -0
  22. package/EnhanceJsHistory-c30805ce.mjs +184 -0
  23. package/EnhanceJsModal-0b133341.mjs +233 -0
  24. package/EnhanceSqlModal-33a94c83.mjs +259 -0
  25. package/ExtendConfigModal-60f2cf86.mjs +111 -0
  26. package/FieldExtendJsonModal-48f7d67f.mjs +220 -0
  27. package/FileSelectModal-64aaf623.mjs +91 -0
  28. package/ForeignKeyTable-cb1abd1d.mjs +69 -0
  29. package/IndexTable-4e94cd1f.mjs +89 -0
  30. package/JModalTip-abe1515a.mjs +46 -0
  31. package/JOnlineSearchSelect-5608a5cf.mjs +94 -0
  32. package/LeftDepart-ca7a7375.mjs +82 -0
  33. package/LeftRole-d0fa8398.mjs +86 -0
  34. package/LeftUser-0c88c240.mjs +105 -0
  35. package/LinkTableConfigModal-77d7c0b9.mjs +230 -0
  36. package/LinkTableFieldConfigModal-c5689ab0.mjs +178 -0
  37. package/LinkTableListPiece-34266919.mjs +34 -0
  38. package/ModalFormDemo-0eeea994.mjs +78 -0
  39. package/OnlCgformErpList-7a0388d8.mjs +425 -0
  40. package/OnlCgformErpSubTable-fc6ade76.mjs +388 -0
  41. package/OnlineAutoList-85e6a30d.mjs +472 -0
  42. package/OnlineAutoModal-2a146238.mjs +206 -0
  43. package/OnlineAutoTreeList-f8d0e100.mjs +495 -0
  44. package/OnlineCustomModal-456a85a6.mjs +227 -0
  45. package/OnlineDetailModal-f967f080.mjs +177 -0
  46. package/OnlineForm-630a22c2.mjs +778 -0
  47. package/OnlineFormDetail-1b216792.mjs +296 -0
  48. package/OnlineQueryForm-1c5949a7.mjs +378 -0
  49. package/OnlineSearchFormItem-7c2ea9ed.mjs +352 -0
  50. package/OnlineSelectCascade-c7baf52b.mjs +160 -0
  51. package/OnlineSubFormDetail-0aa4966c.mjs +140 -0
  52. package/PageAttributeTable-811185fd.mjs +404 -0
  53. package/ProcessOnlineForm-27be6f6f.mjs +177 -0
  54. package/QueryTable-4ba771ef.mjs +115 -0
  55. package/SuperQuery-3821f984.mjs +845 -0
  56. package/SuperQueryValComponent-471110b5.mjs +8 -0
  57. package/SuperQueryValComponent.vue_vue_type_script_lang-e3ad7ee8.mjs +101 -0
  58. package/auth.api-d3a6c4b3.mjs +39 -0
  59. package/auth.data-8be5c9e3.mjs +141 -0
  60. package/{cgform.data.js → cgform.data-cbdd88c3.mjs} +93 -62
  61. package/constant-fe20103a.mjs +6 -0
  62. package/enhance.api-138e6826.mjs +104 -0
  63. package/enhance.data-efc7e155.mjs +175 -0
  64. package/index-074b92e5.mjs +236 -0
  65. package/index-6a09a912.mjs +58 -0
  66. package/index-9d32ae88.mjs +313 -0
  67. package/main.index.js +7 -1
  68. package/package.json +1 -1
  69. package/style.css +1 -1
  70. package/useCgformList-2d6a5955.mjs +388 -0
  71. package/useExtendComponent-48d37d9b.mjs +3919 -0
  72. package/useListButton-cef1371a.mjs +656 -0
  73. package/useOnlinePopEvent-e9a042f8.mjs +19 -0
  74. package/useOnlineTest-0df0ae86.mjs +43 -0
  75. package/useSchemas-fc8d97ce.mjs +669 -0
  76. package/useTableSync-dc333087.mjs +83 -0
  77. package/AuthButtonConfig.js +0 -147
  78. package/AuthButtonTree.js +0 -183
  79. package/AuthDataConfig.js +0 -246
  80. package/AuthDataTree.js +0 -160
  81. package/AuthFieldConfig.js +0 -170
  82. package/AuthFieldTree.js +0 -281
  83. package/AuthManagerDrawer.js +0 -125
  84. package/AuthSetterModal.js +0 -316
  85. package/CgformCopyList.js +0 -266
  86. package/CgformModal.js +0 -780
  87. package/CgreportModal.js +0 -667
  88. package/CheckDictTable.js +0 -242
  89. package/CodeFileListModal.js +0 -175
  90. package/CodeFileViewModal.js +0 -325
  91. package/CodeGeneratorModal.js +0 -297
  92. package/CustomButtonList.js +0 -410
  93. package/DBAttributeTable.js +0 -526
  94. package/DbToOnlineModal.js +0 -192
  95. package/DetailForm.js +0 -608
  96. package/EnhanceJavaModal.js +0 -298
  97. package/EnhanceJsHistory.js +0 -229
  98. package/EnhanceJsModal.js +0 -293
  99. package/EnhanceSqlModal.js +0 -299
  100. package/ExtendConfigModal.js +0 -151
  101. package/FieldExtendJsonModal.js +0 -283
  102. package/FileSelectModal.js +0 -102
  103. package/ForeignKeyTable.js +0 -79
  104. package/IndexTable.js +0 -97
  105. package/JModalTip.js +0 -54
  106. package/JOnlineSearchSelect.js +0 -115
  107. package/LICENSE +0 -9
  108. package/LeftDepart.js +0 -96
  109. package/LeftRole.js +0 -98
  110. package/LeftUser.js +0 -117
  111. package/LinkTableConfigModal.js +0 -289
  112. package/LinkTableFieldConfigModal.js +0 -218
  113. package/LinkTableListPiece.js +0 -36
  114. package/ModalFormDemo.js +0 -85
  115. package/OnlineAutoList.js +0 -524
  116. package/OnlineAutoModal.js +0 -226
  117. package/OnlineAutoTreeList.js +0 -553
  118. package/OnlineCustomModal.js +0 -286
  119. package/OnlineDetailModal.js +0 -190
  120. package/OnlineForm.js +0 -1018
  121. package/OnlineFormDetail.js +0 -347
  122. package/OnlineQueryForm.js +0 -484
  123. package/OnlineSearchFormItem.js +0 -436
  124. package/OnlineSelectCascade.js +0 -228
  125. package/OnlineSubFormDetail.js +0 -166
  126. package/PageAttributeTable.js +0 -486
  127. package/ProcessOnlineForm.js +0 -208
  128. package/QueryTable.js +0 -129
  129. package/SuperQuery.js +0 -1021
  130. package/SuperQueryValComponent.js +0 -9
  131. package/SuperQueryValComponent.vue_vue_type_script_lang.js +0 -162
  132. package/_arrayPush.js +0 -278
  133. package/_baseClone.js +0 -471
  134. package/_baseSlice.js +0 -18
  135. package/_commonjsHelpers.js +0 -5
  136. package/_flatRest.js +0 -174
  137. package/auth.api.js +0 -43
  138. package/auth.data.js +0 -142
  139. package/clipboard.js +0 -565
  140. package/enhance.api.js +0 -129
  141. package/enhance.data.js +0 -196
  142. package/index.js +0 -87
  143. package/index2.js +0 -340
  144. package/index3.js +0 -264
  145. package/isArray.js +0 -47
  146. package/omit.js +0 -60
  147. package/pick.js +0 -68
  148. package/toString.js +0 -31
  149. package/useCgformList.js +0 -470
  150. package/useExtendComponent.js +0 -5205
  151. package/useListButton.js +0 -923
  152. package/useOnlineTest.js +0 -44
  153. package/useSchemas.js +0 -653
  154. package/useTableSync.js +0 -117
package/index3.js DELETED
@@ -1,264 +0,0 @@
1
- var __async = (__this, __arguments, generator) => {
2
- return new Promise((resolve, reject) => {
3
- var fulfilled = (value) => {
4
- try {
5
- step(generator.next(value));
6
- } catch (e) {
7
- reject(e);
8
- }
9
- };
10
- var rejected = (value) => {
11
- try {
12
- step(generator.throw(value));
13
- } catch (e) {
14
- reject(e);
15
- }
16
- };
17
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
- step((generator = generator.apply(__this, __arguments)).next());
19
- });
20
- };
21
- import { defineComponent, resolveComponent, openBlock, createElementBlock, createVNode, unref, mergeProps, withCtx, createTextVNode, createBlock, createCommentVNode } from "vue";
22
- import { BasicTable, TableAction } from "/@/components/Table";
23
- import { useListPage } from "/@/hooks/system/useListPage";
24
- import { l as list, c as columns, s as searchFormSchema, _ as _sfc_main$1, b as batchDelete, g as getReportParam, d as deleteOne } from "./CgreportModal.js";
25
- import { useModal } from "/@/components/Modal";
26
- import { C as Clipboard } from "./clipboard.js";
27
- import { useRouter } from "vue-router";
28
- import { buildUUID } from "/@/utils/uuid";
29
- import "/@/components/Form/index";
30
- import "/@/hooks/system/useJvxeMethods.ts";
31
- import "/@/components/jeecg/JVxeTable/types";
32
- import "/@/views/system/user/user.api";
33
- import "/@/utils/http/axios";
34
- import "/@/hooks/web/useMessage";
35
- import "./_commonjsHelpers.js";
36
- const _sfc_main = /* @__PURE__ */ defineComponent({
37
- __name: "index",
38
- setup(__props, { expose }) {
39
- let router = useRouter();
40
- const [registerModal, { openModal }] = useModal();
41
- const {
42
- prefixCls,
43
- tableContext,
44
- createMessage: $message,
45
- createConfirm: $confirm
46
- } = useListPage({
47
- designScope: "online-cgreport-list",
48
- pagination: true,
49
- tableProps: {
50
- title: "Online\u62A5\u8868",
51
- api: list,
52
- rowKey: "id",
53
- columns,
54
- formConfig: {
55
- autoSubmitOnEnter: true,
56
- showAdvancedButton: true,
57
- schemas: searchFormSchema
58
- }
59
- }
60
- });
61
- const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
62
- function handleAdd() {
63
- openModal(true, {
64
- isUpdate: false,
65
- showFooter: true
66
- });
67
- }
68
- function handleEdit(record) {
69
- openModal(true, {
70
- record,
71
- isUpdate: true,
72
- showFooter: true
73
- });
74
- }
75
- function handleDelete(record) {
76
- return __async(this, null, function* () {
77
- yield deleteOne({ id: record.id }, reload);
78
- });
79
- }
80
- function batchHandleDelete() {
81
- return __async(this, null, function* () {
82
- yield batchDelete({ ids: selectedRowKeys.value }, () => {
83
- reload();
84
- selectedRowKeys.value = [];
85
- });
86
- });
87
- }
88
- function handleSuccess() {
89
- reload();
90
- }
91
- function getAction(record) {
92
- return [
93
- {
94
- label: "\u7F16\u8F91",
95
- onClick: handleEdit.bind(null, record)
96
- }
97
- ];
98
- }
99
- function getDropDownAction(record) {
100
- return [
101
- {
102
- label: "\u529F\u80FD\u6D4B\u8BD5",
103
- class: ["low-app-hide"],
104
- onClick: () => onShowList(record.id)
105
- },
106
- {
107
- label: "\u914D\u7F6E\u5730\u5740",
108
- class: ["low-app-hide"],
109
- onClick: () => onShowOnlineUrl(record)
110
- },
111
- {
112
- label: "\u5220\u9664",
113
- popConfirm: {
114
- title: "\u662F\u5426\u786E\u8BA4\u5220\u9664",
115
- confirm: handleDelete.bind(null, record)
116
- }
117
- }
118
- ];
119
- }
120
- function onShowList(id) {
121
- router.push({ path: "/online/cgreport/" + id });
122
- }
123
- function onShowOnlineUrl(record) {
124
- let id = record.id;
125
- let baseUrl = `/online/cgreport/${id}`;
126
- let insertMenuSql = `INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
127
- VALUES ('${buildUUID()}', NULL, '${record.name}', '${baseUrl}', '1', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 0, 1, 0, 0, 0, NULL, '1', 0, 0, 'admin', null, NULL, NULL, 0)`;
128
- getReportParam(id).then((arr) => {
129
- let urlParam = "";
130
- if (arr && arr.length > 0) {
131
- for (let i of arr) {
132
- urlParam += i.paramName + "=${" + i.paramName + "}&";
133
- }
134
- }
135
- if (urlParam.length > 0) {
136
- urlParam = urlParam.substring(0, urlParam.length - 1);
137
- baseUrl += "?" + urlParam;
138
- }
139
- }).catch(() => {
140
- $message.warning("\u83B7\u53D6\u53C2\u6570\u5931\u8D25!");
141
- }).finally(() => {
142
- $confirm({
143
- iconType: "info",
144
- width: 500,
145
- title: `\u83DC\u5355\u94FE\u63A5\u3010${record.name}\u3011`,
146
- content: baseUrl,
147
- closable: true,
148
- maskClosable: true,
149
- cancelText: "\u590D\u5236SQL",
150
- okText: "\u590D\u5236URL",
151
- cancelButtonProps: {
152
- class: "copy-this-sql",
153
- "data-clipboard-text": insertMenuSql
154
- },
155
- okButtonProps: {
156
- class: "copy-this-text",
157
- "data-clipboard-text": baseUrl
158
- },
159
- onOk() {
160
- return new Promise((resolve) => {
161
- const clipboard = new Clipboard(".copy-this-text");
162
- clipboard.on("success", () => {
163
- clipboard.destroy();
164
- $message.success("\u590D\u5236URL\u6210\u529F");
165
- resolve();
166
- });
167
- clipboard.on("error", () => {
168
- $message.error("\u8BE5\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u81EA\u52A8\u590D\u5236");
169
- clipboard.destroy();
170
- resolve();
171
- });
172
- });
173
- },
174
- onCancel() {
175
- return new Promise((resolve) => {
176
- const clipboard = new Clipboard(".copy-this-sql");
177
- clipboard.on("success", () => {
178
- clipboard.destroy();
179
- $message.success("\u590D\u5236\u63D2\u5165\u83DC\u5355SQL\u6210\u529F");
180
- resolve();
181
- });
182
- clipboard.on("error", () => {
183
- $message.error("\u8BE5\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u81EA\u52A8\u590D\u5236");
184
- clipboard.destroy();
185
- resolve();
186
- });
187
- });
188
- }
189
- });
190
- });
191
- }
192
- expose({
193
- handleAdd
194
- });
195
- return (_ctx, _cache) => {
196
- const _component_a_button = resolveComponent("a-button");
197
- const _component_Icon = resolveComponent("Icon");
198
- const _component_a_menu_item = resolveComponent("a-menu-item");
199
- const _component_a_menu = resolveComponent("a-menu");
200
- const _component_a_dropdown = resolveComponent("a-dropdown");
201
- return openBlock(), createElementBlock("div", null, [
202
- createVNode(unref(BasicTable), mergeProps({
203
- onRegister: unref(registerTable),
204
- rowSelection: unref(rowSelection)
205
- }, _ctx.$attrs), {
206
- tableTitle: withCtx(() => [
207
- createVNode(_component_a_button, {
208
- preIcon: "ant-design:plus-outlined",
209
- type: "primary",
210
- onClick: handleAdd,
211
- style: { "margin-right": "5px" }
212
- }, {
213
- default: withCtx(() => [
214
- createTextVNode("\u5F55\u5165")
215
- ]),
216
- _: 1
217
- }),
218
- unref(selectedRowKeys).length > 0 ? (openBlock(), createBlock(_component_a_dropdown, { key: 0 }, {
219
- overlay: withCtx(() => [
220
- createVNode(_component_a_menu, null, {
221
- default: withCtx(() => [
222
- createVNode(_component_a_menu_item, {
223
- key: "1",
224
- onClick: batchHandleDelete
225
- }, {
226
- default: withCtx(() => [
227
- createVNode(_component_Icon, { icon: "ant-design:delete-outlined" }),
228
- createTextVNode(" \u5220\u9664 ")
229
- ]),
230
- _: 1
231
- })
232
- ]),
233
- _: 1
234
- })
235
- ]),
236
- default: withCtx(() => [
237
- createVNode(_component_a_button, null, {
238
- default: withCtx(() => [
239
- createTextVNode("\u6279\u91CF\u64CD\u4F5C "),
240
- createVNode(_component_Icon, { icon: "mdi:chevron-down" })
241
- ]),
242
- _: 1
243
- })
244
- ]),
245
- _: 1
246
- })) : createCommentVNode("", true)
247
- ]),
248
- action: withCtx(({ record }) => [
249
- createVNode(unref(TableAction), {
250
- actions: getAction(record),
251
- dropDownActions: getDropDownAction(record)
252
- }, null, 8, ["actions", "dropDownActions"])
253
- ]),
254
- _: 1
255
- }, 16, ["onRegister", "rowSelection"]),
256
- createVNode(_sfc_main$1, {
257
- onRegister: unref(registerModal),
258
- onSuccess: handleSuccess
259
- }, null, 8, ["onRegister"])
260
- ]);
261
- };
262
- }
263
- });
264
- export { _sfc_main as default };
package/isArray.js DELETED
@@ -1,47 +0,0 @@
1
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
2
- var freeGlobal$1 = freeGlobal;
3
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
4
- var root = freeGlobal$1 || freeSelf || Function("return this")();
5
- var root$1 = root;
6
- var Symbol$1 = root$1.Symbol;
7
- var Symbol$2 = Symbol$1;
8
- var objectProto$1 = Object.prototype;
9
- var hasOwnProperty = objectProto$1.hasOwnProperty;
10
- var nativeObjectToString$1 = objectProto$1.toString;
11
- var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
12
- function getRawTag(value) {
13
- var isOwn = hasOwnProperty.call(value, symToStringTag$1), tag = value[symToStringTag$1];
14
- try {
15
- value[symToStringTag$1] = void 0;
16
- var unmasked = true;
17
- } catch (e) {
18
- }
19
- var result = nativeObjectToString$1.call(value);
20
- if (unmasked) {
21
- if (isOwn) {
22
- value[symToStringTag$1] = tag;
23
- } else {
24
- delete value[symToStringTag$1];
25
- }
26
- }
27
- return result;
28
- }
29
- var objectProto = Object.prototype;
30
- var nativeObjectToString = objectProto.toString;
31
- function objectToString(value) {
32
- return nativeObjectToString.call(value);
33
- }
34
- var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
35
- var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
36
- function baseGetTag(value) {
37
- if (value == null) {
38
- return value === void 0 ? undefinedTag : nullTag;
39
- }
40
- return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
41
- }
42
- function isObjectLike(value) {
43
- return value != null && typeof value == "object";
44
- }
45
- var isArray = Array.isArray;
46
- var isArray$1 = isArray;
47
- export { Symbol$2 as S, isArray$1 as a, baseGetTag as b, freeGlobal$1 as f, isObjectLike as i, root$1 as r };
package/omit.js DELETED
@@ -1,60 +0,0 @@
1
- import { a as arrayMap } from "./toString.js";
2
- import { g as getPrototype, c as copyObject, a as getAllKeysIn, b as baseClone } from "./_baseClone.js";
3
- import { b as baseGet, c as castPath, t as toKey, f as flatRest } from "./_flatRest.js";
4
- import { b as baseSlice } from "./_baseSlice.js";
5
- import { i as isObjectLike, b as baseGetTag } from "./isArray.js";
6
- var objectTag = "[object Object]";
7
- var funcProto = Function.prototype, objectProto = Object.prototype;
8
- var funcToString = funcProto.toString;
9
- var hasOwnProperty = objectProto.hasOwnProperty;
10
- var objectCtorString = funcToString.call(Object);
11
- function isPlainObject(value) {
12
- if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
13
- return false;
14
- }
15
- var proto = getPrototype(value);
16
- if (proto === null) {
17
- return true;
18
- }
19
- var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
20
- return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
21
- }
22
- function last(array) {
23
- var length = array == null ? 0 : array.length;
24
- return length ? array[length - 1] : void 0;
25
- }
26
- function parent(object, path) {
27
- return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
28
- }
29
- function baseUnset(object, path) {
30
- path = castPath(path, object);
31
- object = parent(object, path);
32
- return object == null || delete object[toKey(last(path))];
33
- }
34
- function customOmitClone(value) {
35
- return isPlainObject(value) ? void 0 : value;
36
- }
37
- var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
38
- var omit = flatRest(function(object, paths) {
39
- var result = {};
40
- if (object == null) {
41
- return result;
42
- }
43
- var isDeep = false;
44
- paths = arrayMap(paths, function(path) {
45
- path = castPath(path, object);
46
- isDeep || (isDeep = path.length > 1);
47
- return path;
48
- });
49
- copyObject(object, getAllKeysIn(object), result);
50
- if (isDeep) {
51
- result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
52
- }
53
- var length = paths.length;
54
- while (length--) {
55
- baseUnset(result, paths[length]);
56
- }
57
- return result;
58
- });
59
- var omit$1 = omit;
60
- export { omit$1 as o };
package/pick.js DELETED
@@ -1,68 +0,0 @@
1
- import { c as castPath, t as toKey, b as baseGet, f as flatRest } from "./_flatRest.js";
2
- import { i as isLength, a as isIndex, b as isArguments, c as isObject, d as assignValue } from "./_arrayPush.js";
3
- import { a as isArray } from "./isArray.js";
4
- function baseHasIn(object, key) {
5
- return object != null && key in Object(object);
6
- }
7
- function hasPath(object, path, hasFunc) {
8
- path = castPath(path, object);
9
- var index = -1, length = path.length, result = false;
10
- while (++index < length) {
11
- var key = toKey(path[index]);
12
- if (!(result = object != null && hasFunc(object, key))) {
13
- break;
14
- }
15
- object = object[key];
16
- }
17
- if (result || ++index != length) {
18
- return result;
19
- }
20
- length = object == null ? 0 : object.length;
21
- return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
22
- }
23
- function hasIn(object, path) {
24
- return object != null && hasPath(object, path, baseHasIn);
25
- }
26
- function baseSet(object, path, value, customizer) {
27
- if (!isObject(object)) {
28
- return object;
29
- }
30
- path = castPath(path, object);
31
- var index = -1, length = path.length, lastIndex = length - 1, nested = object;
32
- while (nested != null && ++index < length) {
33
- var key = toKey(path[index]), newValue = value;
34
- if (key === "__proto__" || key === "constructor" || key === "prototype") {
35
- return object;
36
- }
37
- if (index != lastIndex) {
38
- var objValue = nested[key];
39
- newValue = customizer ? customizer(objValue, key, nested) : void 0;
40
- if (newValue === void 0) {
41
- newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
42
- }
43
- }
44
- assignValue(nested, key, newValue);
45
- nested = nested[key];
46
- }
47
- return object;
48
- }
49
- function basePickBy(object, paths, predicate) {
50
- var index = -1, length = paths.length, result = {};
51
- while (++index < length) {
52
- var path = paths[index], value = baseGet(object, path);
53
- if (predicate(value, path)) {
54
- baseSet(result, castPath(path, object), value);
55
- }
56
- }
57
- return result;
58
- }
59
- function basePick(object, paths) {
60
- return basePickBy(object, paths, function(value, path) {
61
- return hasIn(object, path);
62
- });
63
- }
64
- var pick = flatRest(function(object, paths) {
65
- return object == null ? {} : basePick(object, paths);
66
- });
67
- var pick$1 = pick;
68
- export { pick$1 as p };
package/toString.js DELETED
@@ -1,31 +0,0 @@
1
- import { i as isObjectLike, b as baseGetTag, S as Symbol$1, a as isArray } from "./isArray.js";
2
- var symbolTag = "[object Symbol]";
3
- function isSymbol(value) {
4
- return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
5
- }
6
- function arrayMap(array, iteratee) {
7
- var index = -1, length = array == null ? 0 : array.length, result = Array(length);
8
- while (++index < length) {
9
- result[index] = iteratee(array[index], index, array);
10
- }
11
- return result;
12
- }
13
- var INFINITY = 1 / 0;
14
- var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
15
- function baseToString(value) {
16
- if (typeof value == "string") {
17
- return value;
18
- }
19
- if (isArray(value)) {
20
- return arrayMap(value, baseToString) + "";
21
- }
22
- if (isSymbol(value)) {
23
- return symbolToString ? symbolToString.call(value) : "";
24
- }
25
- var result = value + "";
26
- return result == "0" && 1 / value == -INFINITY ? "-0" : result;
27
- }
28
- function toString(value) {
29
- return value == null ? "" : baseToString(value);
30
- }
31
- export { arrayMap as a, isSymbol as i, toString as t };