@tekkare/auriga 0.1.43 → 0.1.45

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/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.1.43"
7
+ "version": "0.1.45"
8
8
  }
@@ -18,13 +18,19 @@
18
18
  @click="send()"
19
19
  >
20
20
  <span :class="{ oip_button_is_loading: loading }" class="oip_button_flex">
21
- <span v-if="prefixIcon">
22
- <arg-icon :name="prefixIcon" size="20" :color="getIconColor" />
23
- </span>
21
+ <arg-icon
22
+ v-if="prefixIcon"
23
+ :name="prefixIcon"
24
+ size="20"
25
+ :color="getIconColor"
26
+ />
24
27
  <slot></slot>
25
- <span v-if="suffixIcon">
26
- <arg-icon :name="suffixIcon" size="20" :color="getIconColor" />
27
- </span>
28
+ <arg-icon
29
+ v-if="suffixIcon"
30
+ :name="suffixIcon"
31
+ size="20"
32
+ :color="getIconColor"
33
+ />
28
34
  </span>
29
35
  <span class="oip_button_loading" v-if="loading">
30
36
  <div class="oip_button_spinner">
@@ -3,7 +3,11 @@
3
3
  <div :class="sidebarOpen ? 'arg_main_with_sidebar' : 'arg_main_no_sidebar'">
4
4
  <slot name="sidebar" />
5
5
  <div class="arg_main_layout_body">
6
- <div class="arg_info" id="arg_info_section">
6
+ <div
7
+ class="arg_info"
8
+ :class="infoOpen ? 'arg_info_open' : 'arg_info_closed'"
9
+ id="arg_info_section"
10
+ >
7
11
  <slot name="infoBar" />
8
12
  <slot name="infoSection" />
9
13
  </div>
@@ -29,6 +33,10 @@ export default defineComponent({
29
33
  sidebarOpen: {
30
34
  type: Boolean,
31
35
  default: true
36
+ },
37
+ infoOpen: {
38
+ type: Boolean,
39
+ default: false
32
40
  }
33
41
  },
34
42
  setup() {
@@ -81,6 +89,12 @@ export default defineComponent({
81
89
  .arg_info {
82
90
  position: fixed;
83
91
  right: 8px;
84
- z-index: 98;
92
+ }
93
+
94
+ .arg_info_open {
95
+ z-index: 99;
96
+ }
97
+ .arg_info_closed {
98
+ z-index: 95;
85
99
  }
86
100
  </style>
@@ -3,12 +3,21 @@ declare const _default: import("vue").DefineComponent<{
3
3
  type: BooleanConstructor;
4
4
  default: boolean;
5
5
  };
6
+ infoOpen: {
7
+ type: BooleanConstructor;
8
+ default: boolean;
9
+ };
6
10
  }, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
11
  sidebarOpen: {
8
12
  type: BooleanConstructor;
9
13
  default: boolean;
10
14
  };
15
+ infoOpen: {
16
+ type: BooleanConstructor;
17
+ default: boolean;
18
+ };
11
19
  }>>, {
12
20
  sidebarOpen: boolean;
21
+ infoOpen: boolean;
13
22
  }, {}>;
14
23
  export default _default;
@@ -1,10 +1,10 @@
1
1
  declare const _default: import("vue").DefineComponent<{
2
2
  element_table: {
3
3
  type: {
4
- (arrayLength: number): any[];
5
- (...items: any[]): any[];
6
- new (arrayLength: number): any[];
7
- new (...items: any[]): any[];
4
+ (arrayLength: number): (Object | String)[];
5
+ (...items: (Object | String)[]): (Object | String)[];
6
+ new (arrayLength: number): (Object | String)[];
7
+ new (...items: (Object | String)[]): (Object | String)[];
8
8
  isArray(arg: any): arg is any[];
9
9
  readonly prototype: any[];
10
10
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -143,10 +143,10 @@ declare const _default: import("vue").DefineComponent<{
143
143
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onClose" | "changeElement" | "update:Selection" | "changeInputValue")[], "onClose" | "changeElement" | "update:Selection" | "changeInputValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
144
144
  element_table: {
145
145
  type: {
146
- (arrayLength: number): any[];
147
- (...items: any[]): any[];
148
- new (arrayLength: number): any[];
149
- new (...items: any[]): any[];
146
+ (arrayLength: number): (Object | String)[];
147
+ (...items: (Object | String)[]): (Object | String)[];
148
+ new (arrayLength: number): (Object | String)[];
149
+ new (...items: (Object | String)[]): (Object | String)[];
150
150
  isArray(arg: any): arg is any[];
151
151
  readonly prototype: any[];
152
152
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -8,7 +8,7 @@
8
8
  {{ getNoScopeMsg }}
9
9
  </div>
10
10
  <div v-if="scopeArray.length > 0" class="arg_scopes_select">
11
- <div class="oip_row v-center justify-between">
11
+ <div class="oip_row v-center justify-between full_row">
12
12
  <p class="args_select_title">
13
13
  {{
14
14
  lang === "fr"
@@ -147,6 +147,7 @@ export default defineComponent({
147
147
  flex-direction: column;
148
148
  align-items: flex-start;
149
149
  gap: 8px;
150
+ align-self: stretch;
150
151
  }
151
152
 
152
153
  .args_select_title {
@@ -174,4 +175,11 @@ export default defineComponent({
174
175
  line-height: normal;
175
176
  color: var(--wild-blue-yonder);
176
177
  }
178
+
179
+ .full_row {
180
+ align-self: stretch;
181
+ }
182
+ .justify-between {
183
+ justify-content: space-between;
184
+ }
177
185
  </style>
@@ -0,0 +1,194 @@
1
+ <template>
2
+ <div class="scope_change_display">
3
+ <arg-btn btn-style="primary-fill" @onClick="changeDisplay()">{{
4
+ getTitle
5
+ }}</arg-btn>
6
+ <div
7
+ :style="
8
+ isDisplay === false || scopes.length === 0 ? 'display : none' : ''
9
+ "
10
+ class="scope_select_dropdown_block"
11
+ >
12
+ <div class="oip_select_dropdown_selection_container">
13
+ <arg-btn
14
+ btn-style="primary-stroke"
15
+ class="my-4"
16
+ @onClick="newScope()"
17
+ prefix-icon="PlusCircle"
18
+ >{{ lang === "fr" ? "Nouveau scope" : "New scope" }}</arg-btn
19
+ >
20
+ <div
21
+ v-for="(element, index) of scopes"
22
+ :key="index"
23
+ class="oip_select_complex_selection_loop"
24
+ @click="selectScope(element)"
25
+ >
26
+ <arg-icon
27
+ :class="selectedScope?.id === element.id ? 'add' : ''"
28
+ :color="
29
+ selectedScope?.id === element.id
30
+ ? 'var(--primary)'
31
+ : 'var(--lavendar-grey)'
32
+ "
33
+ size="16"
34
+ :name="
35
+ selectedScope?.id === element.id ? 'CircleSelectFill' : 'Circle'
36
+ "
37
+ />
38
+ <div
39
+ :class="[
40
+ 'oip_select_complex_selection_loop_name',
41
+ selectedScope?.id === element.id ? 'add' : 'del',
42
+ ]"
43
+ >
44
+ {{ element.title }}
45
+ </div>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </template>
51
+
52
+ <script>
53
+ import argIcon from "./argIcon.vue";
54
+ import argBtn from "./argBtn.vue";
55
+ import {
56
+ onMounted,
57
+ ref,
58
+ computed,
59
+ defineComponent,
60
+ onUnmounted
61
+ } from "vue";
62
+ export default defineComponent({
63
+ name: "argScopeChange",
64
+ components: { argIcon, argBtn },
65
+ props: {
66
+ scopes: { type: Array, required: true },
67
+ active_scope: { type: Object, required: false, default: null },
68
+ lang: {
69
+ type: String,
70
+ default: "en",
71
+ validator: (value) => {
72
+ return ["en", "fr"].includes(value);
73
+ }
74
+ }
75
+ },
76
+ emits: ["changeScope", "update:Scope", "onNewScope"],
77
+ setup(props, { emit }) {
78
+ const isDisplay = ref(false);
79
+ const selectedScope = ref(null);
80
+ onMounted(() => {
81
+ if (props.active_scope !== null) {
82
+ selectedScope.value = props.active_scope;
83
+ }
84
+ });
85
+ const getTitle = computed(() => {
86
+ if (props.scopes.length > 0) {
87
+ return props.lang === "en" ? "Change scope" : "Changer de scope";
88
+ } else
89
+ return props.lang === "en" ? "New scope" : "Nouveau scope";
90
+ });
91
+ function closeDropdown() {
92
+ isDisplay.value = false;
93
+ document?.removeEventListener("click", closeDropdown);
94
+ }
95
+ function selectScope(scope) {
96
+ selectedScope.value = scope;
97
+ emit("changeScope", scope);
98
+ emit("update:Scope", scope);
99
+ }
100
+ function changeDisplay() {
101
+ if (props.scopes.length === 0) {
102
+ emit("onNewScope");
103
+ } else {
104
+ if (isDisplay.value === true) {
105
+ isDisplay.value = !isDisplay.value;
106
+ } else {
107
+ isDisplay.value = !isDisplay.value;
108
+ setTimeout(() => {
109
+ document?.addEventListener("click", closeDropdown);
110
+ }, 100);
111
+ }
112
+ }
113
+ }
114
+ function newScope() {
115
+ emit("onNewScope");
116
+ }
117
+ onUnmounted(() => {
118
+ document?.removeEventListener("click", closeDropdown);
119
+ });
120
+ return {
121
+ isDisplay,
122
+ closeDropdown,
123
+ changeDisplay,
124
+ getTitle,
125
+ selectScope,
126
+ selectedScope,
127
+ newScope
128
+ };
129
+ }
130
+ });
131
+ </script>
132
+
133
+ <style scoped>
134
+ .scope_select_dropdown_block {
135
+ z-index: 99 !important;
136
+ margin-top: 15px;
137
+ position: absolute;
138
+ min-width: 100px;
139
+ max-height: 200px;
140
+ border: 1.5px solid var(--dividers);
141
+ background: var(--demi-fond);
142
+ border-radius: 12px;
143
+ box-shadow: var(--overlay-shadow);
144
+ padding: 16px;
145
+ display: flex;
146
+ flex-direction: column;
147
+ right: -16px;
148
+ }
149
+
150
+ .scope_change_display {
151
+ position: relative;
152
+ }
153
+
154
+ .oip_select_complex_selection_loop > svg.add {
155
+ color: var(--primary) !important;
156
+ }
157
+ .oip_select_complex_selection_loop > svg.disable,
158
+ .oip_select_complex_selection_loop.disabled_option:hover svg {
159
+ color: var(--independence) !important;
160
+ }
161
+ .oip_select_complex_selection_loop:hover > svg.add {
162
+ color: var(--primary-hover) !important;
163
+ }
164
+
165
+ .oip_select_complex_selection_loop:hover svg {
166
+ color: var(--primary) !important;
167
+ }
168
+ .oip_select_complex_selection_loop .add {
169
+ font-weight: 700 !important;
170
+ }
171
+ .oip_select_complex_selection_loop:hover {
172
+ background: rgba(33, 118, 255, 0.05) !important;
173
+ border-radius: 4px !important;
174
+ }
175
+ .oip_select_complex_selection_loop {
176
+ padding: 2px 4px;
177
+ }
178
+ .oip_select_complex_selection_loop.disabled_option:hover {
179
+ background: transparent !important;
180
+ }
181
+ .oip_select_complex_selection_loop {
182
+ margin: 4px 0px !important;
183
+ }
184
+ svg.add {
185
+ flex-shrink: 0;
186
+ }
187
+ .my-4 {
188
+ margin: 4px 0px;
189
+ }
190
+
191
+ .full_width {
192
+ width: 100%;
193
+ }
194
+ </style>
@@ -0,0 +1,73 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ scopes: {
3
+ type: {
4
+ (arrayLength: number): string[];
5
+ (...items: string[]): string[];
6
+ new (arrayLength: number): string[];
7
+ new (...items: string[]): string[];
8
+ isArray(arg: any): arg is any[];
9
+ readonly prototype: any[];
10
+ from<T>(arrayLike: ArrayLike<T>): T[];
11
+ from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
12
+ from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
13
+ from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
14
+ of<T_4>(...items: T_4[]): T_4[];
15
+ readonly [Symbol.species]: ArrayConstructor;
16
+ };
17
+ required: true;
18
+ };
19
+ active_scope: {
20
+ type: ObjectConstructor;
21
+ required: false;
22
+ default: null;
23
+ };
24
+ lang: {
25
+ type: StringConstructor;
26
+ default: string;
27
+ validator: (value: string) => boolean;
28
+ };
29
+ }, {
30
+ isDisplay: import("vue").Ref<boolean>;
31
+ closeDropdown: () => void;
32
+ changeDisplay: () => void;
33
+ getTitle: import("vue").ComputedRef<"Change scope" | "Changer de scope" | "New scope" | "Nouveau scope">;
34
+ selectScope: (scope: any) => void;
35
+ selectedScope: any;
36
+ newScope: () => void;
37
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:Scope" | "changeScope" | "onNewScope")[], "update:Scope" | "changeScope" | "onNewScope", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
38
+ scopes: {
39
+ type: {
40
+ (arrayLength: number): string[];
41
+ (...items: string[]): string[];
42
+ new (arrayLength: number): string[];
43
+ new (...items: string[]): string[];
44
+ isArray(arg: any): arg is any[];
45
+ readonly prototype: any[];
46
+ from<T>(arrayLike: ArrayLike<T>): T[];
47
+ from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
48
+ from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
49
+ from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
50
+ of<T_4>(...items: T_4[]): T_4[];
51
+ readonly [Symbol.species]: ArrayConstructor;
52
+ };
53
+ required: true;
54
+ };
55
+ active_scope: {
56
+ type: ObjectConstructor;
57
+ required: false;
58
+ default: null;
59
+ };
60
+ lang: {
61
+ type: StringConstructor;
62
+ default: string;
63
+ validator: (value: string) => boolean;
64
+ };
65
+ }>> & {
66
+ "onUpdate:Scope"?: ((...args: any[]) => any) | undefined;
67
+ onChangeScope?: ((...args: any[]) => any) | undefined;
68
+ onOnNewScope?: ((...args: any[]) => any) | undefined;
69
+ }, {
70
+ lang: string;
71
+ active_scope: Record<string, any>;
72
+ }, {}>;
73
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/auriga",
3
- "version": "0.1.43",
3
+ "version": "0.1.45",
4
4
  "description": "Aurgia is a UI kit developped by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",