@govbr-ds/webcomponents 1.7.0 → 1.7.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/README.md +12 -40
- package/dist/webcomponents.common.js +25 -22
- package/dist/webcomponents.common.js.map +1 -1
- package/dist/webcomponents.umd.js +25 -22
- package/dist/webcomponents.umd.js.map +1 -1
- package/dist/webcomponents.umd.min.js +2 -2
- package/dist/webcomponents.umd.min.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,47 +95,27 @@ Clone o projeto:
|
|
|
95
95
|
|
|
96
96
|
```bash
|
|
97
97
|
git clone git@gitlab.com:govbr-ds/dev/wbc/govbr-ds-wbc.git
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
Entre no diretório do projeto:
|
|
101
98
|
|
|
102
|
-
```bash
|
|
103
99
|
cd govbr-ds-wbc
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Instale as dependências:
|
|
107
100
|
|
|
108
|
-
```bash
|
|
109
101
|
npm install
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
Para executar a nossa biblioteca a partir do código-fonte você tem 2 opções:
|
|
113
|
-
|
|
114
|
-
### Executar como VueJS Components
|
|
115
102
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
```node
|
|
119
|
-
npm run serve
|
|
103
|
+
npm run storybook
|
|
120
104
|
```
|
|
121
105
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
Nessa visualização o projeto é executado a partir do storybook e convertido para Web Components.
|
|
106
|
+
## Documentação
|
|
125
107
|
|
|
126
|
-
|
|
108
|
+
Nossa documentação está disponível em <https://gov.br/ds/webcomponents/>.
|
|
127
109
|
|
|
128
|
-
|
|
129
|
-
npm run storybook
|
|
130
|
-
```
|
|
110
|
+
> Para outras informações, consulte nossa [Wiki](https://gov.br/ds/wiki/desenvolvimento/web-components/).
|
|
131
111
|
|
|
132
|
-
|
|
112
|
+
## Polyfill
|
|
133
113
|
|
|
134
|
-
|
|
114
|
+
Acesse os seguintes links para entender mais sobre o suporte dos browsers a [Custom Elements](https://caniuse.com/custom-elementsv1) e a [Shadow Dom](https://caniuse.com/shadowdomv1).
|
|
135
115
|
|
|
136
|
-
|
|
116
|
+
Caso os requisitos do seu projeto incluam navegadores que não suportam completamente os Web Components, adicione os [polyfills](https://www.webcomponents.org/polyfills) ao seu projeto.
|
|
137
117
|
|
|
138
|
-
|
|
118
|
+
Para aprender com instalar, consulte a [documentação oficial](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs 'Polyfills')
|
|
139
119
|
|
|
140
120
|
## Contribuindo
|
|
141
121
|
|
|
@@ -151,6 +131,10 @@ Você pode usar as [issues](https://gitlab.com/govbr-ds/dev/wbc/govbr-ds-wbc/-/i
|
|
|
151
131
|
|
|
152
132
|
Nos comprometemos a responder a todas as issues.
|
|
153
133
|
|
|
134
|
+
## Commits
|
|
135
|
+
|
|
136
|
+
Nesse projeto usamos um padrão para branches e commits. Por favor observe a documentação na nossa [wiki](https://gov.br/ds/wiki/ 'Wiki') para aprender sobre os nossos padrões.
|
|
137
|
+
|
|
154
138
|
## Precisa de ajuda?
|
|
155
139
|
|
|
156
140
|
> Por favor **não** crie issues para fazer perguntas...
|
|
@@ -165,18 +149,6 @@ Use nossos canais abaixo para obter tirar suas dúvidas:
|
|
|
165
149
|
|
|
166
150
|
- Usando nosso canal no discord <https://discord.gg/U5GwPfqhUP>
|
|
167
151
|
|
|
168
|
-
## Commits
|
|
169
|
-
|
|
170
|
-
Nesse projeto usamos um padrão para branches e commits. Por favor observe a documentação na nossa [wiki](https://gov.br/ds/wiki/ 'Wiki') para aprender sobre os nossos padrões.
|
|
171
|
-
|
|
172
|
-
## Apêndice
|
|
173
|
-
|
|
174
|
-
### Polyfill
|
|
175
|
-
|
|
176
|
-
Caso os requisitos do seu projeto incluam navegadores que não suportam completamente os Web Components, adicione os [polyfills](https://www.webcomponents.org/polyfills) ao seu projeto.
|
|
177
|
-
|
|
178
|
-
Para aprender com instalar, consulte a [documentação oficial](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs 'Polyfills')
|
|
179
|
-
|
|
180
152
|
## Créditos
|
|
181
153
|
|
|
182
154
|
Os Web Components do [GovBR-DS](https://gov.br/ds/ 'GovBR-DS') são criados pelo [SERPRO](https://www.serpro.gov.br/ 'SERPRO | Serviço Federal de Processamento de Dados') e [Dataprev](https://www.dataprev.gov.br/ 'Dataprev | Empresa de Tecnologia e Informações da Previdência') juntamente com a participação da comunidade.
|
|
@@ -18816,7 +18816,7 @@ const store = createStore({
|
|
|
18816
18816
|
setCookies(context, cookies) {
|
|
18817
18817
|
cookies.forEach(cookie => {
|
|
18818
18818
|
;
|
|
18819
|
-
cookie.alert = cookie?.alert || null, cookie.optIn = context.getters.categories.filter(category => category.id === cookie.catetoryId)[0]?.optIn || cookie.optIn || false, cookie.enable = context.getters.categories.filter(category => category.id === cookie.categoryId)[0]?.enable
|
|
18819
|
+
cookie.alert = cookie?.alert || null, cookie.optIn = context.getters.categories.filter(category => category.id === cookie.catetoryId)[0]?.optIn || cookie.optIn || false, cookie.enable = cookie.optIn ? context.getters.categories.filter(category => category.id === cookie.categoryId)[0]?.enable : cookie?.enable || false;
|
|
18820
18820
|
});
|
|
18821
18821
|
context.commit('setCookies', cookies);
|
|
18822
18822
|
context.dispatch('setCategoriesInitialIndeterminate');
|
|
@@ -18840,7 +18840,7 @@ const store = createStore({
|
|
|
18840
18840
|
});
|
|
18841
18841
|
if (indeterminate) {
|
|
18842
18842
|
context.dispatch('setAllIndeterminate', true);
|
|
18843
|
-
} else if (context.getters.categories.filter(category => category.enable === true) === context.getters.categories.length || context.getters.categories.filter(category => category.enable === false) === context.getters.categories.length) {
|
|
18843
|
+
} else if (context.getters.categories.filter(category => category.enable === true).length === context.getters.categories.length || context.getters.categories.filter(category => category.enable === false).length === context.getters.categories.length) {
|
|
18844
18844
|
context.dispatch('setAllIndeterminate', false);
|
|
18845
18845
|
} else {
|
|
18846
18846
|
context.dispatch('setAllIndeterminate', true);
|
|
@@ -19567,43 +19567,43 @@ function CookiebarCategory_cevue_type_template_id_8f662f00_render(_ctx, _cache,
|
|
|
19567
19567
|
}
|
|
19568
19568
|
;// CONCATENATED MODULE: ./src/library/components/Cookiebar/CookiebarCategory.ce.vue?vue&type=template&id=8f662f00
|
|
19569
19569
|
|
|
19570
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/library/components/Cookiebar/CookiebarCookie.ce.vue?vue&type=template&id=
|
|
19570
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/library/components/Cookiebar/CookiebarCookie.ce.vue?vue&type=template&id=0c9b1f4c
|
|
19571
19571
|
|
|
19572
|
-
const
|
|
19572
|
+
const CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_1 = {
|
|
19573
19573
|
class: "cookie"
|
|
19574
19574
|
};
|
|
19575
|
-
const
|
|
19575
|
+
const CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_2 = {
|
|
19576
19576
|
class: "container-fluid"
|
|
19577
19577
|
};
|
|
19578
|
-
const
|
|
19578
|
+
const CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_3 = {
|
|
19579
19579
|
class: "row justify-content-end"
|
|
19580
19580
|
};
|
|
19581
|
-
const
|
|
19581
|
+
const CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_4 = {
|
|
19582
19582
|
class: "col-sm-5 col-md-3 col-lg-2 mb-3"
|
|
19583
19583
|
};
|
|
19584
|
-
const
|
|
19584
|
+
const CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_5 = {
|
|
19585
19585
|
key: 0,
|
|
19586
19586
|
class: "col-12 message"
|
|
19587
19587
|
};
|
|
19588
|
-
const
|
|
19588
|
+
const CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_6 = {
|
|
19589
19589
|
class: "container-fluid"
|
|
19590
19590
|
};
|
|
19591
|
-
const
|
|
19591
|
+
const CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_7 = {
|
|
19592
19592
|
class: "row mb-1"
|
|
19593
19593
|
};
|
|
19594
|
-
const
|
|
19594
|
+
const CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_8 = {
|
|
19595
19595
|
class: "col-sm-3 col-md-2 col-xl-1"
|
|
19596
19596
|
};
|
|
19597
|
-
const
|
|
19597
|
+
const CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_9 = {
|
|
19598
19598
|
class: "col-sm"
|
|
19599
19599
|
};
|
|
19600
|
-
const
|
|
19600
|
+
const CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_10 = {
|
|
19601
19601
|
class: "row mb-1"
|
|
19602
19602
|
};
|
|
19603
|
-
const
|
|
19603
|
+
const CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_11 = {
|
|
19604
19604
|
class: "col-sm-3 col-md-2 col-xl-1"
|
|
19605
19605
|
};
|
|
19606
|
-
const
|
|
19606
|
+
const CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_12 = {
|
|
19607
19607
|
class: "col-sm"
|
|
19608
19608
|
};
|
|
19609
19609
|
const _hoisted_13 = {
|
|
@@ -19642,19 +19642,19 @@ const _hoisted_23 = {
|
|
|
19642
19642
|
const _hoisted_24 = {
|
|
19643
19643
|
class: "col-sm"
|
|
19644
19644
|
};
|
|
19645
|
-
function
|
|
19645
|
+
function CookiebarCookie_cevue_type_template_id_0c9b1f4c_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
19646
19646
|
const _component_BrSwitch = resolveComponent("BrSwitch");
|
|
19647
19647
|
const _component_BrMessage = resolveComponent("BrMessage");
|
|
19648
19648
|
const _component_BrCard = resolveComponent("BrCard");
|
|
19649
|
-
return openBlock(), createElementBlock("div",
|
|
19650
|
-
header: withCtx(() => [createBaseVNode("div",
|
|
19649
|
+
return openBlock(), createElementBlock("div", CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_1, [createVNode(_component_BrCard, null, {
|
|
19650
|
+
header: withCtx(() => [createBaseVNode("div", CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_2, [createBaseVNode("div", CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_3, [createBaseVNode("div", CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_4, [withDirectives(createVNode(_component_BrSwitch, {
|
|
19651
19651
|
id: `cookie-${_ctx.categoryIndex}${_ctx.cookieIndex}`,
|
|
19652
19652
|
label: _ctx.isEnable ? _ctx.disableCookieLabel : _ctx.enableCookieLabel,
|
|
19653
19653
|
checked: _ctx.isEnable,
|
|
19654
19654
|
value: String(_ctx.isEnable),
|
|
19655
19655
|
"checkgroup-child": `category-${_ctx.categoryId}`,
|
|
19656
19656
|
"onUpdate:checked": _ctx.updateEnable
|
|
19657
|
-
}, null, 8, ["id", "label", "checked", "value", "checkgroup-child", "onUpdate:checked"]), [[vShow, !_ctx.isCookieOptIn]])]), _ctx.cookie.alert && !_ctx.isEnable ? (openBlock(), createElementBlock("div",
|
|
19657
|
+
}, null, 8, ["id", "label", "checked", "value", "checkgroup-child", "onUpdate:checked"]), [[vShow, !_ctx.isCookieOptIn && !_ctx.isCategoryOptIn]])]), _ctx.cookie.alert && !_ctx.isEnable ? (openBlock(), createElementBlock("div", CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_5, [createVNode(_component_BrMessage, {
|
|
19658
19658
|
feedback: "",
|
|
19659
19659
|
state: "warning",
|
|
19660
19660
|
"show-icon": ""
|
|
@@ -19662,11 +19662,11 @@ function CookiebarCookie_cevue_type_template_id_c7eb6c4a_render(_ctx, _cache, $p
|
|
|
19662
19662
|
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.cookie.alert), 1)]),
|
|
19663
19663
|
_: 1
|
|
19664
19664
|
})])) : createCommentVNode("", true)])])]),
|
|
19665
|
-
content: withCtx(() => [createBaseVNode("div",
|
|
19665
|
+
content: withCtx(() => [createBaseVNode("div", CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_6, [createBaseVNode("div", CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_7, [createBaseVNode("div", CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_8, [createBaseVNode("span", null, [createBaseVNode("strong", null, toDisplayString(_ctx.cookieLabel), 1)])]), createBaseVNode("div", CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_9, [createBaseVNode("span", null, toDisplayString(_ctx.cookie.name), 1)])]), createBaseVNode("div", CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_10, [createBaseVNode("div", CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_11, [createBaseVNode("span", null, [createBaseVNode("strong", null, toDisplayString(_ctx.expiryLabel), 1)])]), createBaseVNode("div", CookiebarCookie_cevue_type_template_id_0c9b1f4c_hoisted_12, [createBaseVNode("span", null, toDisplayString(_ctx.cookie.expiry), 1)])]), createBaseVNode("div", _hoisted_13, [createBaseVNode("div", _hoisted_14, [createBaseVNode("span", null, [createBaseVNode("strong", null, toDisplayString(_ctx.domainLabel), 1)])]), createBaseVNode("div", _hoisted_15, [createBaseVNode("span", null, toDisplayString(_ctx.cookie.domain), 1)])]), createBaseVNode("div", _hoisted_16, [createBaseVNode("div", _hoisted_17, [createBaseVNode("span", null, [createBaseVNode("strong", null, toDisplayString(_ctx.companyLabel), 1)])]), createBaseVNode("div", _hoisted_18, [createBaseVNode("span", null, toDisplayString(_ctx.cookie.company), 1)])]), createBaseVNode("div", _hoisted_19, [createBaseVNode("div", _hoisted_20, [createBaseVNode("span", null, [createBaseVNode("strong", null, toDisplayString(_ctx.purposeLabel), 1)])]), createBaseVNode("div", _hoisted_21, [createBaseVNode("span", null, toDisplayString(_ctx.cookie.purpose), 1)])]), createBaseVNode("div", _hoisted_22, [createBaseVNode("div", _hoisted_23, [createBaseVNode("span", null, [createBaseVNode("strong", null, toDisplayString(_ctx.descriptionLabel), 1)])]), createBaseVNode("div", _hoisted_24, [createBaseVNode("span", null, toDisplayString(_ctx.cookie.description), 1)])])])]),
|
|
19666
19666
|
_: 1
|
|
19667
19667
|
})]);
|
|
19668
19668
|
}
|
|
19669
|
-
;// CONCATENATED MODULE: ./src/library/components/Cookiebar/CookiebarCookie.ce.vue?vue&type=template&id=
|
|
19669
|
+
;// CONCATENATED MODULE: ./src/library/components/Cookiebar/CookiebarCookie.ce.vue?vue&type=template&id=0c9b1f4c
|
|
19670
19670
|
|
|
19671
19671
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/library/components/Switch/Switch.ce.vue?vue&type=template&id=81441e8c
|
|
19672
19672
|
|
|
@@ -19954,6 +19954,9 @@ const CookiebarCookie = {
|
|
|
19954
19954
|
disableCookieLabel() {
|
|
19955
19955
|
return Cookiebar_store.getters.labels?.disableCookie;
|
|
19956
19956
|
},
|
|
19957
|
+
isCategoryOptIn() {
|
|
19958
|
+
return Cookiebar_store.getters.isCategoryOptIn(this.categoryId);
|
|
19959
|
+
},
|
|
19957
19960
|
isCookieOptIn() {
|
|
19958
19961
|
return Cookiebar_store.getters.isCookieOptIn(this.categoryId, this.cookieId);
|
|
19959
19962
|
}
|
|
@@ -19978,7 +19981,7 @@ const CookiebarCookie = {
|
|
|
19978
19981
|
|
|
19979
19982
|
|
|
19980
19983
|
;
|
|
19981
|
-
const CookiebarCookie_ce_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(CookiebarCookie_cevue_type_script_lang_js, [['render',
|
|
19984
|
+
const CookiebarCookie_ce_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(CookiebarCookie_cevue_type_script_lang_js, [['render',CookiebarCookie_cevue_type_template_id_0c9b1f4c_render]])
|
|
19982
19985
|
|
|
19983
19986
|
/* harmony default export */ var CookiebarCookie_ce = (CookiebarCookie_ce_exports_);
|
|
19984
19987
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/library/components/Cookiebar/CookiebarCategory.ce.vue?vue&type=script&lang=js
|