@ironsource/shared-ui 1.4.1-rc.2 → 1.4.1-rc.3
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/AppTrigger.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Dialog.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/README.md +11 -6
- package/components/appTrigger/AppTrigger.vue.d.ts +5 -0
- package/components/appTrigger/AppTrigger.vue.js +16 -5
- package/components/appTrigger/index.d.ts +11 -0
- package/components/dialog/Dialog.vue.js +5 -4
- package/index.vue.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.label[data-v-
|
|
1
|
+
.label[data-v-3e9cc534]{color:#41454d}.app-trigger[data-v-3e9cc534]{cursor:pointer;background-color:#fff;border:1px solid #DDDFE1;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:.5rem;position:relative;padding:.5625rem .9375rem .5625rem .5625rem}.app-trigger--with-icons[data-v-3e9cc534]{gap:.25rem}.app-trigger__left-image[data-v-3e9cc534]{width:2rem;height:2rem;align-self:center;color:#53575b}.app-trigger__left-icon[data-v-3e9cc534]{color:#8e959d}.app-trigger__middle-section[data-v-3e9cc534]{overflow:hidden;gap:.25rem;display:flex;height:2.5rem;justify-content:center;align-items:stretch;flex-direction:column;width:10.5rem}.app-trigger__middle-section--single[data-v-3e9cc534]{width:9.5rem}.app-trigger__middle-section--loading[data-v-3e9cc534]{gap:0}.app-trigger__description[data-v-3e9cc534]{color:#7b838c}.app-trigger__right-icon[data-v-3e9cc534]{right:1rem;top:calc(50% - 14px);position:absolute}.title[data-v-3e9cc534]{color:#41454d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.label[data-v-
|
|
1
|
+
.label[data-v-3f6d9c46]{color:#41454d}.v-enter-active[data-v-3f6d9c46],.v-leave-active[data-v-3f6d9c46]{transition:opacity .25s ease}.v-enter-from[data-v-3f6d9c46],.v-leave-to[data-v-3f6d9c46]{opacity:0}.container[data-v-3f6d9c46]{position:fixed;z-index:1300;display:flex;align-items:center;justify-content:center;inset:0}.placeholder[data-v-3f6d9c46]{width:100%;padding:24px 38px;height:53px;display:flex;text-align:center;align-items:center;justify-content:center;color:#8e959d;background:#F1F3F4}.modal[data-v-3f6d9c46]{min-height:7rem;overflow-y:auto;width:var(--147c2223);box-shadow:0 32px 32px -8px #00000014,0 0 32px -8px #0000001f;max-height:calc(100% - 64px);background:#FFFFFF;border:1px solid #DDDFE1;border-radius:1rem}.header--secondary[data-v-3f6d9c46]{padding:0 1.5rem}.header[data-v-3f6d9c46]{padding:1rem 1.5rem 0}.header--bordered[data-v-3f6d9c46]{padding:1rem 1.5rem;border-bottom:1px solid #DDDFE1}.header[data-v-3f6d9c46]{display:flex;align-items:center;width:100%;color:#53575b}.close-button[data-v-3f6d9c46]{margin-left:auto;color:#d2d5d8}.content[data-v-3f6d9c46]{padding:1rem 1.5rem 1.5rem;display:flex;overflow-y:auto;flex-direction:column;justify-content:center}.content--bordered[data-v-3f6d9c46]{padding:1.5rem}.footer[data-v-3f6d9c46]{height:30%;width:100%;border-top:1px solid #DDDFE1;display:flex;align-items:center}.action-buttons[data-v-3f6d9c46]{margin-left:auto;padding:1rem 1.5rem;display:flex}.action-buttons[data-v-3f6d9c46] .button-wrap:first-child{margin-right:.25rem}.backdrop[data-v-3f6d9c46]{position:fixed;z-index:-1;display:flex;background-color:#0000008f;align-items:center;justify-content:center;inset:0}
|
package/README.md
CHANGED
|
@@ -21,10 +21,9 @@ To release a pre-release version, follow these steps:
|
|
|
21
21
|
5. Push your changes
|
|
22
22
|
6. Create a PR from your branch to `release/x.x.x` branch
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
### Breaking Change
|
|
24
|
+
Running `pre-release.yml` workflow will create a pre-release (-rc.xx) version and publish it to npm
|
|
27
25
|
|
|
26
|
+
### Release
|
|
28
27
|
|
|
29
28
|
To release a new version of the package (due to breaking changes), you need to follow the next steps:
|
|
30
29
|
1. Create a new branch from `main` branch with the name `release/x.x.x` (x.x.x - version of the package)
|
|
@@ -36,9 +35,8 @@ To release a new version of the package (due to breaking changes), you need to f
|
|
|
36
35
|
7. Add reviewers
|
|
37
36
|
8. Merge the PR to `release/x.x.x` branch
|
|
38
37
|
9. Create a new PR from `release/x.x.x` branch to `main` branch
|
|
39
|
-
10.
|
|
40
|
-
|
|
41
|
-
Merging release/x.x.x branch to main branch will trigger `release.yml` workflow and will create a new(not RC) version of the package.
|
|
38
|
+
10. When you changes will ready to the release, run `release.yml` workflow it will create a new last release version and publish it to npm
|
|
39
|
+
11. Merge the PR to `main` branch
|
|
42
40
|
|
|
43
41
|
## Testing
|
|
44
42
|
Uses Vitest + Vue Test Utils (runs automatically on commit)
|
|
@@ -65,6 +63,13 @@ Start storybook:
|
|
|
65
63
|
npm run storybook
|
|
66
64
|
```
|
|
67
65
|
|
|
66
|
+
## Storybook deployment
|
|
67
|
+
|
|
68
|
+
You can publish your branch to storybook by running "Deploy Docs" (`storybook.yml`) workflow with your branch.
|
|
69
|
+
It will build and publish your branch stories. That you can check by entering this URL:
|
|
70
|
+
https://mobile-shared-ui.ironsrc.mobi/branch_your-branch-name/
|
|
71
|
+
|
|
72
|
+
|
|
68
73
|
## Linking for local development in another project
|
|
69
74
|
When developing locally, you can link to the shared-ui library:
|
|
70
75
|
```
|
|
@@ -3,22 +3,27 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
3
3
|
selected?: Application[];
|
|
4
4
|
options?: Application[];
|
|
5
5
|
loading?: boolean;
|
|
6
|
+
singleAppSelection?: boolean;
|
|
6
7
|
}>, {
|
|
7
8
|
selected: any;
|
|
8
9
|
options: any;
|
|
9
10
|
loading: boolean;
|
|
11
|
+
singleAppSelection: boolean;
|
|
10
12
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
11
13
|
selected?: Application[];
|
|
12
14
|
options?: Application[];
|
|
13
15
|
loading?: boolean;
|
|
16
|
+
singleAppSelection?: boolean;
|
|
14
17
|
}>, {
|
|
15
18
|
selected: any;
|
|
16
19
|
options: any;
|
|
17
20
|
loading: boolean;
|
|
21
|
+
singleAppSelection: boolean;
|
|
18
22
|
}>>>, {
|
|
19
23
|
loading: boolean;
|
|
20
24
|
selected: Application[];
|
|
21
25
|
options: Application[];
|
|
26
|
+
singleAppSelection: boolean;
|
|
22
27
|
}>;
|
|
23
28
|
export default _default;
|
|
24
29
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createElementVNode, createBlock, createCommentVNode, createVNode, withCtx, createTextVNode, toDisplayString } from 'vue';
|
|
2
|
+
import AppIcon from '../appIcon/AppIcon.vue.js';
|
|
2
3
|
import Icon from '../icon/Icon.vue.js';
|
|
3
4
|
/* empty css */import _export_sfc from '../../_virtual/plugin-vue_export-helper.vue.js';
|
|
4
5
|
import Text from '../typography/Text.vue.js';
|
|
5
6
|
/* empty css *//* empty css */import IconButton from '../button/IconButton.vue.js';
|
|
6
7
|
import _sfc_main$1 from '../tooltip/Tooltip.vue.js';
|
|
7
|
-
/* empty css
|
|
8
|
-
/* empty css */
|
|
8
|
+
/* empty css *//* empty css */
|
|
9
9
|
import "../../AppTrigger.vue_vue_type_style_index_0_scoped_true_lang.css";
|
|
10
10
|
const _hoisted_1 = { class: "app-trigger__left-image" };
|
|
11
11
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -13,12 +13,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
13
|
props: {
|
|
14
14
|
selected: { default: null },
|
|
15
15
|
options: { default: null },
|
|
16
|
-
loading: { type: Boolean, default: false }
|
|
16
|
+
loading: { type: Boolean, default: false },
|
|
17
|
+
singleAppSelection: { type: Boolean, default: false }
|
|
17
18
|
},
|
|
18
19
|
setup(__props) {
|
|
19
20
|
const props = __props;
|
|
20
21
|
const allTitle = "All apps selected";
|
|
22
|
+
const NoAppsTitle = "No apps to select";
|
|
21
23
|
const title = computed(() => {
|
|
24
|
+
if (props.singleAppSelection && noApp.value) {
|
|
25
|
+
return NoAppsTitle;
|
|
26
|
+
}
|
|
27
|
+
if (props.singleAppSelection && singleApp.value) {
|
|
28
|
+
return `${firstSelection.value?.name}`;
|
|
29
|
+
}
|
|
22
30
|
if (allMode.value) {
|
|
23
31
|
return allTitle;
|
|
24
32
|
}
|
|
@@ -28,7 +36,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
28
36
|
return `${selectedSize.value} apps selected`;
|
|
29
37
|
});
|
|
30
38
|
const osIcon = computed(() => {
|
|
31
|
-
if (!allMode.value) {
|
|
39
|
+
if (!allMode.value || props.singleAppSelection && singleApp.value) {
|
|
32
40
|
return firstSelection.value.platform.toLowerCase();
|
|
33
41
|
}
|
|
34
42
|
return null;
|
|
@@ -63,6 +71,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
63
71
|
const singleApp = computed(() => {
|
|
64
72
|
return selectedSize.value === 1;
|
|
65
73
|
});
|
|
74
|
+
const noApp = computed(() => {
|
|
75
|
+
return optionsSize.value === 0;
|
|
76
|
+
});
|
|
66
77
|
const allMode = computed(() => {
|
|
67
78
|
return props.loading || optionsSize.value === selectedSize.value || !selectedSize.value;
|
|
68
79
|
});
|
|
@@ -164,6 +175,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
164
175
|
};
|
|
165
176
|
}
|
|
166
177
|
});
|
|
167
|
-
var AppTrigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
178
|
+
var AppTrigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3e9cc534"]]);
|
|
168
179
|
|
|
169
180
|
export { AppTrigger as default };
|
|
@@ -14,6 +14,11 @@ declare const AppTriggerTypes: () => import("vue").DefineComponent<{
|
|
|
14
14
|
} & {
|
|
15
15
|
default: any;
|
|
16
16
|
};
|
|
17
|
+
singleAppSelection: {
|
|
18
|
+
type: import("vue").PropType<boolean>;
|
|
19
|
+
} & {
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
17
22
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
23
|
loading: {
|
|
19
24
|
type: import("vue").PropType<boolean>;
|
|
@@ -30,10 +35,16 @@ declare const AppTriggerTypes: () => import("vue").DefineComponent<{
|
|
|
30
35
|
} & {
|
|
31
36
|
default: any;
|
|
32
37
|
};
|
|
38
|
+
singleAppSelection: {
|
|
39
|
+
type: import("vue").PropType<boolean>;
|
|
40
|
+
} & {
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
33
43
|
}>>, {
|
|
34
44
|
loading: boolean;
|
|
35
45
|
selected: import("./AppTrigger.vue.__VLS_script").__VLS_types_Application[];
|
|
36
46
|
options: import("./AppTrigger.vue.__VLS_script").__VLS_types_Application[];
|
|
47
|
+
singleAppSelection: boolean;
|
|
37
48
|
}>[];
|
|
38
49
|
export { default as AppTrigger } from './AppTrigger.vue';
|
|
39
50
|
export { AppTriggerTypes };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useCssVars, ref, watch, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, unref, normalizeClass, createElementVNode, withKeys, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementBlock } from 'vue';
|
|
1
|
+
import { defineComponent, useCssVars, ref, watch, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, unref, normalizeClass, createElementVNode, normalizeStyle, withKeys, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementBlock } from 'vue';
|
|
2
2
|
import { UseFocusTrap } from '@vueuse/integrations/useFocusTrap/component';
|
|
3
3
|
import { useTimeoutFn } from '@vueuse/core';
|
|
4
4
|
import Text from '../typography/Text.vue.js';
|
|
@@ -41,7 +41,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
41
|
setup(__props, { emit }) {
|
|
42
42
|
const props = __props;
|
|
43
43
|
useCssVars((_ctx) => ({
|
|
44
|
-
"
|
|
44
|
+
"147c2223": __props.width
|
|
45
45
|
}));
|
|
46
46
|
const visible = ref(false);
|
|
47
47
|
let openTimer = void 0;
|
|
@@ -116,6 +116,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
116
116
|
default: withCtx(() => [
|
|
117
117
|
createElementVNode("div", {
|
|
118
118
|
class: "modal",
|
|
119
|
+
style: normalizeStyle({ width: __props.width }),
|
|
119
120
|
onKeydown: _cache[1] || (_cache[1] = withKeys(($event) => __props.escapeToClose ? handleClose(unref(Reason).Escape) : unref(NOOP)(), ["esc"]))
|
|
120
121
|
}, [
|
|
121
122
|
createElementVNode("header", {
|
|
@@ -169,7 +170,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
169
170
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
170
171
|
])
|
|
171
172
|
])) : createCommentVNode("", true)
|
|
172
|
-
],
|
|
173
|
+
], 36),
|
|
173
174
|
__props.showBackdrop ? (openBlock(), createElementBlock("div", {
|
|
174
175
|
key: 0,
|
|
175
176
|
class: "backdrop",
|
|
@@ -185,6 +186,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
185
186
|
};
|
|
186
187
|
}
|
|
187
188
|
});
|
|
188
|
-
var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
189
|
+
var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3f6d9c46"]]);
|
|
189
190
|
|
|
190
191
|
export { Dialog as default };
|
package/index.vue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './Table.vue_vue_type_style_index_1_lang.css';
|
|
2
2
|
export { AppTriggerTypes } from './components/appTrigger/index.vue.js';
|
|
3
3
|
export { AutocompleteDropdownTypes } from './components/autocompleteDropdown/index.vue.js';
|
|
4
4
|
export { MenuItemTypes } from './components/menuItem/index.vue.js';
|