@citruslime/ui 2.0.0-beta.17 → 2.0.0-beta.18
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/dist/citrus-lime-ui.es.js +573 -859
- package/dist/citrus-lime-ui.umd.js +2 -2
- package/dist/{src/components → components}/accordion/cl-ui-accordion.vue.d.ts +0 -0
- package/dist/{src/components → components}/accordion/index.d.ts +0 -0
- package/dist/{src/components → components}/accordion/item/cl-ui-accordion-item.vue.d.ts +0 -0
- package/dist/{src/components → components}/accordion/types.d.ts +0 -0
- package/dist/{src/components → components}/app/cl-ui-app.vue.d.ts +0 -0
- package/dist/{src/components → components}/app/index.d.ts +0 -0
- package/dist/{src/components → components}/button/cl-ui-button.vue.d.ts +0 -0
- package/dist/{src/components → components}/button/index.d.ts +0 -0
- package/dist/{src/components → components}/button/types.d.ts +0 -0
- package/dist/{src/components → components}/calendar/cl-ui-calendar.vue.d.ts +0 -0
- package/dist/{src/components → components}/calendar/index.d.ts +0 -0
- package/dist/{src/components → components}/calendar/types.d.ts +0 -0
- package/dist/{src/components → components}/calendar/utils.d.ts +0 -0
- package/dist/{src/components → components}/card/cl-ui-card.vue.d.ts +0 -0
- package/dist/{src/components → components}/card/index.d.ts +0 -0
- package/dist/{src/components → components}/card/types.d.ts +0 -0
- package/dist/{src/components → components}/combo-box/cl-ui-combo-box.vue.d.ts +8 -8
- package/dist/{src/components → components}/combo-box/index.d.ts +0 -0
- package/dist/{src/components → components}/combo-box/search-container/cl-ui-combo-box-search.vue.d.ts +1 -1
- package/dist/{src/components → components}/combo-box/search-container/header/cl-ui-combo-box-header.vue.d.ts +0 -0
- package/dist/{src/components → components}/combo-box/search-container/selectable/cl-ui-combo-box-selectable.vue.d.ts +1 -1
- package/dist/{src/components → components}/combo-box/types.d.ts +0 -0
- package/dist/{src/components → components}/footer/index.d.ts +0 -0
- package/dist/{src/components → components}/grid/cell/cl-ui-grid-cell.vue.d.ts +1 -1
- package/dist/{src/components → components}/grid/cl-ui-grid.vue.d.ts +6 -6
- package/dist/{src/components → components}/grid/filter/cl-ui-grid-filter.vue.d.ts +2 -2
- package/dist/{src/utils → components/grid/filter}/filter-methods.d.ts +1 -1
- package/dist/{src/components → components}/grid/footer/cl-ui-grid-footer.vue.d.ts +2 -2
- package/dist/{src/components → components}/grid/header/cl-ui-grid-header.vue.d.ts +0 -0
- package/dist/{src/components → components}/grid/index.d.ts +0 -0
- package/dist/{src/components → components}/grid/types.d.ts +0 -0
- package/dist/{src/components → components}/grid/view-manager/cl-ui-grid-view-manager.vue.d.ts +0 -0
- package/dist/{src/components → components}/header/index.d.ts +0 -0
- package/dist/{src/components → components}/header/menu/cl-ui-header-menu.vue.d.ts +0 -0
- package/dist/{src/components → components}/header/menu/index.d.ts +0 -0
- package/dist/{src/components → components}/index.d.ts +0 -0
- package/dist/{src/components → components}/input/cl-ui-input.vue.d.ts +0 -0
- package/dist/{src/components → components}/input/index.d.ts +0 -0
- package/dist/{src/components → components}/input/types.d.ts +0 -0
- package/dist/{src/components → components}/input/utils.d.ts +0 -0
- package/dist/{src/components → components}/language-switcher/cl-ui-language-switcher.vue.d.ts +0 -0
- package/dist/{src/components → components}/language-switcher/index.d.ts +0 -0
- package/dist/{src/components → components}/language-switcher/types.d.ts +0 -0
- package/dist/{src/components → components}/loading-spinner/index.d.ts +0 -0
- package/dist/{src/components → components}/login/cl-ui-login.vue.d.ts +0 -0
- package/dist/{src/components → components}/login/index.d.ts +0 -0
- package/dist/{src/components → components}/login/types.d.ts +0 -0
- package/dist/{src/components → components}/modal/cl-ui-modal.vue.d.ts +0 -0
- package/dist/{src/components → components}/modal/index.d.ts +0 -0
- package/dist/{src/components → components}/modal/types.d.ts +0 -0
- package/dist/{src/components → components}/navigation/cl-ui-navigation.vue.d.ts +0 -0
- package/dist/{src/components → components}/navigation/group/cl-ui-navigation-group.vue.d.ts +0 -0
- package/dist/{src/components → components}/navigation/icon/cl-ui-navigation-icon.vue.d.ts +0 -0
- package/dist/{src/components → components}/navigation/index.d.ts +0 -0
- package/dist/{src/components → components}/notification/cl-ui-notification.vue.d.ts +0 -0
- package/dist/{src/components → components}/notification/index.d.ts +0 -0
- package/dist/{src/components → components}/notification/types.d.ts +0 -0
- package/dist/{src/components → components}/slider/cl-ui-slider.vue.d.ts +2 -2
- package/dist/{src/components → components}/slider/index.d.ts +0 -0
- package/dist/{src/composables → composables}/index.d.ts +0 -0
- package/dist/{src/composables → composables}/notification.d.ts +0 -0
- package/dist/{src/main.d.ts → main.d.ts} +0 -2
- package/dist/style.css +1 -1
- package/dist/{src/utils → utils}/i18n/config.d.ts +0 -0
- package/dist/{src/utils → utils}/i18n/defaults.d.ts +0 -0
- package/dist/{src/utils → utils}/i18n/index.d.ts +0 -0
- package/dist/{src/utils → utils}/i18n/types.d.ts +0 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/{src/utils → utils}/validation.d.ts +0 -0
- package/package.json +12 -13
- package/dist/.eslintrc.js +0 -465
- package/dist/.stylelintrc.js +0 -119
- package/dist/src/utils/copy.d.ts +0 -8
- package/dist/src/utils/debouncer.d.ts +0 -13
- package/dist/src/utils/extensions/date/index.d.ts +0 -1
- package/dist/src/utils/extensions/date/types.d.ts +0 -8
- package/dist/src/utils/extensions/string/types.d.ts +0 -48
- package/dist/src/utils/extensions/string/utils.d.ts +0 -83
- package/dist/src/utils/id.d.ts +0 -6
- package/dist/src/utils/index.d.ts +0 -8
- package/dist/src/utils/name-of.d.ts +0 -7
- package/dist/src/utils/sort.d.ts +0 -9
- package/dist/src/utils/url-params.d.ts +0 -8
- package/dist/theme.js +0 -121
|
@@ -31,9 +31,11 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
return target;
|
|
32
32
|
};
|
|
33
33
|
import { Icon } from "@iconify/vue";
|
|
34
|
-
import { defineComponent, ref, openBlock, createElementBlock, renderSlot, normalizeProps, guardReactiveProps, resolveComponent, Fragment, createElementVNode, normalizeClass, createVNode, Transition, withCtx, withDirectives, vShow,
|
|
34
|
+
import { defineComponent, ref, openBlock, createElementBlock, renderSlot, normalizeProps, guardReactiveProps, resolveComponent, Fragment, createElementVNode, normalizeClass, createVNode, Transition, withCtx, withDirectives, vShow, createBlock, Teleport, renderList, unref, mergeProps, toDisplayString, createCommentVNode, nextTick, computed, watch, onMounted, onUnmounted, isRef, normalizeStyle, vModelText, withModifiers, vModelDynamic, withKeys, createTextVNode, watchEffect, createSlots } from "vue";
|
|
35
|
+
import { generateStringId } from "@citruslime/utils";
|
|
35
36
|
import { createI18n, useI18n } from "vue-i18n";
|
|
36
37
|
import Flatpickr from "flatpickr";
|
|
38
|
+
import { useDebouncer, copy } from "@citruslime/vue-utils";
|
|
37
39
|
const _hoisted_1$u = { class: "cl-overflow-hidden" };
|
|
38
40
|
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
39
41
|
props: {
|
|
@@ -132,10 +134,11 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
132
134
|
}
|
|
133
135
|
});
|
|
134
136
|
var _export_sfc = (sfc, props) => {
|
|
137
|
+
const target = sfc.__vccOpts || sfc;
|
|
135
138
|
for (const [key, val] of props) {
|
|
136
|
-
|
|
139
|
+
target[key] = val;
|
|
137
140
|
}
|
|
138
|
-
return
|
|
141
|
+
return target;
|
|
139
142
|
};
|
|
140
143
|
const _sfc_main$t = {};
|
|
141
144
|
const _hoisted_1$s = { class: "cl-border-b cl-border-grey-1 cl-font-semibold cl-pl-14 cl-pr-4 cl-py-2 cl-text-grey-3 cl-text-sm" };
|
|
@@ -145,44 +148,211 @@ function _sfc_render$5(_ctx, _cache) {
|
|
|
145
148
|
]);
|
|
146
149
|
}
|
|
147
150
|
var clUiAccordionHeader = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$5]]);
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
});
|
|
156
|
-
function debounce(event, eventArgs) {
|
|
157
|
-
if (debouncerState.debouncer !== null) {
|
|
158
|
-
window.clearTimeout(debouncerState.debouncer);
|
|
159
|
-
}
|
|
160
|
-
debouncerState.debouncer = window.setTimeout(() => event(...eventArgs), debouncerState.timeout);
|
|
161
|
-
}
|
|
162
|
-
return __spreadProps(__spreadValues({}, toRefs(debouncerState)), {
|
|
163
|
-
debounce
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
function generateStringId() {
|
|
167
|
-
return Math.random().toString(36).slice(2, 8);
|
|
168
|
-
}
|
|
169
|
-
function nameOf(name) {
|
|
170
|
-
return name;
|
|
151
|
+
const notifications = ref([]);
|
|
152
|
+
function showNotification(notification) {
|
|
153
|
+
const newNotification = __spreadValues({
|
|
154
|
+
id: generateStringId()
|
|
155
|
+
}, notification);
|
|
156
|
+
notifications.value.push(newNotification);
|
|
157
|
+
setTimeout(() => removeNotification(newNotification), notification.duration);
|
|
171
158
|
}
|
|
172
|
-
function
|
|
173
|
-
|
|
159
|
+
function removeNotification(notification) {
|
|
160
|
+
notifications.value = notifications.value.filter((n) => n.id !== notification.id);
|
|
174
161
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
162
|
+
const _hoisted_1$r = ["onClick"];
|
|
163
|
+
const _hoisted_2$m = { class: "cl-flex-1 cl-select-none cl-text-ellipsis cl-w-64" };
|
|
164
|
+
const __default__$4 = {
|
|
165
|
+
inheritAttrs: false
|
|
166
|
+
};
|
|
167
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$4), {
|
|
168
|
+
props: {
|
|
169
|
+
container: { default: "body" },
|
|
170
|
+
position: { default: "top-right" }
|
|
171
|
+
},
|
|
172
|
+
setup(__props) {
|
|
173
|
+
return (_ctx, _cache) => {
|
|
174
|
+
const _component_icon = resolveComponent("icon");
|
|
175
|
+
return openBlock(), createBlock(Teleport, { to: __props.container }, [
|
|
176
|
+
createElementVNode("div", {
|
|
177
|
+
class: normalizeClass(["cl-fixed cl-w-80 cl-z-40", {
|
|
178
|
+
"cl-top-5 cl-left-5": __props.position === "top-left",
|
|
179
|
+
"cl-top-5 cl-left-1/2": __props.position === "top-centre",
|
|
180
|
+
"cl-top-5 cl-right-5": __props.position === "top-right",
|
|
181
|
+
"cl-bottom-5 cl-left-5": __props.position === "bottom-left",
|
|
182
|
+
"cl-bottom-5 cl-left-1/2": __props.position === "bottom-centre",
|
|
183
|
+
"cl-bottom-5 cl-right-5": __props.position === "bottom-right"
|
|
184
|
+
}])
|
|
185
|
+
}, [
|
|
186
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(notifications), (notification, index) => {
|
|
187
|
+
return openBlock(), createElementBlock("div", mergeProps(_ctx.$attrs, {
|
|
188
|
+
key: index,
|
|
189
|
+
class: ["cl-break-words cl-cursor-pointer cl-flex cl-font-semibold cl-group cl-mb-2 cl-overflow-hidden cl-p-4 cl-rounded cl-shadow-lg cl-text-sm", {
|
|
190
|
+
"cl-bg-white": notification.colour === "default",
|
|
191
|
+
"cl-bg-primary-default": notification.colour === "primary",
|
|
192
|
+
"cl-bg-secondary-default": notification.colour === "secondary",
|
|
193
|
+
"cl-bg-danger-default": notification.colour === "danger",
|
|
194
|
+
"cl-bg-warning-default": notification.colour === "warning"
|
|
195
|
+
}],
|
|
196
|
+
onClick: ($event) => unref(removeNotification)(notification)
|
|
197
|
+
}), [
|
|
198
|
+
createElementVNode("span", _hoisted_2$m, toDisplayString(notification.message), 1),
|
|
199
|
+
createVNode(_component_icon, {
|
|
200
|
+
class: "cl-inline-block cl-opacity-0 cl-transition-opacity group-hover:cl-opacity-100",
|
|
201
|
+
icon: "ph:x",
|
|
202
|
+
size: 16,
|
|
203
|
+
weight: "bold"
|
|
204
|
+
})
|
|
205
|
+
], 16, _hoisted_1$r);
|
|
206
|
+
}), 128))
|
|
207
|
+
], 2)
|
|
208
|
+
], 8, ["to"]);
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
}));
|
|
212
|
+
const _hoisted_1$q = { class: "cl-absolute cl-flex cl-flex-wrap cl-h-screen cl-max-h-screen cl-max-w-full cl-min-h-screen cl-min-w-full cl-w-full" };
|
|
213
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
214
|
+
props: {
|
|
215
|
+
removePadding: { type: Boolean, default: false }
|
|
216
|
+
},
|
|
217
|
+
setup(__props) {
|
|
218
|
+
return (_ctx, _cache) => {
|
|
219
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
220
|
+
createVNode(_sfc_main$s),
|
|
221
|
+
createElementVNode("div", _hoisted_1$q, [
|
|
222
|
+
renderSlot(_ctx.$slots, "header"),
|
|
223
|
+
createElementVNode("div", {
|
|
224
|
+
class: normalizeClass(["cl-content-start cl-flex cl-flex-nowrap cl-items-stretch cl-max-h-screen cl-relative cl-w-full", {
|
|
225
|
+
"cl-pt-20": _ctx.$slots.header
|
|
226
|
+
}])
|
|
227
|
+
}, [
|
|
228
|
+
renderSlot(_ctx.$slots, "navigation"),
|
|
229
|
+
createElementVNode("div", {
|
|
230
|
+
class: normalizeClass(["cl-grow cl-max-h-full cl-overflow-x-hidden cl-overflow-y-auto cl-w-auto", {
|
|
231
|
+
"md:cl-p-8 cl-p-2": !__props.removePadding
|
|
232
|
+
}])
|
|
233
|
+
}, [
|
|
234
|
+
renderSlot(_ctx.$slots, "default")
|
|
235
|
+
], 2)
|
|
236
|
+
], 2)
|
|
237
|
+
])
|
|
238
|
+
], 64);
|
|
239
|
+
};
|
|
183
240
|
}
|
|
184
|
-
|
|
241
|
+
});
|
|
242
|
+
var clUiLoadingSpinner_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
243
|
+
const _sfc_main$q = {};
|
|
244
|
+
const _hoisted_1$p = { class: "loading-spinner" };
|
|
245
|
+
function _sfc_render$4(_ctx, _cache) {
|
|
246
|
+
return openBlock(), createElementBlock("div", _hoisted_1$p);
|
|
185
247
|
}
|
|
248
|
+
var ClUiLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$4], ["__scopeId", "data-v-60d7cfd0"]]);
|
|
249
|
+
const _hoisted_1$o = ["disabled"];
|
|
250
|
+
const __default__$3 = {
|
|
251
|
+
inheritAttrs: false
|
|
252
|
+
};
|
|
253
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$3), {
|
|
254
|
+
props: {
|
|
255
|
+
colour: { default: "default" },
|
|
256
|
+
size: { default: "medium" },
|
|
257
|
+
loading: { type: Boolean, default: false },
|
|
258
|
+
disabled: { type: Boolean, default: false }
|
|
259
|
+
},
|
|
260
|
+
setup(__props) {
|
|
261
|
+
return (_ctx, _cache) => {
|
|
262
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
263
|
+
withDirectives(createVNode(ClUiLoadingSpinner, { class: "cl-absolute" }, null, 512), [
|
|
264
|
+
[vShow, __props.loading]
|
|
265
|
+
]),
|
|
266
|
+
withDirectives(createElementVNode("button", mergeProps(_ctx.$attrs, {
|
|
267
|
+
class: ["cl-align-middle cl-border cl-font-semibold cl-inline-block cl-overflow-visible cl-rounded cl-select-none cl-shadow cl-text-center cl-transition-colors", {
|
|
268
|
+
"cl-leading-8 cl-px-4 cl-text-sm": __props.size === "small",
|
|
269
|
+
"cl-leading-10 cl-px-8 cl-text-sm": __props.size === "medium",
|
|
270
|
+
"cl-leading-10 cl-px-10 cl-py-2": __props.size === "large",
|
|
271
|
+
"cl-bg-white cl-border-grey-0 hover:cl-border-grey-2 cl-text-secondary": __props.colour === "default",
|
|
272
|
+
"cl-border-primary-default cl-bg-primary-default cl-text-white hover:cl-bg-primary-light hover:cl-border-primary-light": __props.colour === "primary",
|
|
273
|
+
"cl-border-secondary-default cl-bg-secondary-default cl-text-white hover:cl-bg-secondary-light hover:cl-border-secondary-light": __props.colour === "secondary",
|
|
274
|
+
"cl-border-danger-default cl-bg-danger-default cl-text-white hover:cl-bg-danger-dark hover:cl-border-danger-dark": __props.colour === "danger",
|
|
275
|
+
"cl-border-link-default cl-bg-link-default cl-text-white hover:cl-bg-link-light hover:cl-border-link-light": __props.colour === "blue",
|
|
276
|
+
"!cl-border-grey-3 !cl-bg-grey-3 cl-text-grey-0 hover:!cl-bg-grey-3 hover:!cl-border-grey-3 cl-cursor-default": __props.disabled
|
|
277
|
+
}],
|
|
278
|
+
disabled: __props.disabled
|
|
279
|
+
}), [
|
|
280
|
+
renderSlot(_ctx.$slots, "default")
|
|
281
|
+
], 16, _hoisted_1$o), [
|
|
282
|
+
[vShow, !__props.loading]
|
|
283
|
+
])
|
|
284
|
+
], 64);
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
}));
|
|
288
|
+
const buttonColours = [
|
|
289
|
+
"default",
|
|
290
|
+
"primary",
|
|
291
|
+
"secondary",
|
|
292
|
+
"danger",
|
|
293
|
+
"blue"
|
|
294
|
+
];
|
|
295
|
+
const buttonSizes = [
|
|
296
|
+
"small",
|
|
297
|
+
"medium",
|
|
298
|
+
"large"
|
|
299
|
+
];
|
|
300
|
+
const _hoisted_1$n = { key: 0 };
|
|
301
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
302
|
+
props: {
|
|
303
|
+
size: { default: "medium" },
|
|
304
|
+
hover: { type: Boolean, default: false }
|
|
305
|
+
},
|
|
306
|
+
setup(__props) {
|
|
307
|
+
return (_ctx, _cache) => {
|
|
308
|
+
return openBlock(), createElementBlock("div", {
|
|
309
|
+
class: normalizeClass(["cl-border cl-border-transparent cl-overflow-hidden cl-relative cl-rounded-md cl-shadow-lg cl-transition-all", {
|
|
310
|
+
"cl-cursor-pointer hover:cl-shadow-xl hover:cl-border-grey-0": __props.hover
|
|
311
|
+
}])
|
|
312
|
+
}, [
|
|
313
|
+
_ctx.$slots.image ? (openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
314
|
+
renderSlot(_ctx.$slots, "image")
|
|
315
|
+
])) : createCommentVNode("", true),
|
|
316
|
+
_ctx.$slots.title ? (openBlock(), createElementBlock("div", {
|
|
317
|
+
key: 1,
|
|
318
|
+
class: normalizeClass(["cl-border-grey-2 cl-font-normal", {
|
|
319
|
+
"cl-p-2 cl-text-2xl cl-leading-8": __props.size === "small",
|
|
320
|
+
"cl-p-4 cl-text-3xl cl-leading-9": __props.size === "medium",
|
|
321
|
+
"cl-p-6 cl-text-4xl cl-leading-10": __props.size === "large",
|
|
322
|
+
"cl-border-t": _ctx.$slots.image
|
|
323
|
+
}])
|
|
324
|
+
}, [
|
|
325
|
+
renderSlot(_ctx.$slots, "title")
|
|
326
|
+
], 2)) : createCommentVNode("", true),
|
|
327
|
+
createElementVNode("div", {
|
|
328
|
+
class: normalizeClass(["cl-border-grey-2", {
|
|
329
|
+
"cl-p-2": __props.size === "small",
|
|
330
|
+
"cl-p-4": __props.size === "medium",
|
|
331
|
+
"cl-p-6": __props.size === "large",
|
|
332
|
+
"cl-border-t": _ctx.$slots.image || _ctx.$slots.title
|
|
333
|
+
}])
|
|
334
|
+
}, [
|
|
335
|
+
renderSlot(_ctx.$slots, "default")
|
|
336
|
+
], 2),
|
|
337
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
|
|
338
|
+
key: 2,
|
|
339
|
+
class: normalizeClass(["cl-border-grey-2 cl-border-t", {
|
|
340
|
+
"cl-p-2": __props.size === "small",
|
|
341
|
+
"cl-p-4": __props.size === "medium",
|
|
342
|
+
"cl-p-6": __props.size === "large"
|
|
343
|
+
}])
|
|
344
|
+
}, [
|
|
345
|
+
renderSlot(_ctx.$slots, "footer")
|
|
346
|
+
], 2)) : createCommentVNode("", true)
|
|
347
|
+
], 2);
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
const cardSizes = [
|
|
352
|
+
"small",
|
|
353
|
+
"medium",
|
|
354
|
+
"large"
|
|
355
|
+
];
|
|
186
356
|
var NumberFormat;
|
|
187
357
|
(function(NumberFormat2) {
|
|
188
358
|
NumberFormat2["CURRENCY"] = "currency";
|
|
@@ -408,12 +578,12 @@ function validateMinValue(minimumValue, typeOfValue, valueName, actualValue) {
|
|
|
408
578
|
break;
|
|
409
579
|
case "datetime":
|
|
410
580
|
isValid = actualValue >= new Date(minimumValue).getTime();
|
|
411
|
-
validatedState = getValidatedInputState(isValid, t("input.afterOrEqualToValue", { label: valueName, min: new Date(minimumValue).
|
|
581
|
+
validatedState = getValidatedInputState(isValid, t("input.afterOrEqualToValue", { label: valueName, min: i18n.global.d(new Date(minimumValue), DateFormat.DATETIME, locale != null ? locale : i18n.global.locale.value) }));
|
|
412
582
|
break;
|
|
413
583
|
case "time":
|
|
414
584
|
timeValue = minimumValue.toDateFromTime();
|
|
415
585
|
isValid = actualValue >= timeValue;
|
|
416
|
-
validatedState = getValidatedInputState(isValid, t("input.afterOrEqualToValue", { label: valueName, min: new Date(timeValue).
|
|
586
|
+
validatedState = getValidatedInputState(isValid, t("input.afterOrEqualToValue", { label: valueName, min: i18n.global.d(new Date(timeValue), DateFormat.TIME, locale != null ? locale : i18n.global.locale.value) }));
|
|
417
587
|
break;
|
|
418
588
|
default:
|
|
419
589
|
validatedState.valid = true;
|
|
@@ -458,12 +628,12 @@ function validateMaxValue(maximumValue, typeOfValue, valueName, actualValue) {
|
|
|
458
628
|
break;
|
|
459
629
|
case "datetime":
|
|
460
630
|
isValid = actualValue <= new Date(maximumValue).getTime();
|
|
461
|
-
validatedState = getValidatedInputState(isValid, t("input.
|
|
631
|
+
validatedState = getValidatedInputState(isValid, t("input.afterOrEqualToValue", { label: valueName, min: i18n.global.d(new Date(maximumValue), DateFormat.DATETIME, locale != null ? locale : i18n.global.locale.value) }));
|
|
462
632
|
break;
|
|
463
633
|
case "time":
|
|
464
634
|
timeValue = maximumValue.toDateFromTime();
|
|
465
635
|
isValid = actualValue <= timeValue;
|
|
466
|
-
validatedState = getValidatedInputState(isValid, t("input.
|
|
636
|
+
validatedState = getValidatedInputState(isValid, t("input.afterOrEqualToValue", { label: valueName, min: i18n.global.d(new Date(timeValue), DateFormat.TIME, locale != null ? locale : i18n.global.locale.value) }));
|
|
467
637
|
break;
|
|
468
638
|
default:
|
|
469
639
|
validatedState.valid = true;
|
|
@@ -495,213 +665,6 @@ function getValidatedInputState(validationCheck, message) {
|
|
|
495
665
|
};
|
|
496
666
|
return validation;
|
|
497
667
|
}
|
|
498
|
-
const notifications = ref([]);
|
|
499
|
-
function showNotification(notification) {
|
|
500
|
-
const newNotification = __spreadValues({
|
|
501
|
-
id: generateStringId()
|
|
502
|
-
}, notification);
|
|
503
|
-
notifications.value.push(newNotification);
|
|
504
|
-
setTimeout(() => removeNotification(newNotification), notification.duration);
|
|
505
|
-
}
|
|
506
|
-
function removeNotification(notification) {
|
|
507
|
-
notifications.value = notifications.value.filter((n) => n.id !== notification.id);
|
|
508
|
-
}
|
|
509
|
-
const _hoisted_1$r = ["onClick"];
|
|
510
|
-
const _hoisted_2$m = { class: "cl-flex-1 cl-overflow-ellipsis cl-select-none cl-w-64" };
|
|
511
|
-
const __default__$4 = {
|
|
512
|
-
inheritAttrs: false
|
|
513
|
-
};
|
|
514
|
-
function setup$4(__props) {
|
|
515
|
-
return (_ctx, _cache) => {
|
|
516
|
-
const _component_icon = resolveComponent("icon");
|
|
517
|
-
return openBlock(), createBlock(Teleport, { to: __props.container }, [
|
|
518
|
-
createElementVNode("div", {
|
|
519
|
-
class: normalizeClass(["cl-fixed cl-w-80 cl-z-40", {
|
|
520
|
-
"cl-top-5 cl-left-5": __props.position === "top-left",
|
|
521
|
-
"cl-top-5 cl-left-1/2": __props.position === "top-centre",
|
|
522
|
-
"cl-top-5 cl-right-5": __props.position === "top-right",
|
|
523
|
-
"cl-bottom-5 cl-left-5": __props.position === "bottom-left",
|
|
524
|
-
"cl-bottom-5 cl-left-1/2": __props.position === "bottom-centre",
|
|
525
|
-
"cl-bottom-5 cl-right-5": __props.position === "bottom-right"
|
|
526
|
-
}])
|
|
527
|
-
}, [
|
|
528
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(notifications), (notification, index) => {
|
|
529
|
-
return openBlock(), createElementBlock("div", mergeProps(_ctx.$attrs, {
|
|
530
|
-
key: index,
|
|
531
|
-
class: ["cl-break-words cl-cursor-pointer cl-flex cl-font-semibold cl-group cl-mb-2 cl-overflow-hidden cl-p-4 cl-rounded cl-shadow-lg cl-text-sm", {
|
|
532
|
-
"cl-bg-white": notification.colour === "default",
|
|
533
|
-
"cl-bg-primary-default": notification.colour === "primary",
|
|
534
|
-
"cl-bg-secondary-default": notification.colour === "secondary",
|
|
535
|
-
"cl-bg-danger-default": notification.colour === "danger",
|
|
536
|
-
"cl-bg-warning-default": notification.colour === "warning"
|
|
537
|
-
}],
|
|
538
|
-
onClick: ($event) => unref(removeNotification)(notification)
|
|
539
|
-
}), [
|
|
540
|
-
createElementVNode("span", _hoisted_2$m, toDisplayString(notification.message), 1),
|
|
541
|
-
createVNode(_component_icon, {
|
|
542
|
-
class: "cl-inline-block cl-opacity-0 cl-transition-opacity group-hover:cl-opacity-100",
|
|
543
|
-
icon: "ph:x",
|
|
544
|
-
size: 16,
|
|
545
|
-
weight: "bold"
|
|
546
|
-
})
|
|
547
|
-
], 16, _hoisted_1$r);
|
|
548
|
-
}), 128))
|
|
549
|
-
], 2)
|
|
550
|
-
], 8, ["to"]);
|
|
551
|
-
};
|
|
552
|
-
}
|
|
553
|
-
const _sfc_main$s = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$4), {
|
|
554
|
-
props: {
|
|
555
|
-
container: { default: "body" },
|
|
556
|
-
position: { default: "top-right" }
|
|
557
|
-
},
|
|
558
|
-
setup: setup$4
|
|
559
|
-
}));
|
|
560
|
-
const _hoisted_1$q = { class: "cl-absolute cl-flex cl-flex-wrap cl-h-screen cl-max-h-screen cl-max-w-full cl-min-h-screen cl-min-w-full cl-w-full" };
|
|
561
|
-
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
562
|
-
props: {
|
|
563
|
-
removePadding: { type: Boolean, default: false }
|
|
564
|
-
},
|
|
565
|
-
setup(__props) {
|
|
566
|
-
return (_ctx, _cache) => {
|
|
567
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
568
|
-
createVNode(_sfc_main$s),
|
|
569
|
-
createElementVNode("div", _hoisted_1$q, [
|
|
570
|
-
renderSlot(_ctx.$slots, "header"),
|
|
571
|
-
createElementVNode("div", {
|
|
572
|
-
class: normalizeClass(["cl-content-start cl-flex cl-flex-nowrap cl-items-stretch cl-max-h-screen cl-relative cl-w-full", {
|
|
573
|
-
"cl-pt-20": _ctx.$slots.header
|
|
574
|
-
}])
|
|
575
|
-
}, [
|
|
576
|
-
renderSlot(_ctx.$slots, "navigation"),
|
|
577
|
-
createElementVNode("div", {
|
|
578
|
-
class: normalizeClass(["cl-flex-grow cl-max-h-full cl-overflow-x-hidden cl-overflow-y-auto cl-w-auto", {
|
|
579
|
-
"md:cl-p-8 cl-p-2": !__props.removePadding
|
|
580
|
-
}])
|
|
581
|
-
}, [
|
|
582
|
-
renderSlot(_ctx.$slots, "default")
|
|
583
|
-
], 2)
|
|
584
|
-
], 2)
|
|
585
|
-
])
|
|
586
|
-
], 64);
|
|
587
|
-
};
|
|
588
|
-
}
|
|
589
|
-
});
|
|
590
|
-
var clUiLoadingSpinner_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
591
|
-
const _sfc_main$q = {};
|
|
592
|
-
const _hoisted_1$p = { class: "loading-spinner" };
|
|
593
|
-
function _sfc_render$4(_ctx, _cache) {
|
|
594
|
-
return openBlock(), createElementBlock("div", _hoisted_1$p);
|
|
595
|
-
}
|
|
596
|
-
var ClUiLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$4], ["__scopeId", "data-v-60d7cfd0"]]);
|
|
597
|
-
const _hoisted_1$o = ["disabled"];
|
|
598
|
-
const __default__$3 = {
|
|
599
|
-
inheritAttrs: false
|
|
600
|
-
};
|
|
601
|
-
function setup$3(__props) {
|
|
602
|
-
return (_ctx, _cache) => {
|
|
603
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
604
|
-
withDirectives(createVNode(ClUiLoadingSpinner, { class: "cl-absolute" }, null, 512), [
|
|
605
|
-
[vShow, __props.loading]
|
|
606
|
-
]),
|
|
607
|
-
withDirectives(createElementVNode("button", mergeProps(_ctx.$attrs, {
|
|
608
|
-
class: ["cl-align-middle cl-border cl-font-semibold cl-inline-block cl-overflow-visible cl-rounded cl-select-none cl-shadow cl-text-center cl-transition-colors", {
|
|
609
|
-
"cl-leading-8 cl-px-4 cl-text-sm": __props.size === "small",
|
|
610
|
-
"cl-leading-10 cl-px-8 cl-text-sm": __props.size === "medium",
|
|
611
|
-
"cl-leading-10 cl-px-10 cl-py-2": __props.size === "large",
|
|
612
|
-
"cl-bg-white cl-border-grey-0 hover:cl-border-grey-2 cl-text-secondary": __props.colour === "default",
|
|
613
|
-
"cl-border-primary-default cl-bg-primary-default cl-text-white hover:cl-bg-primary-light hover:cl-border-primary-light": __props.colour === "primary",
|
|
614
|
-
"cl-border-secondary-default cl-bg-secondary-default cl-text-white hover:cl-bg-secondary-light hover:cl-border-secondary-light": __props.colour === "secondary",
|
|
615
|
-
"cl-border-danger-default cl-bg-danger-default cl-text-white hover:cl-bg-danger-dark hover:cl-border-danger-dark": __props.colour === "danger",
|
|
616
|
-
"cl-border-link-default cl-bg-link-default cl-text-white hover:cl-bg-link-light hover:cl-border-link-light": __props.colour === "blue",
|
|
617
|
-
"!cl-border-grey-3 !cl-bg-grey-3 cl-text-grey-0 hover:!cl-bg-grey-3 hover:!cl-border-grey-3 cl-cursor-default": __props.disabled
|
|
618
|
-
}],
|
|
619
|
-
disabled: __props.disabled
|
|
620
|
-
}), [
|
|
621
|
-
renderSlot(_ctx.$slots, "default")
|
|
622
|
-
], 16, _hoisted_1$o), [
|
|
623
|
-
[vShow, !__props.loading]
|
|
624
|
-
])
|
|
625
|
-
], 64);
|
|
626
|
-
};
|
|
627
|
-
}
|
|
628
|
-
const _sfc_main$p = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$3), {
|
|
629
|
-
props: {
|
|
630
|
-
colour: { default: "default" },
|
|
631
|
-
size: { default: "medium" },
|
|
632
|
-
loading: { type: Boolean, default: false },
|
|
633
|
-
disabled: { type: Boolean, default: false }
|
|
634
|
-
},
|
|
635
|
-
setup: setup$3
|
|
636
|
-
}));
|
|
637
|
-
const buttonColours = [
|
|
638
|
-
"default",
|
|
639
|
-
"primary",
|
|
640
|
-
"secondary",
|
|
641
|
-
"danger",
|
|
642
|
-
"blue"
|
|
643
|
-
];
|
|
644
|
-
const buttonSizes = [
|
|
645
|
-
"small",
|
|
646
|
-
"medium",
|
|
647
|
-
"large"
|
|
648
|
-
];
|
|
649
|
-
const _hoisted_1$n = { key: 0 };
|
|
650
|
-
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
651
|
-
props: {
|
|
652
|
-
size: { default: "medium" },
|
|
653
|
-
hover: { type: Boolean, default: false }
|
|
654
|
-
},
|
|
655
|
-
setup(__props) {
|
|
656
|
-
return (_ctx, _cache) => {
|
|
657
|
-
return openBlock(), createElementBlock("div", {
|
|
658
|
-
class: normalizeClass(["cl-border cl-border-transparent cl-overflow-hidden cl-relative cl-rounded-md cl-shadow-lg cl-transition-all", {
|
|
659
|
-
"cl-cursor-pointer hover:cl-shadow-xl hover:cl-border-grey-0": __props.hover
|
|
660
|
-
}])
|
|
661
|
-
}, [
|
|
662
|
-
_ctx.$slots.image ? (openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
663
|
-
renderSlot(_ctx.$slots, "image")
|
|
664
|
-
])) : createCommentVNode("", true),
|
|
665
|
-
_ctx.$slots.title ? (openBlock(), createElementBlock("div", {
|
|
666
|
-
key: 1,
|
|
667
|
-
class: normalizeClass(["cl-border-grey-2 cl-font-normal", {
|
|
668
|
-
"cl-p-2 cl-text-2xl cl-leading-8": __props.size === "small",
|
|
669
|
-
"cl-p-4 cl-text-3xl cl-leading-9": __props.size === "medium",
|
|
670
|
-
"cl-p-6 cl-text-4xl cl-leading-10": __props.size === "large",
|
|
671
|
-
"cl-border-t": _ctx.$slots.image
|
|
672
|
-
}])
|
|
673
|
-
}, [
|
|
674
|
-
renderSlot(_ctx.$slots, "title")
|
|
675
|
-
], 2)) : createCommentVNode("", true),
|
|
676
|
-
createElementVNode("div", {
|
|
677
|
-
class: normalizeClass(["cl-border-grey-2", {
|
|
678
|
-
"cl-p-2": __props.size === "small",
|
|
679
|
-
"cl-p-4": __props.size === "medium",
|
|
680
|
-
"cl-p-6": __props.size === "large",
|
|
681
|
-
"cl-border-t": _ctx.$slots.image || _ctx.$slots.title
|
|
682
|
-
}])
|
|
683
|
-
}, [
|
|
684
|
-
renderSlot(_ctx.$slots, "default")
|
|
685
|
-
], 2),
|
|
686
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
|
|
687
|
-
key: 2,
|
|
688
|
-
class: normalizeClass(["cl-border-grey-2 cl-border-t", {
|
|
689
|
-
"cl-p-2": __props.size === "small",
|
|
690
|
-
"cl-p-4": __props.size === "medium",
|
|
691
|
-
"cl-p-6": __props.size === "large"
|
|
692
|
-
}])
|
|
693
|
-
}, [
|
|
694
|
-
renderSlot(_ctx.$slots, "footer")
|
|
695
|
-
], 2)) : createCommentVNode("", true)
|
|
696
|
-
], 2);
|
|
697
|
-
};
|
|
698
|
-
}
|
|
699
|
-
});
|
|
700
|
-
const cardSizes = [
|
|
701
|
-
"small",
|
|
702
|
-
"medium",
|
|
703
|
-
"large"
|
|
704
|
-
];
|
|
705
668
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
706
669
|
var de = { exports: {} };
|
|
707
670
|
(function(module, exports) {
|
|
@@ -1195,7 +1158,7 @@ const _hoisted_1$m = ["placeholder", "disabled"];
|
|
|
1195
1158
|
const _hoisted_2$l = { class: "cl-absolute cl-bg-white cl-flex cl-right-2 cl-text-grey-4 cl-top-3.5" };
|
|
1196
1159
|
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
1197
1160
|
props: {
|
|
1198
|
-
date: { default:
|
|
1161
|
+
date: { default: null },
|
|
1199
1162
|
datePlaceholder: { default: "Select date." },
|
|
1200
1163
|
dateTimePlaceholder: { default: "Select date & time." },
|
|
1201
1164
|
timePlaceholder: { default: "Select time." },
|
|
@@ -1372,10 +1335,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1372
1335
|
const _component_icon = resolveComponent("icon");
|
|
1373
1336
|
return openBlock(), createElementBlock("div", mergeProps(_ctx.$attrs, { class: "cl-relative" }), [
|
|
1374
1337
|
createElementVNode("input", mergeProps({
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
element.value = _value;
|
|
1378
|
-
}
|
|
1338
|
+
ref_key: "element",
|
|
1339
|
+
ref: element
|
|
1379
1340
|
}, _ctx.$attrs, {
|
|
1380
1341
|
class: ["!cl-text-sm cl-border-grey-1 cl-rounded-lg focus:cl-border-blue-light focus:cl-ring-0", { "cl-bg-off-white": __props.disabled }],
|
|
1381
1342
|
type: "text",
|
|
@@ -1506,7 +1467,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1506
1467
|
max: __props.max,
|
|
1507
1468
|
step: __props.step,
|
|
1508
1469
|
disabled: __props.disabled,
|
|
1509
|
-
onInput: _cache[1] || (_cache[1] = ($event) => unref(debounce)(updateCurrentValue,
|
|
1470
|
+
onInput: _cache[1] || (_cache[1] = ($event) => unref(debounce)(updateCurrentValue, $event.target, _ctx.$forceUpdate))
|
|
1510
1471
|
}, null, 8, ["modelValue", "min", "max", "step", "disabled"]), [
|
|
1511
1472
|
[vShow, __props.showNumericInput]
|
|
1512
1473
|
]),
|
|
@@ -1540,7 +1501,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1540
1501
|
};
|
|
1541
1502
|
}
|
|
1542
1503
|
});
|
|
1543
|
-
var clUiSlider = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-
|
|
1504
|
+
var clUiSlider = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-26895858"]]);
|
|
1544
1505
|
function isInputText(type) {
|
|
1545
1506
|
let isText = false;
|
|
1546
1507
|
switch (type) {
|
|
@@ -1824,10 +1785,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1824
1785
|
]),
|
|
1825
1786
|
__props.inputType !== "range" && !unref(isInputCalendarSupportedDate)(__props.inputType) ? withDirectives((openBlock(), createElementBlock("input", mergeProps({
|
|
1826
1787
|
key: 0,
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
inputElement.value = _value;
|
|
1830
|
-
},
|
|
1788
|
+
ref_key: "inputElement",
|
|
1789
|
+
ref: inputElement,
|
|
1831
1790
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(currentValue) ? currentValue.value = $event : null)
|
|
1832
1791
|
}, _ctx.$attrs, {
|
|
1833
1792
|
class: ["cl-block cl-border cl-duration-300 cl-h-full cl-mb-1 cl-transition cl-w-full focus:cl-outline-none", {
|
|
@@ -1861,10 +1820,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1861
1820
|
[vModelDynamic, unref(currentValue)]
|
|
1862
1821
|
]) : createCommentVNode("", true),
|
|
1863
1822
|
unref(isInputCalendarSupportedDate)(__props.inputType) ? (openBlock(), createBlock(unref(_sfc_main$n), mergeProps({ key: 1 }, _ctx.$attrs, {
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
inputElement.value = _value;
|
|
1867
|
-
},
|
|
1823
|
+
ref_key: "inputElement",
|
|
1824
|
+
ref: inputElement,
|
|
1868
1825
|
date: unref(currentDateValue),
|
|
1869
1826
|
"onUpdate:date": _cache[4] || (_cache[4] = ($event) => isRef(currentDateValue) ? currentDateValue.value = $event : null),
|
|
1870
1827
|
class: ["cl-block cl-duration-300 cl-h-fit cl-mb-1 cl-rounded-lg cl-text-sm cl-transition cl-w-full focus:cl-outline-none", {
|
|
@@ -1913,10 +1870,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1913
1870
|
]),
|
|
1914
1871
|
__props.inputType === "range" && typeof unref(currentValue) === "number" ? (openBlock(), createElementBlock("div", _hoisted_8$5, [
|
|
1915
1872
|
createVNode(unref(clUiSlider), {
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
inputElement.value = _value;
|
|
1919
|
-
},
|
|
1873
|
+
ref_key: "inputElement",
|
|
1874
|
+
ref: inputElement,
|
|
1920
1875
|
value: unref(currentValue),
|
|
1921
1876
|
"onUpdate:value": _cache[8] || (_cache[8] = ($event) => isRef(currentValue) ? currentValue.value = $event : null),
|
|
1922
1877
|
min: unref(minAsNumber),
|
|
@@ -1935,91 +1890,90 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1935
1890
|
};
|
|
1936
1891
|
}
|
|
1937
1892
|
});
|
|
1938
|
-
var ClUiInput = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-
|
|
1893
|
+
var ClUiInput = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-438103cc"]]);
|
|
1939
1894
|
const _hoisted_1$j = { class: "cl-align-items-center cl-bg-black cl-bg-opacity-40 cl-bottom-0 cl-fixed cl-flex cl-h-screen cl-justify-center cl-left-0 cl-right-0 cl-top-0 cl-w-full cl-z-40" };
|
|
1940
1895
|
const _hoisted_2$i = ["onKeypress"];
|
|
1941
1896
|
const _hoisted_3$e = { class: "cl-overflow-y-auto cl-p-2 cl-w-full" };
|
|
1942
1897
|
const __default__$2 = {
|
|
1943
1898
|
inheritAttrs: false
|
|
1944
1899
|
};
|
|
1945
|
-
function setup$2(__props) {
|
|
1946
|
-
const props = __props;
|
|
1947
|
-
const visible = ref(false);
|
|
1948
|
-
function open() {
|
|
1949
|
-
visible.value = true;
|
|
1950
|
-
document.addEventListener("keydown", closeOnKeyPress);
|
|
1951
|
-
}
|
|
1952
|
-
function close() {
|
|
1953
|
-
if (!props.preventClose) {
|
|
1954
|
-
visible.value = false;
|
|
1955
|
-
document.removeEventListener("keydown", closeOnKeyPress);
|
|
1956
|
-
}
|
|
1957
|
-
}
|
|
1958
|
-
function closeOnKeyPress(event) {
|
|
1959
|
-
if (event.key === "Escape") {
|
|
1960
|
-
close();
|
|
1961
|
-
}
|
|
1962
|
-
}
|
|
1963
|
-
return (_ctx, _cache) => {
|
|
1964
|
-
const _component_icon = resolveComponent("icon");
|
|
1965
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
1966
|
-
renderSlot(_ctx.$slots, "trigger", normalizeProps(guardReactiveProps({ open }))),
|
|
1967
|
-
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
1968
|
-
createVNode(Transition, { name: "fade" }, {
|
|
1969
|
-
default: withCtx(() => [
|
|
1970
|
-
withDirectives(createElementVNode("div", _hoisted_1$j, [
|
|
1971
|
-
createElementVNode("div", mergeProps(_ctx.$attrs, {
|
|
1972
|
-
class: ["cl-bg-white cl-flex cl-flex-wrap cl-mx-0 cl-my-auto cl-overflow-y-auto cl-relative cl-rounded-lg cl-shadow-lg", {
|
|
1973
|
-
"lg:cl-w-2/12 cl-w-10/12": __props.size === "x-small",
|
|
1974
|
-
"cl-w-6/12": __props.size === "small",
|
|
1975
|
-
"cl-w-8/12": __props.size === "medium",
|
|
1976
|
-
"cl-w-10/12": __props.size === "large"
|
|
1977
|
-
}]
|
|
1978
|
-
}), [
|
|
1979
|
-
withDirectives(createElementVNode("div", {
|
|
1980
|
-
class: normalizeClass(["cl-absolute cl-cursor-pointer cl-right-4 cl-top-4 cl-transition-colors cl-w-3", {
|
|
1981
|
-
"cl-text-white hover:cl-text-off-white": __props.headerColour === "secondary" || __props.headerColour === "primary",
|
|
1982
|
-
"cl-text-black hover:cl-text-grey-7": __props.headerColour === "white"
|
|
1983
|
-
}]),
|
|
1984
|
-
tabindex: 0,
|
|
1985
|
-
onKeypress: withKeys(close, ["enter"]),
|
|
1986
|
-
onClick: close
|
|
1987
|
-
}, [
|
|
1988
|
-
createVNode(_component_icon, { icon: "ph:x" })
|
|
1989
|
-
], 42, _hoisted_2$i), [
|
|
1990
|
-
[vShow, !__props.preventClose]
|
|
1991
|
-
]),
|
|
1992
|
-
createElementVNode("div", {
|
|
1993
|
-
class: normalizeClass(["cl-leading-[2.75rem] cl-min-h-12 cl-overflow-hidden cl-pl-3 cl-pr-8 cl-text-2xl cl-w-full", {
|
|
1994
|
-
"cl-border-b cl-border-grey-2": __props.headerColour === "white",
|
|
1995
|
-
"cl-bg-secondary-default cl-text-white": __props.headerColour === "secondary",
|
|
1996
|
-
"cl-bg-primary-default cl-text-white": __props.headerColour === "primary"
|
|
1997
|
-
}])
|
|
1998
|
-
}, [
|
|
1999
|
-
renderSlot(_ctx.$slots, "title", normalizeProps(guardReactiveProps({ close })))
|
|
2000
|
-
], 2),
|
|
2001
|
-
createElementVNode("div", _hoisted_3$e, [
|
|
2002
|
-
renderSlot(_ctx.$slots, "default")
|
|
2003
|
-
]),
|
|
2004
|
-
renderSlot(_ctx.$slots, "footer", normalizeProps(guardReactiveProps({ close })))
|
|
2005
|
-
], 16)
|
|
2006
|
-
], 512), [
|
|
2007
|
-
[vShow, visible.value]
|
|
2008
|
-
])
|
|
2009
|
-
]),
|
|
2010
|
-
_: 3
|
|
2011
|
-
})
|
|
2012
|
-
]))
|
|
2013
|
-
], 64);
|
|
2014
|
-
};
|
|
2015
|
-
}
|
|
2016
1900
|
const _sfc_main$k = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$2), {
|
|
2017
1901
|
props: {
|
|
2018
1902
|
headerColour: { default: "white" },
|
|
2019
1903
|
preventClose: { type: Boolean, default: false },
|
|
2020
1904
|
size: { default: "medium" }
|
|
2021
1905
|
},
|
|
2022
|
-
setup
|
|
1906
|
+
setup(__props) {
|
|
1907
|
+
const props = __props;
|
|
1908
|
+
const visible = ref(false);
|
|
1909
|
+
function open() {
|
|
1910
|
+
visible.value = true;
|
|
1911
|
+
document.addEventListener("keydown", closeOnKeyPress);
|
|
1912
|
+
}
|
|
1913
|
+
function close() {
|
|
1914
|
+
if (!props.preventClose) {
|
|
1915
|
+
visible.value = false;
|
|
1916
|
+
document.removeEventListener("keydown", closeOnKeyPress);
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
function closeOnKeyPress(event) {
|
|
1920
|
+
if (event.key === "Escape") {
|
|
1921
|
+
close();
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
return (_ctx, _cache) => {
|
|
1925
|
+
const _component_icon = resolveComponent("icon");
|
|
1926
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
1927
|
+
renderSlot(_ctx.$slots, "trigger", normalizeProps(guardReactiveProps({ open }))),
|
|
1928
|
+
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
1929
|
+
createVNode(Transition, { name: "fade" }, {
|
|
1930
|
+
default: withCtx(() => [
|
|
1931
|
+
withDirectives(createElementVNode("div", _hoisted_1$j, [
|
|
1932
|
+
createElementVNode("div", mergeProps(_ctx.$attrs, {
|
|
1933
|
+
class: ["cl-bg-white cl-flex cl-flex-wrap cl-mx-0 cl-my-auto cl-overflow-y-auto cl-relative cl-rounded-lg cl-shadow-lg", {
|
|
1934
|
+
"lg:cl-w-2/12 cl-w-10/12": __props.size === "x-small",
|
|
1935
|
+
"cl-w-6/12": __props.size === "small",
|
|
1936
|
+
"cl-w-8/12": __props.size === "medium",
|
|
1937
|
+
"cl-w-10/12": __props.size === "large"
|
|
1938
|
+
}]
|
|
1939
|
+
}), [
|
|
1940
|
+
withDirectives(createElementVNode("div", {
|
|
1941
|
+
class: normalizeClass(["cl-absolute cl-cursor-pointer cl-right-4 cl-top-4 cl-transition-colors cl-w-3", {
|
|
1942
|
+
"cl-text-white hover:cl-text-off-white": __props.headerColour === "secondary" || __props.headerColour === "primary",
|
|
1943
|
+
"cl-text-black hover:cl-text-grey-7": __props.headerColour === "white"
|
|
1944
|
+
}]),
|
|
1945
|
+
tabindex: 0,
|
|
1946
|
+
onKeypress: withKeys(close, ["enter"]),
|
|
1947
|
+
onClick: close
|
|
1948
|
+
}, [
|
|
1949
|
+
createVNode(_component_icon, { icon: "ph:x" })
|
|
1950
|
+
], 42, _hoisted_2$i), [
|
|
1951
|
+
[vShow, !__props.preventClose]
|
|
1952
|
+
]),
|
|
1953
|
+
createElementVNode("div", {
|
|
1954
|
+
class: normalizeClass(["cl-leading-[2.75rem] cl-min-h-12 cl-overflow-hidden cl-pl-3 cl-pr-8 cl-text-2xl cl-w-full", {
|
|
1955
|
+
"cl-border-b cl-border-grey-2": __props.headerColour === "white",
|
|
1956
|
+
"cl-bg-secondary-default cl-text-white": __props.headerColour === "secondary",
|
|
1957
|
+
"cl-bg-primary-default cl-text-white": __props.headerColour === "primary"
|
|
1958
|
+
}])
|
|
1959
|
+
}, [
|
|
1960
|
+
renderSlot(_ctx.$slots, "title", normalizeProps(guardReactiveProps({ close })))
|
|
1961
|
+
], 2),
|
|
1962
|
+
createElementVNode("div", _hoisted_3$e, [
|
|
1963
|
+
renderSlot(_ctx.$slots, "default")
|
|
1964
|
+
]),
|
|
1965
|
+
renderSlot(_ctx.$slots, "footer", normalizeProps(guardReactiveProps({ close })))
|
|
1966
|
+
], 16)
|
|
1967
|
+
], 512), [
|
|
1968
|
+
[vShow, visible.value]
|
|
1969
|
+
])
|
|
1970
|
+
]),
|
|
1971
|
+
_: 3
|
|
1972
|
+
})
|
|
1973
|
+
]))
|
|
1974
|
+
], 64);
|
|
1975
|
+
};
|
|
1976
|
+
}
|
|
2023
1977
|
}));
|
|
2024
1978
|
const _hoisted_1$i = { class: "cl-bg-grey-2 cl-border-b cl-border-grey-2 cl-border-t cl-flex cl-p-1" };
|
|
2025
1979
|
const _hoisted_2$h = {
|
|
@@ -2071,7 +2025,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2071
2025
|
isCreateNewOption: { type: Boolean, default: false },
|
|
2072
2026
|
selectedIndex: { default: -1 },
|
|
2073
2027
|
text: { default: "" },
|
|
2074
|
-
option: { default:
|
|
2028
|
+
option: { default: null },
|
|
2075
2029
|
index: null
|
|
2076
2030
|
},
|
|
2077
2031
|
emits: {
|
|
@@ -2276,10 +2230,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2276
2230
|
var _a;
|
|
2277
2231
|
const _component_cl_ui_loading_spinner = resolveComponent("cl-ui-loading-spinner");
|
|
2278
2232
|
return openBlock(), createElementBlock("div", {
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
container.value = _value;
|
|
2282
|
-
},
|
|
2233
|
+
ref_key: "container",
|
|
2234
|
+
ref: container,
|
|
2283
2235
|
class: "cl-bg-white cl-border cl-border-collapse cl-border-grey-0 cl-h-52 cl-overflow-y-auto cl-p-2 cl-rounded cl-text-sm",
|
|
2284
2236
|
onKeydown: [
|
|
2285
2237
|
_cache[2] || (_cache[2] = withKeys(withModifiers(($event) => onKeyboardArrowUp(unref(firstIndexInResults)), ["prevent", "stop"]), ["up"])),
|
|
@@ -2361,8 +2313,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2361
2313
|
canCreateNewObject: { type: Boolean, default: false },
|
|
2362
2314
|
canClearSelectedObject: { type: Boolean, default: true },
|
|
2363
2315
|
errorMessage: { default: "" },
|
|
2364
|
-
objectCreatedResponse: { default:
|
|
2365
|
-
parentObjectCreatedResponse: { default:
|
|
2316
|
+
objectCreatedResponse: { default: null },
|
|
2317
|
+
parentObjectCreatedResponse: { default: null },
|
|
2366
2318
|
results: { default: () => [] },
|
|
2367
2319
|
parentResults: { default: () => [] },
|
|
2368
2320
|
currentObject: null
|
|
@@ -2680,95 +2632,173 @@ const _hoisted_4$8 = {
|
|
|
2680
2632
|
const __default__$1 = {
|
|
2681
2633
|
inheritAttrs: false
|
|
2682
2634
|
};
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
}
|
|
2694
|
-
|
|
2695
|
-
|
|
2635
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$1), {
|
|
2636
|
+
props: {
|
|
2637
|
+
column: null,
|
|
2638
|
+
record: null,
|
|
2639
|
+
editMode: { type: Boolean, default: false }
|
|
2640
|
+
},
|
|
2641
|
+
emits: {
|
|
2642
|
+
edit: null,
|
|
2643
|
+
focus: null,
|
|
2644
|
+
"undo-edit": null
|
|
2645
|
+
},
|
|
2646
|
+
setup(__props, { emit }) {
|
|
2647
|
+
const props = __props;
|
|
2648
|
+
const { d, n } = useI18n();
|
|
2649
|
+
const currentRecord = ref(copy(props.record));
|
|
2650
|
+
const edited = computed(() => {
|
|
2651
|
+
var _a, _b;
|
|
2652
|
+
return currentRecord.value[(_a = props.column.field) != null ? _a : ""] !== props.record[(_b = props.column.field) != null ? _b : ""];
|
|
2653
|
+
});
|
|
2654
|
+
function getStringValue(record, key) {
|
|
2655
|
+
return record[key];
|
|
2656
|
+
}
|
|
2657
|
+
function getNumericValue(record, key) {
|
|
2658
|
+
return record[key];
|
|
2659
|
+
}
|
|
2660
|
+
function getBooleanValue(record, key) {
|
|
2661
|
+
return record[key];
|
|
2662
|
+
}
|
|
2663
|
+
function cellFocused() {
|
|
2664
|
+
emit("focus");
|
|
2665
|
+
}
|
|
2666
|
+
watchEffect(() => currentRecord.value = copy(props.record));
|
|
2667
|
+
watch(currentRecord, (newValue) => {
|
|
2668
|
+
var _a;
|
|
2669
|
+
const property = (_a = props.column.field) != null ? _a : "";
|
|
2670
|
+
if (property !== "") {
|
|
2671
|
+
if (newValue[property] !== props.record[property]) {
|
|
2672
|
+
emit("edit", newValue[property]);
|
|
2673
|
+
} else {
|
|
2674
|
+
emit("undo-edit");
|
|
2675
|
+
}
|
|
2676
|
+
}
|
|
2677
|
+
}, {
|
|
2678
|
+
deep: true
|
|
2679
|
+
});
|
|
2680
|
+
return (_ctx, _cache) => {
|
|
2681
|
+
return __props.editMode && __props.column.field && __props.column.editable ? (openBlock(), createElementBlock("td", mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
2682
|
+
class: ["cl-transition-colours", {
|
|
2683
|
+
"cl-bg-link-lighter": unref(edited)
|
|
2684
|
+
}]
|
|
2685
|
+
}), [
|
|
2686
|
+
createElementVNode("strong", _hoisted_1$d, toDisplayString(__props.column.caption), 1),
|
|
2687
|
+
renderSlot(_ctx.$slots, `${__props.column.name}Edit`, normalizeProps(guardReactiveProps({
|
|
2688
|
+
cellFocused,
|
|
2689
|
+
column: __props.column,
|
|
2690
|
+
edited: unref(edited),
|
|
2691
|
+
record: currentRecord.value
|
|
2692
|
+
})))
|
|
2693
|
+
], 16)) : (openBlock(), createElementBlock("td", normalizeProps(mergeProps({ key: 1 }, _ctx.$attrs)), [
|
|
2694
|
+
createElementVNode("strong", _hoisted_2$c, toDisplayString(__props.column.caption), 1),
|
|
2695
|
+
__props.column.type === "slot" ? renderSlot(_ctx.$slots, __props.column.name, normalizeProps(mergeProps({ key: 0 }, { column: __props.column, record: __props.record }))) : __props.column.type === "boolean" && __props.column.field !== void 0 ? (openBlock(), createBlock(ClUiInput, {
|
|
2696
|
+
key: 1,
|
|
2697
|
+
"input-type": "checkbox",
|
|
2698
|
+
"model-value": getBooleanValue(__props.record, __props.column.field),
|
|
2699
|
+
disabled: true
|
|
2700
|
+
}, null, 8, ["model-value"])) : (__props.column.type === "date" || __props.column.type === "datetime") && __props.column.field !== void 0 ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2701
|
+
__props.column.format !== void 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2702
|
+
createTextVNode(toDisplayString(unref(d)(new Date(getStringValue(__props.record, __props.column.field)), __props.column.format)), 1)
|
|
2703
|
+
], 64)) : __props.column.type === "date" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
2704
|
+
createTextVNode(toDisplayString(unref(d)(new Date(getStringValue(__props.record, __props.column.field)), unref(DateFormat).DATE)), 1)
|
|
2705
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2706
|
+
createTextVNode(toDisplayString(unref(d)(new Date(getStringValue(__props.record, __props.column.field)), unref(DateFormat).DATETIME)), 1)
|
|
2707
|
+
], 64))
|
|
2708
|
+
], 64)) : __props.column.type === "number" && __props.column.field ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
2709
|
+
__props.column.format === unref(NumberFormat).MULTIPLIER ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2710
|
+
createTextVNode(" \xD7" + toDisplayString(getNumericValue(__props.record, __props.column.field)), 1)
|
|
2711
|
+
], 64)) : __props.column.format !== void 0 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
2712
|
+
createTextVNode(toDisplayString(unref(n)(getNumericValue(__props.record, __props.column.field), __props.column.format)), 1)
|
|
2713
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2714
|
+
createTextVNode(toDisplayString(getNumericValue(__props.record, __props.column.field)), 1)
|
|
2715
|
+
], 64))
|
|
2716
|
+
], 64)) : __props.column.field !== void 0 ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
2717
|
+
__props.column.maxLength !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_3$a, toDisplayString(getStringValue(__props.record, __props.column.field).trimToLength(__props.column.maxLength, __props.column.format !== void 0 ? __props.column.format === "ellipsis" : false)), 1)) : (openBlock(), createElementBlock("span", _hoisted_4$8, toDisplayString(getStringValue(__props.record, __props.column.field)), 1))
|
|
2718
|
+
], 64)) : createCommentVNode("", true)
|
|
2719
|
+
], 16));
|
|
2720
|
+
};
|
|
2696
2721
|
}
|
|
2697
|
-
|
|
2698
|
-
|
|
2722
|
+
}));
|
|
2723
|
+
const gridColumnTypes = [
|
|
2724
|
+
"string",
|
|
2725
|
+
"boolean",
|
|
2726
|
+
"number",
|
|
2727
|
+
"date",
|
|
2728
|
+
"datetime",
|
|
2729
|
+
"slot"
|
|
2730
|
+
];
|
|
2731
|
+
function isGridColumn(objectToTest) {
|
|
2732
|
+
return typeof objectToTest.caption === "string" && typeof objectToTest.name === "string" && typeof objectToTest.type === "string";
|
|
2733
|
+
}
|
|
2734
|
+
function isGridColumnArray(arrayToTest) {
|
|
2735
|
+
let arrayIsValid = Array.isArray(arrayToTest);
|
|
2736
|
+
if (arrayIsValid) {
|
|
2737
|
+
for (const objectToTest of arrayToTest) {
|
|
2738
|
+
if (!isGridColumn(objectToTest)) {
|
|
2739
|
+
arrayIsValid = false;
|
|
2740
|
+
break;
|
|
2741
|
+
}
|
|
2742
|
+
}
|
|
2699
2743
|
}
|
|
2700
|
-
|
|
2701
|
-
|
|
2744
|
+
return arrayIsValid;
|
|
2745
|
+
}
|
|
2746
|
+
const stringFormats = ["ellipsis"];
|
|
2747
|
+
var FilterOperation;
|
|
2748
|
+
(function(FilterOperation2) {
|
|
2749
|
+
FilterOperation2[FilterOperation2["CONTAINS"] = 0] = "CONTAINS";
|
|
2750
|
+
FilterOperation2[FilterOperation2["NOT_CONTAINS"] = 1] = "NOT_CONTAINS";
|
|
2751
|
+
FilterOperation2[FilterOperation2["EQUAL"] = 2] = "EQUAL";
|
|
2752
|
+
FilterOperation2[FilterOperation2["NOT_EQUAL"] = 3] = "NOT_EQUAL";
|
|
2753
|
+
FilterOperation2[FilterOperation2["STARTS_WITH"] = 4] = "STARTS_WITH";
|
|
2754
|
+
FilterOperation2[FilterOperation2["ENDS_WITH"] = 5] = "ENDS_WITH";
|
|
2755
|
+
FilterOperation2[FilterOperation2["GREATER_THAN"] = 6] = "GREATER_THAN";
|
|
2756
|
+
FilterOperation2[FilterOperation2["LESS_THAN"] = 7] = "LESS_THAN";
|
|
2757
|
+
FilterOperation2[FilterOperation2["EQUAL_OR_GREATER_THAN"] = 8] = "EQUAL_OR_GREATER_THAN";
|
|
2758
|
+
FilterOperation2[FilterOperation2["EQUAL_OR_LESS_THAN"] = 9] = "EQUAL_OR_LESS_THAN";
|
|
2759
|
+
})(FilterOperation || (FilterOperation = {}));
|
|
2760
|
+
const filterMethodTypes = [
|
|
2761
|
+
"equal",
|
|
2762
|
+
"notequal",
|
|
2763
|
+
"contains",
|
|
2764
|
+
"notcontains",
|
|
2765
|
+
"lessthan",
|
|
2766
|
+
"greaterthan",
|
|
2767
|
+
"startswith",
|
|
2768
|
+
"endswith",
|
|
2769
|
+
"equalorlessthan",
|
|
2770
|
+
"equalorgreaterthan"
|
|
2771
|
+
];
|
|
2772
|
+
function isFilterArgs(objectToTest) {
|
|
2773
|
+
return typeof objectToTest.filterOnColumn === "string" && typeof objectToTest.filterOperation === "number" && typeof objectToTest.filterValue === "string";
|
|
2774
|
+
}
|
|
2775
|
+
function isSortArgs(objectToTest) {
|
|
2776
|
+
return objectToTest === null || typeof objectToTest.sortByAscending === "boolean" && typeof objectToTest.sortOnColumn === "string";
|
|
2777
|
+
}
|
|
2778
|
+
function isFilterRequest(objectToTest) {
|
|
2779
|
+
let objectValid = typeof objectToTest.filters === "object" && Array.isArray(objectToTest.filters) && typeof objectToTest.pageNumber === "number" && typeof objectToTest.pageSize === "number" && typeof objectToTest.sort === "object" && isSortArgs(objectToTest.sort);
|
|
2780
|
+
if (objectValid) {
|
|
2781
|
+
for (const filterArgs of objectToTest.filters) {
|
|
2782
|
+
if (!isFilterArgs(filterArgs)) {
|
|
2783
|
+
objectValid = false;
|
|
2784
|
+
break;
|
|
2785
|
+
}
|
|
2786
|
+
}
|
|
2702
2787
|
}
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2788
|
+
return objectValid;
|
|
2789
|
+
}
|
|
2790
|
+
function isFilterResponse(objectToTest, resultValidator) {
|
|
2791
|
+
let objectValid = typeof objectToTest.results === "object" && Array.isArray(objectToTest.results) && typeof objectToTest.totalRecords === "number";
|
|
2792
|
+
if (objectValid) {
|
|
2793
|
+
for (const result of objectToTest.results) {
|
|
2794
|
+
if (!resultValidator(result)) {
|
|
2795
|
+
objectValid = false;
|
|
2796
|
+
break;
|
|
2712
2797
|
}
|
|
2713
2798
|
}
|
|
2714
|
-
}
|
|
2715
|
-
|
|
2716
|
-
});
|
|
2717
|
-
return (_ctx, _cache) => {
|
|
2718
|
-
return __props.editMode && __props.column.field && __props.column.editable ? (openBlock(), createElementBlock("td", mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
2719
|
-
class: ["cl-transition-colours", {
|
|
2720
|
-
"cl-bg-link-lighter": unref(edited)
|
|
2721
|
-
}]
|
|
2722
|
-
}), [
|
|
2723
|
-
createElementVNode("strong", _hoisted_1$d, toDisplayString(__props.column.caption), 1),
|
|
2724
|
-
renderSlot(_ctx.$slots, `${__props.column.name}Edit`, normalizeProps(guardReactiveProps({
|
|
2725
|
-
cellFocused,
|
|
2726
|
-
column: __props.column,
|
|
2727
|
-
edited: unref(edited),
|
|
2728
|
-
record: currentRecord.value
|
|
2729
|
-
})))
|
|
2730
|
-
], 16)) : (openBlock(), createElementBlock("td", normalizeProps(mergeProps({ key: 1 }, _ctx.$attrs)), [
|
|
2731
|
-
createElementVNode("strong", _hoisted_2$c, toDisplayString(__props.column.caption), 1),
|
|
2732
|
-
__props.column.type === "slot" ? renderSlot(_ctx.$slots, __props.column.name, normalizeProps(mergeProps({ key: 0 }, { column: __props.column, record: __props.record }))) : __props.column.type === "boolean" && __props.column.field !== void 0 ? (openBlock(), createBlock(ClUiInput, {
|
|
2733
|
-
key: 1,
|
|
2734
|
-
"input-type": "checkbox",
|
|
2735
|
-
"model-value": getBooleanValue(__props.record, __props.column.field),
|
|
2736
|
-
disabled: true
|
|
2737
|
-
}, null, 8, ["model-value"])) : (__props.column.type === "date" || __props.column.type === "datetime") && __props.column.field !== void 0 ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2738
|
-
__props.column.format !== void 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2739
|
-
createTextVNode(toDisplayString(unref(d)(new Date(getStringValue(__props.record, __props.column.field)), __props.column.format)), 1)
|
|
2740
|
-
], 64)) : __props.column.type === "date" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
2741
|
-
createTextVNode(toDisplayString(unref(d)(new Date(getStringValue(__props.record, __props.column.field)), unref(DateFormat).DATE)), 1)
|
|
2742
|
-
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2743
|
-
createTextVNode(toDisplayString(unref(d)(new Date(getStringValue(__props.record, __props.column.field)), unref(DateFormat).DATETIME)), 1)
|
|
2744
|
-
], 64))
|
|
2745
|
-
], 64)) : __props.column.type === "number" && __props.column.field ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
2746
|
-
__props.column.format === unref(NumberFormat).MULTIPLIER ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2747
|
-
createTextVNode(" \xD7" + toDisplayString(getNumericValue(__props.record, __props.column.field)), 1)
|
|
2748
|
-
], 64)) : __props.column.format !== void 0 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
2749
|
-
createTextVNode(toDisplayString(unref(n)(getNumericValue(__props.record, __props.column.field), __props.column.format)), 1)
|
|
2750
|
-
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2751
|
-
createTextVNode(toDisplayString(getNumericValue(__props.record, __props.column.field)), 1)
|
|
2752
|
-
], 64))
|
|
2753
|
-
], 64)) : __props.column.field !== void 0 ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
2754
|
-
__props.column.maxLength !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_3$a, toDisplayString(getStringValue(__props.record, __props.column.field).trimToLength(__props.column.maxLength, __props.column.format !== void 0 ? __props.column.format === "ellipsis" : false)), 1)) : (openBlock(), createElementBlock("span", _hoisted_4$8, toDisplayString(getStringValue(__props.record, __props.column.field)), 1))
|
|
2755
|
-
], 64)) : createCommentVNode("", true)
|
|
2756
|
-
], 16));
|
|
2757
|
-
};
|
|
2799
|
+
}
|
|
2800
|
+
return objectValid;
|
|
2758
2801
|
}
|
|
2759
|
-
const _sfc_main$e = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$1), {
|
|
2760
|
-
props: {
|
|
2761
|
-
column: null,
|
|
2762
|
-
record: null,
|
|
2763
|
-
editMode: { type: Boolean, default: false }
|
|
2764
|
-
},
|
|
2765
|
-
emits: {
|
|
2766
|
-
edit: null,
|
|
2767
|
-
focus: null,
|
|
2768
|
-
"undo-edit": null
|
|
2769
|
-
},
|
|
2770
|
-
setup: setup$1
|
|
2771
|
-
}));
|
|
2772
2802
|
const defaultFilterMethod = {
|
|
2773
2803
|
method: "equal",
|
|
2774
2804
|
icon: "=",
|
|
@@ -2860,85 +2890,6 @@ const filterMethods = [
|
|
|
2860
2890
|
]
|
|
2861
2891
|
}
|
|
2862
2892
|
];
|
|
2863
|
-
const gridColumnTypes = [
|
|
2864
|
-
"string",
|
|
2865
|
-
"boolean",
|
|
2866
|
-
"number",
|
|
2867
|
-
"date",
|
|
2868
|
-
"datetime",
|
|
2869
|
-
"slot"
|
|
2870
|
-
];
|
|
2871
|
-
function isGridColumn(objectToTest) {
|
|
2872
|
-
return typeof objectToTest.caption === "string" && typeof objectToTest.name === "string" && typeof objectToTest.type === "string";
|
|
2873
|
-
}
|
|
2874
|
-
function isGridColumnArray(arrayToTest) {
|
|
2875
|
-
let arrayIsValid = Array.isArray(arrayToTest);
|
|
2876
|
-
if (arrayIsValid) {
|
|
2877
|
-
for (const objectToTest of arrayToTest) {
|
|
2878
|
-
if (!isGridColumn(objectToTest)) {
|
|
2879
|
-
arrayIsValid = false;
|
|
2880
|
-
break;
|
|
2881
|
-
}
|
|
2882
|
-
}
|
|
2883
|
-
}
|
|
2884
|
-
return arrayIsValid;
|
|
2885
|
-
}
|
|
2886
|
-
const stringFormats = ["ellipsis"];
|
|
2887
|
-
var FilterOperation;
|
|
2888
|
-
(function(FilterOperation2) {
|
|
2889
|
-
FilterOperation2[FilterOperation2["CONTAINS"] = 0] = "CONTAINS";
|
|
2890
|
-
FilterOperation2[FilterOperation2["NOT_CONTAINS"] = 1] = "NOT_CONTAINS";
|
|
2891
|
-
FilterOperation2[FilterOperation2["EQUAL"] = 2] = "EQUAL";
|
|
2892
|
-
FilterOperation2[FilterOperation2["NOT_EQUAL"] = 3] = "NOT_EQUAL";
|
|
2893
|
-
FilterOperation2[FilterOperation2["STARTS_WITH"] = 4] = "STARTS_WITH";
|
|
2894
|
-
FilterOperation2[FilterOperation2["ENDS_WITH"] = 5] = "ENDS_WITH";
|
|
2895
|
-
FilterOperation2[FilterOperation2["GREATER_THAN"] = 6] = "GREATER_THAN";
|
|
2896
|
-
FilterOperation2[FilterOperation2["LESS_THAN"] = 7] = "LESS_THAN";
|
|
2897
|
-
FilterOperation2[FilterOperation2["EQUAL_OR_GREATER_THAN"] = 8] = "EQUAL_OR_GREATER_THAN";
|
|
2898
|
-
FilterOperation2[FilterOperation2["EQUAL_OR_LESS_THAN"] = 9] = "EQUAL_OR_LESS_THAN";
|
|
2899
|
-
})(FilterOperation || (FilterOperation = {}));
|
|
2900
|
-
const filterMethodTypes = [
|
|
2901
|
-
"equal",
|
|
2902
|
-
"notequal",
|
|
2903
|
-
"contains",
|
|
2904
|
-
"notcontains",
|
|
2905
|
-
"lessthan",
|
|
2906
|
-
"greaterthan",
|
|
2907
|
-
"startswith",
|
|
2908
|
-
"endswith",
|
|
2909
|
-
"equalorlessthan",
|
|
2910
|
-
"equalorgreaterthan"
|
|
2911
|
-
];
|
|
2912
|
-
function isFilterArgs(objectToTest) {
|
|
2913
|
-
return typeof objectToTest.filterOnColumn === "string" && typeof objectToTest.filterOperation === "number" && typeof objectToTest.filterValue === "string";
|
|
2914
|
-
}
|
|
2915
|
-
function isSortArgs(objectToTest) {
|
|
2916
|
-
return objectToTest === null || typeof objectToTest.sortByAscending === "boolean" && typeof objectToTest.sortOnColumn === "string";
|
|
2917
|
-
}
|
|
2918
|
-
function isFilterRequest(objectToTest) {
|
|
2919
|
-
let objectValid = typeof objectToTest.filters === "object" && Array.isArray(objectToTest.filters) && typeof objectToTest.pageNumber === "number" && typeof objectToTest.pageSize === "number" && typeof objectToTest.sort === "object" && isSortArgs(objectToTest.sort);
|
|
2920
|
-
if (objectValid) {
|
|
2921
|
-
for (const filterArgs of objectToTest.filters) {
|
|
2922
|
-
if (!isFilterArgs(filterArgs)) {
|
|
2923
|
-
objectValid = false;
|
|
2924
|
-
break;
|
|
2925
|
-
}
|
|
2926
|
-
}
|
|
2927
|
-
}
|
|
2928
|
-
return objectValid;
|
|
2929
|
-
}
|
|
2930
|
-
function isFilterResponse(objectToTest, resultValidator) {
|
|
2931
|
-
let objectValid = typeof objectToTest.results === "object" && Array.isArray(objectToTest.results) && typeof objectToTest.totalRecords === "number";
|
|
2932
|
-
if (objectValid) {
|
|
2933
|
-
for (const result of objectToTest.results) {
|
|
2934
|
-
if (!resultValidator(result)) {
|
|
2935
|
-
objectValid = false;
|
|
2936
|
-
break;
|
|
2937
|
-
}
|
|
2938
|
-
}
|
|
2939
|
-
}
|
|
2940
|
-
return objectValid;
|
|
2941
|
-
}
|
|
2942
2893
|
const _hoisted_1$c = {
|
|
2943
2894
|
key: 0,
|
|
2944
2895
|
class: "cl-border-grey-2 cl-border-r cl-capitalize cl-group cl-inline cl-relative cl-w-auto"
|
|
@@ -3152,14 +3103,14 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
3152
3103
|
class: "cl-border-none cl-mb-0 cl-w-full",
|
|
3153
3104
|
"input-type": "number",
|
|
3154
3105
|
"show-arrows": false,
|
|
3155
|
-
onInput: _cache[3] || (_cache[3] = ($event) => unref(debounce)(setNumberFilter,
|
|
3106
|
+
onInput: _cache[3] || (_cache[3] = ($event) => unref(debounce)(setNumberFilter, $event.target))
|
|
3156
3107
|
}, null, 8, ["modelValue"])) : __props.column.type !== "slot" || __props.column.slotType === "string" && typeof __props.column.field !== "undefined" ? (openBlock(), createBlock(ClUiInput, {
|
|
3157
3108
|
key: 4,
|
|
3158
3109
|
modelValue: filterInput.value,
|
|
3159
3110
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => filterInput.value = $event),
|
|
3160
3111
|
class: "cl-border-none cl-mb-0 cl-w-full",
|
|
3161
3112
|
"input-type": "text",
|
|
3162
|
-
onInput: _cache[5] || (_cache[5] = ($event) => unref(debounce)(setFilter,
|
|
3113
|
+
onInput: _cache[5] || (_cache[5] = ($event) => unref(debounce)(setFilter, $event.target))
|
|
3163
3114
|
}, null, 8, ["modelValue"])) : createCommentVNode("", true)
|
|
3164
3115
|
], 2)) : (openBlock(), createElementBlock("div", _hoisted_12$3, " \xA0 "));
|
|
3165
3116
|
};
|
|
@@ -3187,7 +3138,7 @@ const _hoisted_16$1 = { class: "cl-block lg:cl-inline-block" };
|
|
|
3187
3138
|
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
3188
3139
|
props: {
|
|
3189
3140
|
request: null,
|
|
3190
|
-
data: { default:
|
|
3141
|
+
data: { default: null }
|
|
3191
3142
|
},
|
|
3192
3143
|
emits: {
|
|
3193
3144
|
"update:request": null
|
|
@@ -3204,7 +3155,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3204
3155
|
const { n, t: t2 } = useI18n();
|
|
3205
3156
|
const { debounce } = useDebouncer();
|
|
3206
3157
|
const currentPage = ref(props.request.pageNumber);
|
|
3207
|
-
const totalPages = computed(() =>
|
|
3158
|
+
const totalPages = computed(() => {
|
|
3159
|
+
var _a, _b;
|
|
3160
|
+
return props.data !== null ? Math.ceil((_b = (_a = props.data) == null ? void 0 : _a.totalRecords) != null ? _b : 0 / props.request.pageSize) : 1;
|
|
3161
|
+
});
|
|
3208
3162
|
const pageNumbers = computed(() => {
|
|
3209
3163
|
const calculatedPageNumbers = Array.from(Array(totalPages.value + 1).keys());
|
|
3210
3164
|
let results = [];
|
|
@@ -3249,7 +3203,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3249
3203
|
"show-label": false,
|
|
3250
3204
|
min: "1",
|
|
3251
3205
|
max: unref(totalPages),
|
|
3252
|
-
onInput: _cache[1] || (_cache[1] = ($event) => unref(debounce)(setPageFromInput,
|
|
3206
|
+
onInput: _cache[1] || (_cache[1] = ($event) => unref(debounce)(setPageFromInput, $event.target))
|
|
3253
3207
|
}, null, 8, ["modelValue", "max"])
|
|
3254
3208
|
]),
|
|
3255
3209
|
createElementVNode("div", _hoisted_4$6, [
|
|
@@ -3352,105 +3306,6 @@ const _hoisted_12$1 = { key: 1 };
|
|
|
3352
3306
|
const __default__ = {
|
|
3353
3307
|
inheritAttrs: false
|
|
3354
3308
|
};
|
|
3355
|
-
function setup(__props, { emit }) {
|
|
3356
|
-
const props = __props;
|
|
3357
|
-
const { t: t2 } = useI18n();
|
|
3358
|
-
const visible = ref(false);
|
|
3359
|
-
function moveColumn(columns, oldIndex, newIndex) {
|
|
3360
|
-
if (newIndex < columns.length && newIndex >= 0) {
|
|
3361
|
-
columns.splice(newIndex, 0, columns.splice(oldIndex, 1)[0]);
|
|
3362
|
-
}
|
|
3363
|
-
}
|
|
3364
|
-
function updateColumnVisibility(target, column) {
|
|
3365
|
-
var _a;
|
|
3366
|
-
const gridColumns = copy(props.columns);
|
|
3367
|
-
const checked = (_a = target == null ? void 0 : target.checked) != null ? _a : false;
|
|
3368
|
-
const targetColumnIndex = gridColumns.findIndex((c) => c.name === column.name);
|
|
3369
|
-
if (targetColumnIndex >= 0) {
|
|
3370
|
-
gridColumns[targetColumnIndex].visible = checked;
|
|
3371
|
-
}
|
|
3372
|
-
emit("update:columns", gridColumns);
|
|
3373
|
-
}
|
|
3374
|
-
function changeColumnOrder(columnIndex, direction) {
|
|
3375
|
-
const gridColumns = copy(props.columns);
|
|
3376
|
-
const newIndex = direction === "up" ? columnIndex + 1 : columnIndex - 1;
|
|
3377
|
-
moveColumn(gridColumns, columnIndex, newIndex);
|
|
3378
|
-
emit("update:columns", gridColumns);
|
|
3379
|
-
}
|
|
3380
|
-
return (_ctx, _cache) => {
|
|
3381
|
-
const _component_icon = resolveComponent("icon");
|
|
3382
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
3383
|
-
createVNode(_sfc_main$p, mergeProps(_ctx.$attrs, {
|
|
3384
|
-
class: "cl-w-full",
|
|
3385
|
-
size: "small",
|
|
3386
|
-
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => visible.value = true, ["prevent"]))
|
|
3387
|
-
}), {
|
|
3388
|
-
default: withCtx(() => [
|
|
3389
|
-
createTextVNode(toDisplayString(unref(t2)("grid.manageView")), 1)
|
|
3390
|
-
]),
|
|
3391
|
-
_: 1
|
|
3392
|
-
}, 16),
|
|
3393
|
-
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
3394
|
-
createVNode(Transition, { name: "slide-left" }, {
|
|
3395
|
-
default: withCtx(() => [
|
|
3396
|
-
withDirectives(createElementVNode("div", _hoisted_1$a, [
|
|
3397
|
-
createElementVNode("div", _hoisted_2$9, [
|
|
3398
|
-
createVNode(_component_icon, {
|
|
3399
|
-
class: "cl-absolute cl-cursor-pointer cl-right-3 cl-text-off-white cl-top-3",
|
|
3400
|
-
icon: "ph:x",
|
|
3401
|
-
size: 16,
|
|
3402
|
-
onClick: _cache[1] || (_cache[1] = ($event) => visible.value = false)
|
|
3403
|
-
}),
|
|
3404
|
-
createElementVNode("h3", _hoisted_3$7, toDisplayString(unref(t2)("grid.manageView")), 1),
|
|
3405
|
-
createElementVNode("ul", _hoisted_4$5, [
|
|
3406
|
-
createElementVNode("li", _hoisted_5$3, [
|
|
3407
|
-
createElementVNode("strong", _hoisted_6$3, toDisplayString(unref(t2)("grid.column")), 1),
|
|
3408
|
-
createElementVNode("strong", _hoisted_7$3, toDisplayString(unref(t2)("grid.visible")), 1),
|
|
3409
|
-
createElementVNode("strong", _hoisted_8$2, toDisplayString(unref(t2)("grid.order")), 1)
|
|
3410
|
-
]),
|
|
3411
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column, index) => {
|
|
3412
|
-
return openBlock(), createElementBlock("li", {
|
|
3413
|
-
key: index,
|
|
3414
|
-
class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full"
|
|
3415
|
-
}, [
|
|
3416
|
-
createElementVNode("div", _hoisted_9$2, toDisplayString(column.caption), 1),
|
|
3417
|
-
createElementVNode("div", _hoisted_10$2, [
|
|
3418
|
-
createVNode(ClUiInput, {
|
|
3419
|
-
"model-value": column.visible === void 0 || column.visible === true,
|
|
3420
|
-
"input-type": "checkbox",
|
|
3421
|
-
onClick: ($event) => updateColumnVisibility($event.target, column)
|
|
3422
|
-
}, null, 8, ["model-value", "onClick"])
|
|
3423
|
-
]),
|
|
3424
|
-
createElementVNode("div", _hoisted_11$1, [
|
|
3425
|
-
column.visible === void 0 || column.visible === true ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3426
|
-
index !== 0 ? (openBlock(), createBlock(_component_icon, {
|
|
3427
|
-
key: 0,
|
|
3428
|
-
class: "cl-cursor-pointer cl-inline-block cl-mr-2",
|
|
3429
|
-
icon: "ph:arrow-left",
|
|
3430
|
-
onClick: ($event) => changeColumnOrder(index, "down")
|
|
3431
|
-
}, null, 8, ["onClick"])) : createCommentVNode("", true),
|
|
3432
|
-
index !== __props.columns.length - 1 ? (openBlock(), createBlock(_component_icon, {
|
|
3433
|
-
key: 1,
|
|
3434
|
-
class: "cl-cursor-pointer cl-inline-block",
|
|
3435
|
-
icon: "ph:arrow-right",
|
|
3436
|
-
onClick: ($event) => changeColumnOrder(index, "up")
|
|
3437
|
-
}, null, 8, ["onClick"])) : createCommentVNode("", true)
|
|
3438
|
-
], 64)) : (openBlock(), createElementBlock("em", _hoisted_12$1, toDisplayString(unref(t2)("grid.hidden")), 1))
|
|
3439
|
-
])
|
|
3440
|
-
]);
|
|
3441
|
-
}), 128))
|
|
3442
|
-
])
|
|
3443
|
-
])
|
|
3444
|
-
], 512), [
|
|
3445
|
-
[vShow, visible.value]
|
|
3446
|
-
])
|
|
3447
|
-
]),
|
|
3448
|
-
_: 1
|
|
3449
|
-
})
|
|
3450
|
-
]))
|
|
3451
|
-
], 64);
|
|
3452
|
-
};
|
|
3453
|
-
}
|
|
3454
3309
|
const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
|
|
3455
3310
|
props: {
|
|
3456
3311
|
columns: null
|
|
@@ -3458,7 +3313,105 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3458
3313
|
emits: {
|
|
3459
3314
|
"update:columns": null
|
|
3460
3315
|
},
|
|
3461
|
-
setup
|
|
3316
|
+
setup(__props, { emit }) {
|
|
3317
|
+
const props = __props;
|
|
3318
|
+
const { t: t2 } = useI18n();
|
|
3319
|
+
const visible = ref(false);
|
|
3320
|
+
function moveColumn(columns, oldIndex, newIndex) {
|
|
3321
|
+
if (newIndex < columns.length && newIndex >= 0) {
|
|
3322
|
+
columns.splice(newIndex, 0, columns.splice(oldIndex, 1)[0]);
|
|
3323
|
+
}
|
|
3324
|
+
}
|
|
3325
|
+
function updateColumnVisibility(target, column) {
|
|
3326
|
+
var _a;
|
|
3327
|
+
const gridColumns = copy(props.columns);
|
|
3328
|
+
const checked = (_a = target == null ? void 0 : target.checked) != null ? _a : false;
|
|
3329
|
+
const targetColumnIndex = gridColumns.findIndex((c) => c.name === column.name);
|
|
3330
|
+
if (targetColumnIndex >= 0) {
|
|
3331
|
+
gridColumns[targetColumnIndex].visible = checked;
|
|
3332
|
+
}
|
|
3333
|
+
emit("update:columns", gridColumns);
|
|
3334
|
+
}
|
|
3335
|
+
function changeColumnOrder(columnIndex, direction) {
|
|
3336
|
+
const gridColumns = copy(props.columns);
|
|
3337
|
+
const newIndex = direction === "up" ? columnIndex + 1 : columnIndex - 1;
|
|
3338
|
+
moveColumn(gridColumns, columnIndex, newIndex);
|
|
3339
|
+
emit("update:columns", gridColumns);
|
|
3340
|
+
}
|
|
3341
|
+
return (_ctx, _cache) => {
|
|
3342
|
+
const _component_icon = resolveComponent("icon");
|
|
3343
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
3344
|
+
createVNode(_sfc_main$p, mergeProps(_ctx.$attrs, {
|
|
3345
|
+
class: "cl-w-full",
|
|
3346
|
+
size: "small",
|
|
3347
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => visible.value = true, ["prevent"]))
|
|
3348
|
+
}), {
|
|
3349
|
+
default: withCtx(() => [
|
|
3350
|
+
createTextVNode(toDisplayString(unref(t2)("grid.manageView")), 1)
|
|
3351
|
+
]),
|
|
3352
|
+
_: 1
|
|
3353
|
+
}, 16),
|
|
3354
|
+
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
3355
|
+
createVNode(Transition, { name: "slide-left" }, {
|
|
3356
|
+
default: withCtx(() => [
|
|
3357
|
+
withDirectives(createElementVNode("div", _hoisted_1$a, [
|
|
3358
|
+
createElementVNode("div", _hoisted_2$9, [
|
|
3359
|
+
createVNode(_component_icon, {
|
|
3360
|
+
class: "cl-absolute cl-cursor-pointer cl-right-3 cl-text-off-white cl-top-3",
|
|
3361
|
+
icon: "ph:x",
|
|
3362
|
+
size: 16,
|
|
3363
|
+
onClick: _cache[1] || (_cache[1] = ($event) => visible.value = false)
|
|
3364
|
+
}),
|
|
3365
|
+
createElementVNode("h3", _hoisted_3$7, toDisplayString(unref(t2)("grid.manageView")), 1),
|
|
3366
|
+
createElementVNode("ul", _hoisted_4$5, [
|
|
3367
|
+
createElementVNode("li", _hoisted_5$3, [
|
|
3368
|
+
createElementVNode("strong", _hoisted_6$3, toDisplayString(unref(t2)("grid.column")), 1),
|
|
3369
|
+
createElementVNode("strong", _hoisted_7$3, toDisplayString(unref(t2)("grid.visible")), 1),
|
|
3370
|
+
createElementVNode("strong", _hoisted_8$2, toDisplayString(unref(t2)("grid.order")), 1)
|
|
3371
|
+
]),
|
|
3372
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column, index) => {
|
|
3373
|
+
return openBlock(), createElementBlock("li", {
|
|
3374
|
+
key: index,
|
|
3375
|
+
class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full"
|
|
3376
|
+
}, [
|
|
3377
|
+
createElementVNode("div", _hoisted_9$2, toDisplayString(column.caption), 1),
|
|
3378
|
+
createElementVNode("div", _hoisted_10$2, [
|
|
3379
|
+
createVNode(ClUiInput, {
|
|
3380
|
+
"model-value": column.visible === void 0 || column.visible === true,
|
|
3381
|
+
"input-type": "checkbox",
|
|
3382
|
+
onClick: ($event) => updateColumnVisibility($event.target, column)
|
|
3383
|
+
}, null, 8, ["model-value", "onClick"])
|
|
3384
|
+
]),
|
|
3385
|
+
createElementVNode("div", _hoisted_11$1, [
|
|
3386
|
+
column.visible === void 0 || column.visible === true ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3387
|
+
index !== 0 ? (openBlock(), createBlock(_component_icon, {
|
|
3388
|
+
key: 0,
|
|
3389
|
+
class: "cl-cursor-pointer cl-inline-block cl-mr-2",
|
|
3390
|
+
icon: "ph:arrow-left",
|
|
3391
|
+
onClick: ($event) => changeColumnOrder(index, "down")
|
|
3392
|
+
}, null, 8, ["onClick"])) : createCommentVNode("", true),
|
|
3393
|
+
index !== __props.columns.length - 1 ? (openBlock(), createBlock(_component_icon, {
|
|
3394
|
+
key: 1,
|
|
3395
|
+
class: "cl-cursor-pointer cl-inline-block",
|
|
3396
|
+
icon: "ph:arrow-right",
|
|
3397
|
+
onClick: ($event) => changeColumnOrder(index, "up")
|
|
3398
|
+
}, null, 8, ["onClick"])) : createCommentVNode("", true)
|
|
3399
|
+
], 64)) : (openBlock(), createElementBlock("em", _hoisted_12$1, toDisplayString(unref(t2)("grid.hidden")), 1))
|
|
3400
|
+
])
|
|
3401
|
+
]);
|
|
3402
|
+
}), 128))
|
|
3403
|
+
])
|
|
3404
|
+
])
|
|
3405
|
+
], 512), [
|
|
3406
|
+
[vShow, visible.value]
|
|
3407
|
+
])
|
|
3408
|
+
]),
|
|
3409
|
+
_: 1
|
|
3410
|
+
})
|
|
3411
|
+
]))
|
|
3412
|
+
], 64);
|
|
3413
|
+
};
|
|
3414
|
+
}
|
|
3462
3415
|
}));
|
|
3463
3416
|
const _hoisted_1$9 = {
|
|
3464
3417
|
key: 0,
|
|
@@ -3575,7 +3528,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3575
3528
|
columns: null,
|
|
3576
3529
|
request: null,
|
|
3577
3530
|
loading: { type: Boolean },
|
|
3578
|
-
data: { default:
|
|
3531
|
+
data: { default: null }
|
|
3579
3532
|
},
|
|
3580
3533
|
emits: {
|
|
3581
3534
|
"update:columns": null,
|
|
@@ -3908,7 +3861,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3908
3861
|
};
|
|
3909
3862
|
}
|
|
3910
3863
|
});
|
|
3911
|
-
var clUiGrid = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-
|
|
3864
|
+
var clUiGrid = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-7df0fada"]]);
|
|
3912
3865
|
const _sfc_main$8 = {};
|
|
3913
3866
|
const _hoisted_1$7 = { class: "cl-absolute cl-bg-secondary-default cl-flex cl-h-20 cl-items-center cl-justify-between cl-left-0 cl-top-0 cl-w-full cl-z-40" };
|
|
3914
3867
|
const _hoisted_2$6 = { class: "cl-flex cl-flex-nowrap" };
|
|
@@ -3925,14 +3878,14 @@ var clUiHeader = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_rende
|
|
|
3925
3878
|
const _hoisted_1$6 = { class: "md:cl-relative" };
|
|
3926
3879
|
const _hoisted_2$5 = { class: "cl-bg-blue-light cl-flex cl-items-center cl-select-none md:cl-min-w-[320px]" };
|
|
3927
3880
|
const _hoisted_3$4 = ["src"];
|
|
3928
|
-
const _hoisted_4$2 = { class: "cl-cursor-default cl-
|
|
3881
|
+
const _hoisted_4$2 = { class: "cl-cursor-default cl-grow cl-hidden cl-my-4 cl-text-white md:cl-block" };
|
|
3929
3882
|
const _hoisted_5$1 = {
|
|
3930
3883
|
key: 0,
|
|
3931
|
-
class: "cl-cursor-default cl-
|
|
3884
|
+
class: "cl-cursor-default cl-text-ellipsis cl-whitespace-nowrap"
|
|
3932
3885
|
};
|
|
3933
3886
|
const _hoisted_6$1 = {
|
|
3934
3887
|
key: 1,
|
|
3935
|
-
class: "cl-cursor-default cl-
|
|
3888
|
+
class: "cl-cursor-default cl-text-ellipsis cl-text-xs cl-whitespace-nowrap"
|
|
3936
3889
|
};
|
|
3937
3890
|
const _hoisted_7$1 = { class: "cl-absolute cl-bg-white cl-right-0 cl-shadow-2xl cl-top-20 cl-w-full cl-z-20" };
|
|
3938
3891
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
@@ -4479,245 +4432,6 @@ var components = /* @__PURE__ */ Object.freeze({
|
|
|
4479
4432
|
clUiNavigationItem,
|
|
4480
4433
|
clUiNotification: _sfc_main$s
|
|
4481
4434
|
});
|
|
4482
|
-
function levenshtein(firstString, secondString) {
|
|
4483
|
-
if (firstString.length === 0) {
|
|
4484
|
-
return secondString.length;
|
|
4485
|
-
}
|
|
4486
|
-
if (secondString.length === 0) {
|
|
4487
|
-
return firstString.length;
|
|
4488
|
-
}
|
|
4489
|
-
if (firstString.length > secondString.length) {
|
|
4490
|
-
const tmp = firstString;
|
|
4491
|
-
firstString = secondString;
|
|
4492
|
-
secondString = tmp;
|
|
4493
|
-
}
|
|
4494
|
-
const row = new Int8Array(firstString.length + 1);
|
|
4495
|
-
for (let i = 0; i <= firstString.length; i++) {
|
|
4496
|
-
row[i] = i;
|
|
4497
|
-
}
|
|
4498
|
-
let temp;
|
|
4499
|
-
for (let i = 1; i <= secondString.length; i++) {
|
|
4500
|
-
let prev = i;
|
|
4501
|
-
const previousChar = secondString[i - 1];
|
|
4502
|
-
for (let j = 1; j <= firstString.length; j++) {
|
|
4503
|
-
if (previousChar === firstString[j - 1]) {
|
|
4504
|
-
temp = row[j - 1];
|
|
4505
|
-
} else {
|
|
4506
|
-
const a = prev + 1;
|
|
4507
|
-
const b = row[j] + 1;
|
|
4508
|
-
const c = a - (a - b & b - a >> 7);
|
|
4509
|
-
const d = row[j - 1] + 1;
|
|
4510
|
-
temp = c - (c - d & d - c >> 7);
|
|
4511
|
-
}
|
|
4512
|
-
row[j - 1] = prev;
|
|
4513
|
-
prev = temp;
|
|
4514
|
-
}
|
|
4515
|
-
row[firstString.length] = prev;
|
|
4516
|
-
}
|
|
4517
|
-
return row[firstString.length];
|
|
4518
|
-
}
|
|
4519
|
-
function camelCaseToArray(camelCase) {
|
|
4520
|
-
return camelCase.split(/(?=[A-Z])/g);
|
|
4521
|
-
}
|
|
4522
|
-
function kebabCaseToArray(kebabCase) {
|
|
4523
|
-
return kebabCase.split(/(?=-)/g).map((s) => s.replace(/-/g, ""));
|
|
4524
|
-
}
|
|
4525
|
-
function pascalCaseToArray(pascalCase) {
|
|
4526
|
-
return camelCaseToArray(pascalCase);
|
|
4527
|
-
}
|
|
4528
|
-
function sentenceCaseToArray(sentenceCase) {
|
|
4529
|
-
return sentenceCase.split(/ /g).map((s) => s.replace(/[^A-Za-z0-9]/g, ""));
|
|
4530
|
-
}
|
|
4531
|
-
function snakeCaseToArray(snakeCase) {
|
|
4532
|
-
return snakeCase.split(/(?=_)/g).map((s) => s.replace(/_/g, ""));
|
|
4533
|
-
}
|
|
4534
|
-
function titleCaseToArray(titleCase) {
|
|
4535
|
-
return sentenceCaseToArray(titleCase);
|
|
4536
|
-
}
|
|
4537
|
-
function arrayToCamelCase(array, locale) {
|
|
4538
|
-
let result = "";
|
|
4539
|
-
array.forEach((s, i) => {
|
|
4540
|
-
result += i === 0 ? s.toLocaleLowerCase(locale) : s.toLocaleLowerCase(locale).firstCharToUpperCase(locale);
|
|
4541
|
-
});
|
|
4542
|
-
return result;
|
|
4543
|
-
}
|
|
4544
|
-
function arrayToKebabCase(array, lowerCase, locale) {
|
|
4545
|
-
let result = "";
|
|
4546
|
-
array.forEach((s) => {
|
|
4547
|
-
result += `${lowerCase ? s.toLocaleLowerCase(locale) : s.toLocaleUpperCase(locale)}-`;
|
|
4548
|
-
});
|
|
4549
|
-
return result.trimEndChar("-");
|
|
4550
|
-
}
|
|
4551
|
-
function arrayToSentenceCase(array, locale) {
|
|
4552
|
-
let result = "";
|
|
4553
|
-
array.forEach((s, i) => {
|
|
4554
|
-
result += `${i === 0 ? s.toLowerCase().firstCharToUpperCase(locale) : s.toLocaleLowerCase(locale)} `;
|
|
4555
|
-
});
|
|
4556
|
-
return result.trimEndChar(" ");
|
|
4557
|
-
}
|
|
4558
|
-
function arrayToTitleCase(array, locale) {
|
|
4559
|
-
let result = "";
|
|
4560
|
-
array.forEach((s) => {
|
|
4561
|
-
result += `${s.toLocaleLowerCase(locale).firstCharToUpperCase(locale)} `;
|
|
4562
|
-
});
|
|
4563
|
-
return result.trimEndChar(" ");
|
|
4564
|
-
}
|
|
4565
|
-
String.prototype.similarity = function(comparisonString) {
|
|
4566
|
-
let similarityToReturn = 0;
|
|
4567
|
-
let longerString = this.toLowerCase();
|
|
4568
|
-
let shorterString = comparisonString.toLowerCase();
|
|
4569
|
-
if (longerString < shorterString) {
|
|
4570
|
-
const temp = shorterString;
|
|
4571
|
-
shorterString = longerString;
|
|
4572
|
-
longerString = temp;
|
|
4573
|
-
}
|
|
4574
|
-
const longerLength = longerString.length;
|
|
4575
|
-
if (longerLength === 0) {
|
|
4576
|
-
similarityToReturn = 100;
|
|
4577
|
-
} else {
|
|
4578
|
-
similarityToReturn = Math.round((longerLength - levenshtein(longerString, shorterString)) / longerLength * 100);
|
|
4579
|
-
}
|
|
4580
|
-
return similarityToReturn;
|
|
4581
|
-
};
|
|
4582
|
-
String.prototype.trimChar = function(character) {
|
|
4583
|
-
return this.trimStartChar(character).trimEndChar(character);
|
|
4584
|
-
};
|
|
4585
|
-
String.prototype.trimStartChar = function(character) {
|
|
4586
|
-
return character !== "" && this.startsWith(character) ? this.slice(1) : this;
|
|
4587
|
-
};
|
|
4588
|
-
String.prototype.trimEndChar = function(character) {
|
|
4589
|
-
return character !== "" && this.endsWith(character) ? this.slice(0, -1) : this;
|
|
4590
|
-
};
|
|
4591
|
-
String.prototype.trimToLength = function(length, addEllipsis = false) {
|
|
4592
|
-
const trimLength = this.length < length ? this.length : length;
|
|
4593
|
-
return addEllipsis && trimLength >= 4 && trimLength < this.length ? `${this.slice(0, Math.max(trimLength - 3, 1))}...` : this.slice(0, Math.max(trimLength, 1));
|
|
4594
|
-
};
|
|
4595
|
-
String.prototype.firstCharToUpperCase = function(locale) {
|
|
4596
|
-
return `${this.charAt(0).toLocaleUpperCase(locale)}${this.slice(1)}`;
|
|
4597
|
-
};
|
|
4598
|
-
String.prototype.firstCharToLowerCase = function(locale) {
|
|
4599
|
-
return `${this.charAt(0).toLocaleLowerCase(locale)}${this.slice(1)}`;
|
|
4600
|
-
};
|
|
4601
|
-
String.prototype.removeWhitespace = function() {
|
|
4602
|
-
return this.replace(/\s/g, "");
|
|
4603
|
-
};
|
|
4604
|
-
String.prototype.removeNonAlphanumeric = function() {
|
|
4605
|
-
return this.replace(/[^a-zA-Z0-9]/g, "");
|
|
4606
|
-
};
|
|
4607
|
-
String.prototype.removeNonAlphabetic = function() {
|
|
4608
|
-
return this.replace(/[^a-zA-Z]/g, "");
|
|
4609
|
-
};
|
|
4610
|
-
String.prototype.removeNonNumeric = function() {
|
|
4611
|
-
return this.replace(/[^0-9]/g, "");
|
|
4612
|
-
};
|
|
4613
|
-
String.prototype.replacePlaceholders = function(...args) {
|
|
4614
|
-
let i = 0;
|
|
4615
|
-
return this.replace(/{\d+}/g, () => typeof args[i] !== "undefined" ? args[i++] : "");
|
|
4616
|
-
};
|
|
4617
|
-
String.prototype.camelCaseToKebabCase = function(lowerCase = true, locale) {
|
|
4618
|
-
return arrayToKebabCase(camelCaseToArray(this), lowerCase, locale);
|
|
4619
|
-
};
|
|
4620
|
-
String.prototype.camelCaseToPascalCase = function(locale) {
|
|
4621
|
-
return this.firstCharToUpperCase(locale);
|
|
4622
|
-
};
|
|
4623
|
-
String.prototype.camelCaseToSentenceCase = function(locale) {
|
|
4624
|
-
return arrayToSentenceCase(camelCaseToArray(this), locale);
|
|
4625
|
-
};
|
|
4626
|
-
String.prototype.camelCaseToSnakeCase = function(lowerCase = true, locale) {
|
|
4627
|
-
return this.camelCaseToKebabCase().kebabCaseToSnakeCase(lowerCase, locale);
|
|
4628
|
-
};
|
|
4629
|
-
String.prototype.camelCaseToTitleCase = function(locale) {
|
|
4630
|
-
return arrayToTitleCase(camelCaseToArray(this), locale);
|
|
4631
|
-
};
|
|
4632
|
-
String.prototype.kebabCaseToCamelCase = function(locale) {
|
|
4633
|
-
return arrayToCamelCase(kebabCaseToArray(this), locale);
|
|
4634
|
-
};
|
|
4635
|
-
String.prototype.kebabCaseToPascalCase = function(locale) {
|
|
4636
|
-
return this.kebabCaseToCamelCase().camelCaseToPascalCase(locale);
|
|
4637
|
-
};
|
|
4638
|
-
String.prototype.kebabCaseToSentenceCase = function(locale) {
|
|
4639
|
-
return arrayToSentenceCase(kebabCaseToArray(this), locale);
|
|
4640
|
-
};
|
|
4641
|
-
String.prototype.kebabCaseToSnakeCase = function(lowerCase = true, locale) {
|
|
4642
|
-
const result = this.replace(/-/g, "_");
|
|
4643
|
-
return lowerCase ? result.toLocaleLowerCase(locale) : result.toLocaleUpperCase(locale);
|
|
4644
|
-
};
|
|
4645
|
-
String.prototype.kebabCaseToTitleCase = function(locale) {
|
|
4646
|
-
return arrayToTitleCase(kebabCaseToArray(this), locale);
|
|
4647
|
-
};
|
|
4648
|
-
String.prototype.pascalCaseToCamelCase = function(locale) {
|
|
4649
|
-
return arrayToCamelCase(pascalCaseToArray(this), locale);
|
|
4650
|
-
};
|
|
4651
|
-
String.prototype.pascalCaseToKebabCase = function(lowerCase = true, locale) {
|
|
4652
|
-
return arrayToKebabCase(pascalCaseToArray(this), lowerCase, locale);
|
|
4653
|
-
};
|
|
4654
|
-
String.prototype.pascalCaseToSentenceCase = function(locale) {
|
|
4655
|
-
return arrayToSentenceCase(pascalCaseToArray(this), locale);
|
|
4656
|
-
};
|
|
4657
|
-
String.prototype.pascalCaseToSnakeCase = function(lowerCase = true, locale) {
|
|
4658
|
-
return this.pascalCaseToKebabCase().kebabCaseToSnakeCase(lowerCase, locale);
|
|
4659
|
-
};
|
|
4660
|
-
String.prototype.pascalCaseToTitleCase = function(locale) {
|
|
4661
|
-
return arrayToTitleCase(pascalCaseToArray(this), locale);
|
|
4662
|
-
};
|
|
4663
|
-
String.prototype.sentenceCaseToCamelCase = function(locale) {
|
|
4664
|
-
return arrayToCamelCase(sentenceCaseToArray(this), locale);
|
|
4665
|
-
};
|
|
4666
|
-
String.prototype.sentenceCaseToKebabCase = function(lowerCase = true, locale) {
|
|
4667
|
-
return arrayToKebabCase(sentenceCaseToArray(this), lowerCase, locale);
|
|
4668
|
-
};
|
|
4669
|
-
String.prototype.sentenceCaseToPascalCase = function(locale) {
|
|
4670
|
-
return this.sentenceCaseToCamelCase().camelCaseToPascalCase(locale);
|
|
4671
|
-
};
|
|
4672
|
-
String.prototype.sentenceCaseToSnakeCase = function(lowerCase = true, locale) {
|
|
4673
|
-
return this.sentenceCaseToKebabCase().kebabCaseToSnakeCase(lowerCase, locale);
|
|
4674
|
-
};
|
|
4675
|
-
String.prototype.sentenceCaseToTitleCase = function(locale) {
|
|
4676
|
-
return arrayToTitleCase(sentenceCaseToArray(this), locale);
|
|
4677
|
-
};
|
|
4678
|
-
String.prototype.snakeCaseToCamelCase = function(locale) {
|
|
4679
|
-
return arrayToCamelCase(snakeCaseToArray(this), locale);
|
|
4680
|
-
};
|
|
4681
|
-
String.prototype.snakeCaseToKebabCase = function(lowerCase = true, locale) {
|
|
4682
|
-
const result = this.replace(/_/g, "-");
|
|
4683
|
-
return lowerCase ? result.toLocaleLowerCase(locale) : result.toLocaleUpperCase(locale);
|
|
4684
|
-
};
|
|
4685
|
-
String.prototype.snakeCaseToPascalCase = function(locale) {
|
|
4686
|
-
return this.snakeCaseToCamelCase().camelCaseToPascalCase(locale);
|
|
4687
|
-
};
|
|
4688
|
-
String.prototype.snakeCaseToSentenceCase = function(locale) {
|
|
4689
|
-
return arrayToSentenceCase(snakeCaseToArray(this), locale);
|
|
4690
|
-
};
|
|
4691
|
-
String.prototype.snakeCaseToTitleCase = function(locale) {
|
|
4692
|
-
return arrayToTitleCase(snakeCaseToArray(this), locale);
|
|
4693
|
-
};
|
|
4694
|
-
String.prototype.titleCaseToCamelCase = function(locale) {
|
|
4695
|
-
return arrayToCamelCase(titleCaseToArray(this), locale);
|
|
4696
|
-
};
|
|
4697
|
-
String.prototype.titleCaseToKebabCase = function(lowerCase = true, locale) {
|
|
4698
|
-
return arrayToKebabCase(titleCaseToArray(this), lowerCase, locale);
|
|
4699
|
-
};
|
|
4700
|
-
String.prototype.titleCaseToPascalCase = function(locale) {
|
|
4701
|
-
return this.titleCaseToCamelCase().camelCaseToPascalCase(locale);
|
|
4702
|
-
};
|
|
4703
|
-
String.prototype.titleCaseToSentenceCase = function(locale) {
|
|
4704
|
-
return arrayToSentenceCase(titleCaseToArray(this), locale);
|
|
4705
|
-
};
|
|
4706
|
-
String.prototype.titleCaseToSnakeCase = function(lowerCase = true, locale) {
|
|
4707
|
-
return this.titleCaseToKebabCase().kebabCaseToSnakeCase(lowerCase, locale);
|
|
4708
|
-
};
|
|
4709
|
-
String.prototype.toDateFromTime = function() {
|
|
4710
|
-
return new Date(`${new Date().toISOString().substr(0, 11)}${this}`);
|
|
4711
|
-
};
|
|
4712
|
-
Date.prototype.toLocaleMonthString = function(locale) {
|
|
4713
|
-
return i18n.global.d(this, DateFormat.MONTH_YEAR, locale != null ? locale : i18n.global.locale.value);
|
|
4714
|
-
};
|
|
4715
|
-
Date.prototype.toLocaleTimeStringWithoutMilliseconds = function(locale) {
|
|
4716
|
-
return i18n.global.d(this, DateFormat.TIME, locale != null ? locale : i18n.global.locale.value);
|
|
4717
|
-
};
|
|
4718
|
-
Date.prototype.toLocaleStringWithoutMilliseconds = function(locale) {
|
|
4719
|
-
return i18n.global.d(this, DateFormat.DATETIME, locale != null ? locale : i18n.global.locale.value);
|
|
4720
|
-
};
|
|
4721
4435
|
var main = "";
|
|
4722
4436
|
const install = (app) => {
|
|
4723
4437
|
app.use(i18n);
|
|
@@ -4729,4 +4443,4 @@ const install = (app) => {
|
|
|
4729
4443
|
app.component(name, component);
|
|
4730
4444
|
});
|
|
4731
4445
|
};
|
|
4732
|
-
export { DateFormat, FilterOperation, NumberFormat, buttonColours, buttonSizes, cardSizes, _sfc_main$v as clUiAccordion, clUiAccordionHeader, _sfc_main$u as clUiAccordionItem, _sfc_main$r as clUiApp, _sfc_main$p as clUiButton, _sfc_main$o as clUiCard, _sfc_main$g as clUiComboBox, clUiFooter, clUiGrid, clUiHeader, _sfc_main$7 as clUiHeaderMenu, ClUiInput as clUiInput, _sfc_main$6 as clUiLanguageSwitcher, ClUiLoadingSpinner as clUiLoadingSpinner, _sfc_main$5 as clUiLogin, _sfc_main$k as clUiModal, clUiNavigation, _sfc_main$2 as clUiNavigationGroup, _sfc_main$3 as clUiNavigationIcon, clUiNavigationItem, clUiNavigationSection, _sfc_main$s as clUiNotification,
|
|
4446
|
+
export { DateFormat, FilterOperation, NumberFormat, buttonColours, buttonSizes, cardSizes, _sfc_main$v as clUiAccordion, clUiAccordionHeader, _sfc_main$u as clUiAccordionItem, _sfc_main$r as clUiApp, _sfc_main$p as clUiButton, _sfc_main$o as clUiCard, _sfc_main$g as clUiComboBox, clUiFooter, clUiGrid, clUiHeader, _sfc_main$7 as clUiHeaderMenu, ClUiInput as clUiInput, _sfc_main$6 as clUiLanguageSwitcher, ClUiLoadingSpinner as clUiLoadingSpinner, _sfc_main$5 as clUiLogin, _sfc_main$k as clUiModal, clUiNavigation, _sfc_main$2 as clUiNavigationGroup, _sfc_main$3 as clUiNavigationIcon, clUiNavigationItem, clUiNavigationSection, _sfc_main$s as clUiNotification, datetimeFormats, install as default, filterMethodTypes, gridColumnTypes, i18n, inputTypes, isComboBoxCreateRequest, isComboBoxItem, isFilterRequest, isFilterResponse, isGridColumn, isGridColumnArray, isLanguageArray, isLanguageLocaleFormat, messages, modalColours, modalSizes, numberFormats, setCurrentLocale, setLocaleDateTimeFormats, setLocaleMessages, setLocaleNumberFormats, showNotification, stringFormats, validateEmail, validateMaxValue, validateMinValue };
|