@eturnity/eturnity_reusable_components 8.22.23-EPDM-13618.0 → 8.22.23-EPDM-13618.1
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/main.es12.js +2 -2
- package/dist/main.es13.js +3 -3
- package/dist/main.es14.js +2 -2
- package/dist/main.es15.js +221 -21
- package/dist/main.es16.js +56 -1048
- package/dist/main.es17.js +193 -221
- package/dist/main.es18.js +21 -96
- package/dist/main.es19.js +1056 -2
- package/dist/main.es20.js +184 -498
- package/dist/main.es21.js +94 -194
- package/dist/main.es22.js +2 -224
- package/dist/main.es23.js +536 -59
- package/dist/main.es24.js +2 -2
- package/dist/main.es375.js +1 -1
- package/dist/main.es377.js +21 -60
- package/dist/main.es378.js +60 -21
- package/dist/main.es5.js +3 -3
- package/dist/main.es6.js +4 -4
- package/dist/main.es9.js +1 -1
- package/package.json +1 -1
- package/src/components/dropdown/defaultProps.js +2 -2
- package/src/components/dropdown/dropdown.spec.js +55 -0
- package/src/components/dropdown/index.vue +11 -2
- package/src/components/progressBar/defaultProps.js +2 -2
- package/src/components/progressBar/index.vue +14 -3
- package/src/components/progressBar/progressBar.spec.js +52 -0
package/dist/main.es377.js
CHANGED
@@ -1,64 +1,25 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
let supported;
|
2
|
+
let perf;
|
3
|
+
function isPerformanceSupported() {
|
4
|
+
var _a;
|
5
|
+
if (supported !== void 0) {
|
6
|
+
return supported;
|
6
7
|
}
|
7
|
-
|
8
|
+
if (typeof window !== "undefined" && window.performance) {
|
9
|
+
supported = true;
|
10
|
+
perf = window.performance;
|
11
|
+
} else if (typeof globalThis !== "undefined" && ((_a = globalThis.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {
|
12
|
+
supported = true;
|
13
|
+
perf = globalThis.perf_hooks.performance;
|
14
|
+
} else {
|
15
|
+
supported = false;
|
16
|
+
}
|
17
|
+
return supported;
|
18
|
+
}
|
19
|
+
function now() {
|
20
|
+
return isPerformanceSupported() ? perf.now() : Date.now();
|
8
21
|
}
|
9
|
-
!!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
|
10
|
-
!!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
|
11
|
-
const NOOP = () => {
|
12
|
-
};
|
13
|
-
const extend = Object.assign;
|
14
|
-
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
15
|
-
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
16
|
-
const isArray = Array.isArray;
|
17
|
-
const isMap = (val) => toTypeString(val) === "[object Map]";
|
18
|
-
const isFunction = (val) => typeof val === "function";
|
19
|
-
const isString = (val) => typeof val === "string";
|
20
|
-
const isSymbol = (val) => typeof val === "symbol";
|
21
|
-
const isObject = (val) => val !== null && typeof val === "object";
|
22
|
-
const objectToString = Object.prototype.toString;
|
23
|
-
const toTypeString = (value) => objectToString.call(value);
|
24
|
-
const toRawType = (value) => {
|
25
|
-
return toTypeString(value).slice(8, -1);
|
26
|
-
};
|
27
|
-
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
28
|
-
const cacheStringFunction = (fn) => {
|
29
|
-
const cache = /* @__PURE__ */ Object.create(null);
|
30
|
-
return (str) => {
|
31
|
-
const hit = cache[str];
|
32
|
-
return hit || (cache[str] = fn(str));
|
33
|
-
};
|
34
|
-
};
|
35
|
-
const capitalize = cacheStringFunction(
|
36
|
-
(str) => str.charAt(0).toUpperCase() + str.slice(1)
|
37
|
-
);
|
38
|
-
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
39
|
-
const def = (obj, key, value) => {
|
40
|
-
Object.defineProperty(obj, key, {
|
41
|
-
configurable: true,
|
42
|
-
enumerable: false,
|
43
|
-
value
|
44
|
-
});
|
45
|
-
};
|
46
22
|
export {
|
47
|
-
|
48
|
-
|
49
|
-
def,
|
50
|
-
extend,
|
51
|
-
hasChanged,
|
52
|
-
hasOwn,
|
53
|
-
isArray,
|
54
|
-
isFunction,
|
55
|
-
isIntegerKey,
|
56
|
-
isMap,
|
57
|
-
isObject,
|
58
|
-
isString,
|
59
|
-
isSymbol,
|
60
|
-
makeMap,
|
61
|
-
objectToString,
|
62
|
-
toRawType,
|
63
|
-
toTypeString
|
23
|
+
isPerformanceSupported,
|
24
|
+
now
|
64
25
|
};
|
package/dist/main.es378.js
CHANGED
@@ -1,25 +1,64 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
return supported;
|
1
|
+
function makeMap(str, expectsLowerCase) {
|
2
|
+
const map = /* @__PURE__ */ Object.create(null);
|
3
|
+
const list = str.split(",");
|
4
|
+
for (let i = 0; i < list.length; i++) {
|
5
|
+
map[list[i]] = true;
|
7
6
|
}
|
8
|
-
|
9
|
-
supported = true;
|
10
|
-
perf = window.performance;
|
11
|
-
} else if (typeof globalThis !== "undefined" && ((_a = globalThis.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {
|
12
|
-
supported = true;
|
13
|
-
perf = globalThis.perf_hooks.performance;
|
14
|
-
} else {
|
15
|
-
supported = false;
|
16
|
-
}
|
17
|
-
return supported;
|
18
|
-
}
|
19
|
-
function now() {
|
20
|
-
return isPerformanceSupported() ? perf.now() : Date.now();
|
7
|
+
return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
|
21
8
|
}
|
9
|
+
!!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
|
10
|
+
!!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
|
11
|
+
const NOOP = () => {
|
12
|
+
};
|
13
|
+
const extend = Object.assign;
|
14
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
15
|
+
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
16
|
+
const isArray = Array.isArray;
|
17
|
+
const isMap = (val) => toTypeString(val) === "[object Map]";
|
18
|
+
const isFunction = (val) => typeof val === "function";
|
19
|
+
const isString = (val) => typeof val === "string";
|
20
|
+
const isSymbol = (val) => typeof val === "symbol";
|
21
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
22
|
+
const objectToString = Object.prototype.toString;
|
23
|
+
const toTypeString = (value) => objectToString.call(value);
|
24
|
+
const toRawType = (value) => {
|
25
|
+
return toTypeString(value).slice(8, -1);
|
26
|
+
};
|
27
|
+
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
28
|
+
const cacheStringFunction = (fn) => {
|
29
|
+
const cache = /* @__PURE__ */ Object.create(null);
|
30
|
+
return (str) => {
|
31
|
+
const hit = cache[str];
|
32
|
+
return hit || (cache[str] = fn(str));
|
33
|
+
};
|
34
|
+
};
|
35
|
+
const capitalize = cacheStringFunction(
|
36
|
+
(str) => str.charAt(0).toUpperCase() + str.slice(1)
|
37
|
+
);
|
38
|
+
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
39
|
+
const def = (obj, key, value) => {
|
40
|
+
Object.defineProperty(obj, key, {
|
41
|
+
configurable: true,
|
42
|
+
enumerable: false,
|
43
|
+
value
|
44
|
+
});
|
45
|
+
};
|
22
46
|
export {
|
23
|
-
|
24
|
-
|
47
|
+
NOOP,
|
48
|
+
capitalize,
|
49
|
+
def,
|
50
|
+
extend,
|
51
|
+
hasChanged,
|
52
|
+
hasOwn,
|
53
|
+
isArray,
|
54
|
+
isFunction,
|
55
|
+
isIntegerKey,
|
56
|
+
isMap,
|
57
|
+
isObject,
|
58
|
+
isString,
|
59
|
+
isSymbol,
|
60
|
+
makeMap,
|
61
|
+
objectToString,
|
62
|
+
toRawType,
|
63
|
+
toTypeString
|
25
64
|
};
|
package/dist/main.es5.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { isRuntimeOnly, warn, createRenderer, callWithAsyncErrorHandling } from "./main.es6.js";
|
2
2
|
import { Comment, Fragment, Static, Teleport, Text, callWithErrorHandling, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createStaticVNode, createTextVNode, createVNode, defineComponent, devtools, getCurrentInstance, guardReactiveProps, h, handleError, initCustomFormatter, inject, isVNode, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, provide, queuePostFlushCb, renderList, renderSlot, resolveComponent, resolveDynamicComponent, setBlockTracking, setDevtoolsHook, ssrContextKey, useSSRContext, version, watch, watchEffect, withCtx, withDirectives } from "./main.es6.js";
|
3
|
-
import { isFunction, isHTMLTag, isSVGTag, isString, looseToNumber, isArray, invokeArrayFns, hyphenate, extend, isOn, isModelListener, capitalize, isSpecialBooleanAttr, includeBooleanAttr } from "./main.
|
4
|
-
import { camelize } from "./main.
|
5
|
-
import { capitalize as capitalize2, normalizeClass, normalizeStyle, toDisplayString, toHandlerKey } from "./main.
|
3
|
+
import { isFunction, isHTMLTag, isSVGTag, isString, looseToNumber, isArray, invokeArrayFns, hyphenate, extend, isOn, isModelListener, capitalize, isSpecialBooleanAttr, includeBooleanAttr } from "./main.es16.js";
|
4
|
+
import { camelize } from "./main.es17.js";
|
5
|
+
import { capitalize as capitalize2, normalizeClass, normalizeStyle, toDisplayString, toHandlerKey } from "./main.es17.js";
|
6
6
|
const svgNS = "http://www.w3.org/2000/svg";
|
7
7
|
const doc = typeof document !== "undefined" ? document : null;
|
8
8
|
const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
|
package/dist/main.es6.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { isRef, toRaw, getCurrentScope, isShallow as isShallow$1, isReactive, ReactiveEffect, isProxy, computed as computed$1, pauseTracking, resetTracking, isReadonly, track, proxyRefs, markRaw, shallowReadonly, EffectScope, reactive, shallowReactive, trigger } from "./main.
|
2
|
-
import { readonly, ref, shallowRef, unref } from "./main.
|
3
|
-
import { isString, isFunction, getGlobalThis, isArray, NOOP, EMPTY_OBJ, normalizeClass, isObject, extend, normalizeStyle, isOn, isPromise, hasChanged, remove, isSet, isMap, isPlainObject, camelize, capitalize, toHandlerKey, hasOwn, EMPTY_ARR, NO, isBuiltInDirective, isReservedProp, invokeArrayFns, makeMap, looseToNumber, hyphenate, def, toRawType, isModelListener } from "./main.
|
4
|
-
import { toDisplayString } from "./main.
|
1
|
+
import { isRef, toRaw, getCurrentScope, isShallow as isShallow$1, isReactive, ReactiveEffect, isProxy, computed as computed$1, pauseTracking, resetTracking, isReadonly, track, proxyRefs, markRaw, shallowReadonly, EffectScope, reactive, shallowReactive, trigger } from "./main.es19.js";
|
2
|
+
import { readonly, ref, shallowRef, unref } from "./main.es19.js";
|
3
|
+
import { isString, isFunction, getGlobalThis, isArray, NOOP, EMPTY_OBJ, normalizeClass, isObject, extend, normalizeStyle, isOn, isPromise, hasChanged, remove, isSet, isMap, isPlainObject, camelize, capitalize, toHandlerKey, hasOwn, EMPTY_ARR, NO, isBuiltInDirective, isReservedProp, invokeArrayFns, makeMap, looseToNumber, hyphenate, def, toRawType, isModelListener } from "./main.es17.js";
|
4
|
+
import { toDisplayString } from "./main.es17.js";
|
5
5
|
const stack = [];
|
6
6
|
function pushWarningContext(vnode) {
|
7
7
|
stack.push(vnode);
|
package/dist/main.es9.js
CHANGED
package/package.json
CHANGED
@@ -0,0 +1,55 @@
|
|
1
|
+
import { mount } from '@vue/test-utils'
|
2
|
+
import RCDropdown from '@/components/dropdown'
|
3
|
+
import defaultProps from './defaultProps'
|
4
|
+
import theme from '@/assets/theme'
|
5
|
+
|
6
|
+
jest.mock('@/components/icon/iconCache.mjs', () => ({
|
7
|
+
// need to mock this due to how jest handles import.meta
|
8
|
+
fetchIcon: jest.fn(() => Promise.resolve('mocked-icon-url.svg')),
|
9
|
+
}))
|
10
|
+
|
11
|
+
describe('dropdown/index.vue', () => {
|
12
|
+
it('dropdown is rendered with correct trigger text', async () => {
|
13
|
+
const wrapper = mount(RCDropdown, {
|
14
|
+
props: { ...defaultProps },
|
15
|
+
slots: { ...defaultProps },
|
16
|
+
global: {
|
17
|
+
provide: {
|
18
|
+
theme,
|
19
|
+
},
|
20
|
+
},
|
21
|
+
})
|
22
|
+
|
23
|
+
const dropdownTrigger = wrapper.find('[data-test-id="dropdown_trigger"]')
|
24
|
+
|
25
|
+
expect(dropdownTrigger.exists()).toBe(true)
|
26
|
+
expect(dropdownTrigger.text()).toContain(defaultProps.trigger)
|
27
|
+
})
|
28
|
+
|
29
|
+
it('dropdown opens on click only', async () => {
|
30
|
+
const wrapper = mount(RCDropdown, {
|
31
|
+
props: { ...defaultProps, openingMode: 'click' },
|
32
|
+
slots: { ...defaultProps },
|
33
|
+
global: {
|
34
|
+
provide: {
|
35
|
+
theme,
|
36
|
+
},
|
37
|
+
},
|
38
|
+
})
|
39
|
+
|
40
|
+
const dropdownTrigger = wrapper.find('[data-test-id="dropdown_trigger"]')
|
41
|
+
const dropdownDropdownWrapper = wrapper.find(
|
42
|
+
'[data-test-id="dropdown_dropdown_wrapper"]'
|
43
|
+
)
|
44
|
+
|
45
|
+
expect(dropdownDropdownWrapper.classes('openDropdown')).toBe(false)
|
46
|
+
|
47
|
+
await dropdownTrigger.trigger('hover')
|
48
|
+
|
49
|
+
expect(dropdownDropdownWrapper.classes('openDropdown')).toBe(false)
|
50
|
+
|
51
|
+
await dropdownTrigger.trigger('click')
|
52
|
+
|
53
|
+
expect(dropdownDropdownWrapper.classes('openDropdown')).toBe(true)
|
54
|
+
})
|
55
|
+
})
|
@@ -1,17 +1,26 @@
|
|
1
1
|
<template>
|
2
|
-
<Wrapper
|
3
|
-
|
2
|
+
<Wrapper
|
3
|
+
data-test-id="dropdown_wrapper"
|
4
|
+
ref="dropdown"
|
5
|
+
:opening-mode="openingMode"
|
6
|
+
>
|
7
|
+
<WrapperButton
|
8
|
+
data-test-id="dropdown_trigger"
|
9
|
+
@click="toggleIsOpenByClick(!isOpenByClick)"
|
10
|
+
>
|
4
11
|
<slot name="trigger"></slot>
|
5
12
|
</WrapperButton>
|
6
13
|
<WrapperDropdown
|
7
14
|
:background-color="backgroundColor"
|
8
15
|
class="dropdown-content"
|
9
16
|
:class="{ openDropdown: isOpenByClick && openingMode === 'click' }"
|
17
|
+
data-test-id="dropdown_dropdown_wrapper"
|
10
18
|
:justify="justify"
|
11
19
|
:width="width"
|
12
20
|
>
|
13
21
|
<DropdownWindow
|
14
22
|
:background-color="backgroundColor"
|
23
|
+
data-test-id="dropdown_dropdown_content"
|
15
24
|
:gap="gap"
|
16
25
|
:width="width"
|
17
26
|
>
|
@@ -1,9 +1,20 @@
|
|
1
1
|
<template>
|
2
2
|
<Container>
|
3
|
-
<ProgressContainer
|
4
|
-
|
3
|
+
<ProgressContainer
|
4
|
+
:app-theme="appTheme"
|
5
|
+
data-test-id="progress_bar_container"
|
6
|
+
>
|
7
|
+
<ProgressFill
|
8
|
+
:app-theme="appTheme"
|
9
|
+
data-test-id="progress_bar_progress"
|
10
|
+
:fill-progress="fillProgress"
|
11
|
+
/>
|
5
12
|
</ProgressContainer>
|
6
|
-
<LabelText
|
13
|
+
<LabelText
|
14
|
+
v-if="labelText"
|
15
|
+
:app-theme="appTheme"
|
16
|
+
data-test-id="progress_bar_label"
|
17
|
+
>
|
7
18
|
{{ labelText }}
|
8
19
|
</LabelText>
|
9
20
|
</Container>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import { mount } from '@vue/test-utils'
|
2
|
+
import RCProgressBar from '@/components/progressBar'
|
3
|
+
import defaultProps from './defaultProps'
|
4
|
+
import theme from '@/assets/theme'
|
5
|
+
|
6
|
+
jest.mock('@/components/icon/iconCache.mjs', () => ({
|
7
|
+
// need to mock this due to how jest handles import.meta
|
8
|
+
fetchIcon: jest.fn(() => Promise.resolve('mocked-icon-url.svg')),
|
9
|
+
}))
|
10
|
+
|
11
|
+
describe('progressBar/index.vue', () => {
|
12
|
+
it('progress bar is rendered with correct props', async () => {
|
13
|
+
const labelText = 'test_label_text'
|
14
|
+
|
15
|
+
const wrapper = mount(RCProgressBar, {
|
16
|
+
props: { ...defaultProps, labelText },
|
17
|
+
global: {
|
18
|
+
provide: {
|
19
|
+
theme,
|
20
|
+
},
|
21
|
+
},
|
22
|
+
})
|
23
|
+
|
24
|
+
const progressBarProgress = wrapper.find(
|
25
|
+
'[data-test-id="progress_bar_progress"]'
|
26
|
+
)
|
27
|
+
const progressBarLabel = wrapper.find('[data-test-id="progress_bar_label"]')
|
28
|
+
|
29
|
+
expect(wrapper.vm.fillProgress).toBe(defaultProps.fillProgress)
|
30
|
+
expect(progressBarProgress.exists()).toBe(true)
|
31
|
+
expect(progressBarLabel.exists()).toBe(true)
|
32
|
+
|
33
|
+
expect(progressBarLabel.text()).toContain(labelText)
|
34
|
+
})
|
35
|
+
|
36
|
+
it('progress bar progress changes', async () => {
|
37
|
+
const wrapper = mount(RCProgressBar, {
|
38
|
+
props: {},
|
39
|
+
global: {
|
40
|
+
provide: {
|
41
|
+
theme,
|
42
|
+
},
|
43
|
+
},
|
44
|
+
})
|
45
|
+
|
46
|
+
expect(wrapper.vm.fillProgress).toBe(0)
|
47
|
+
|
48
|
+
await wrapper.setProps({ fillProgress: defaultProps.fillProgress })
|
49
|
+
|
50
|
+
expect(wrapper.vm.fillProgress).toBe(defaultProps.fillProgress)
|
51
|
+
})
|
52
|
+
})
|