Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: release 1.25.0 #154

Merged
merged 43 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
a3cb934
fix(foxy-payments-api): fix default values for optional props
pheekus Jan 16, 2024
448e53e
fix(foxy-payments-api-payment-method-form): fix test credentials entry
pheekus Jan 16, 2024
3d95c1b
fix(foxy-store-form): fix store domain limit v8n
pheekus Jan 16, 2024
1508379
refactor: reduce the creation and modification dates in all elements
pheekus Jan 16, 2024
fd5c4e2
refactor(foxy-item-form): use async list instead of async details for…
pheekus Jan 16, 2024
4815d14
fix: improve summary for subscriptions starting soon
pheekus Jan 17, 2024
9ce6792
feat: add `foxy-native-integration-card` element
pheekus Jan 27, 2024
7249fd8
feat: add `foxy-native-integration-form` element
pheekus Jan 27, 2024
e291acc
fix(beta): fix api incompatibilities in elements for native integrations
pheekus Jan 27, 2024
b29642e
fix(beta): add missing provider types to native integration elements
pheekus Jan 30, 2024
c289797
fix(foxy-store-form): fix logo url v8n
pheekus Jan 30, 2024
ca0d3c2
fix(foxy-template-config-form): fix language for location filtering
pheekus Jan 30, 2024
f387946
internal: fix readonly async list control appearance
pheekus Feb 9, 2024
50c3fc6
refactor: make second line of two-line cards the same color
pheekus Feb 9, 2024
0ccde2f
internal: fix embeds generation in demo server
pheekus Feb 9, 2024
62a403f
feat: add `foxy-billing-address-card` element
pheekus Feb 9, 2024
028fb64
internal: add props passthrough to async list
pheekus Feb 10, 2024
586c01d
docs(foxy-i18n): deprecate `setGateways` method
pheekus Feb 10, 2024
0e14771
refactor: rewrite payment card with support for property helpers and …
pheekus Feb 10, 2024
26c526c
feat(foxy-pagination): hide controls if all items are displayed
pheekus Feb 10, 2024
5abf60a
feat(foxy-shipment-card): redesign card ui
pheekus Feb 10, 2024
225855c
refactor(foxy-item-card): visual ui improvements
pheekus Feb 10, 2024
d0b7bb4
refactor(foxy-item-form): reorganize form controls
pheekus Feb 10, 2024
54b3734
feat: redesign transaction view
pheekus Feb 10, 2024
503cddf
fix: add missing translations for subscriptions
pheekus Feb 10, 2024
d617de9
chore: regenerate custom elements json
pheekus Feb 10, 2024
1621b70
refactor(foxy-transaction): remove user agent from header
pheekus Feb 26, 2024
3929321
refactor: make async list actions less prominent
pheekus Feb 26, 2024
4d4f478
chore: regenerate schemas
pheekus Feb 26, 2024
5e1421e
fix: add placeholder for empty product codes
pheekus Feb 26, 2024
9b1f02b
fix(foxy-shipment-card): decode html entities in description
pheekus Feb 26, 2024
cfd4397
refactor(foxy-transaction): add time to transaction date
pheekus Feb 26, 2024
05d421e
feat(foxy-transaction-card): improve status and source display
pheekus Feb 27, 2024
676e802
internal: fix disabled state override in controls
pheekus Mar 5, 2024
ee42439
fix: force remove dialogs if transitionend event doesn't fire after 2s
pheekus Mar 5, 2024
645aa62
fix(foxy-item): force set data-bundled attribite on child items
pheekus Mar 5, 2024
0123568
style: reformat code
pheekus Mar 5, 2024
a9d0655
internal: add a common css rule for all [hidden] elements
pheekus Mar 5, 2024
2431d27
fix(foxy-transaction-card): add missing import
pheekus Mar 5, 2024
e410113
test: fix tests
pheekus Mar 5, 2024
0fff9d4
fix: use transaction template instead of last transaction for display…
pheekus Mar 6, 2024
83be47a
chore: update sdk
pheekus Mar 6, 2024
f8789fc
style: fix code style issues
pheekus Mar 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
"fileMatch": ["/src/static/translations/attribute-form/*.json"],
"url": "./src/static/schemas/attribute-form.json"
},
{
"fileMatch": ["/src/static/translations/billing-address-card/*.json"],
"url": "./src/static/schemas/billing-address-card.json"
},
{
"fileMatch": ["/src/static/translations/cancellation-form/*.json"],
"url": "./src/static/schemas/cancellation-form.json"
Expand Down Expand Up @@ -220,6 +224,14 @@
"fileMatch": ["/src/static/translations/items-form/*.json"],
"url": "./src/static/schemas/items-form.json"
},
{
"fileMatch": ["/src/static/translations/native-integration-card/*.json"],
"url": "./src/static/schemas/native-integration-card.json"
},
{
"fileMatch": ["/src/static/translations/native-integration-form/*.json"],
"url": "./src/static/schemas/native-integration-form.json"
},
{
"fileMatch": ["/src/static/translations/pagination/*.json"],
"url": "./src/static/schemas/pagination.json"
Expand Down
887 changes: 850 additions & 37 deletions custom-elements.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"prepack": "npm run lint && rimraf dist && node ./.build/compile-for-npm.js && rollup -c"
},
"dependencies": {
"@foxy.io/sdk": "^1.11.0",
"@foxy.io/sdk": "^1.11.2",
"@open-wc/lit-helpers": "^0.3.12",
"@open-wc/scoped-elements": "^1.2.1",
"@polymer/iron-icons": "^3.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe('InternalAsyncComboBoxControl', () => {
expect(comboBox).to.have.empty.property('itemValuePath');

control.itemValuePath = 'test';
await control.updateComplete;
await control.requestUpdate();

expect(comboBox).to.have.property('itemValuePath', 'test');
});
Expand All @@ -116,7 +116,7 @@ describe('InternalAsyncComboBoxControl', () => {
expect(comboBox).to.have.empty.property('itemLabelPath');

control.itemLabelPath = 'test';
await control.updateComplete;
await control.requestUpdate();

expect(comboBox).to.have.property('itemLabelPath', 'test');
});
Expand All @@ -137,7 +137,7 @@ describe('InternalAsyncComboBoxControl', () => {
expect(comboBox).to.have.property('errorMessage', '');

control.testErrorMessage = 'test error message';
await control.updateComplete;
await control.requestUpdate();

expect(comboBox).to.have.property('errorMessage', 'test error message');
});
Expand All @@ -150,7 +150,7 @@ describe('InternalAsyncComboBoxControl', () => {
expect(comboBox).to.have.property('helperText', 'helper_text');

control.helperText = 'test helper text';
await control.updateComplete;
await control.requestUpdate();

expect(comboBox).to.have.property('helperText', 'test helper text');
});
Expand All @@ -163,7 +163,7 @@ describe('InternalAsyncComboBoxControl', () => {
expect(comboBox).to.have.property('placeholder', 'placeholder');

control.placeholder = 'test placeholder';
await control.updateComplete;
await control.requestUpdate();

expect(comboBox).to.have.property('placeholder', 'test placeholder');
});
Expand All @@ -176,7 +176,7 @@ describe('InternalAsyncComboBoxControl', () => {
expect(comboBox).to.have.property('label', 'label');

control.label = 'test label';
await control.updateComplete;
await control.requestUpdate();

expect(comboBox).to.have.property('label', 'test label');
});
Expand All @@ -187,11 +187,11 @@ describe('InternalAsyncComboBoxControl', () => {
const comboBox = control.renderRoot.querySelector('vaadin-combo-box')!;

control.disabled = true;
await control.updateComplete;
await control.requestUpdate();
expect(comboBox).to.have.property('disabled', true);

control.disabled = false;
await control.updateComplete;
await control.requestUpdate();
expect(comboBox).to.have.property('disabled', false);
});

Expand All @@ -201,11 +201,11 @@ describe('InternalAsyncComboBoxControl', () => {
const comboBox = control.renderRoot.querySelector('vaadin-combo-box')!;

control.readonly = true;
await control.updateComplete;
await control.requestUpdate();
expect(comboBox).to.have.property('readonly', true);

control.readonly = false;
await control.updateComplete;
await control.requestUpdate();
expect(comboBox).to.have.property('readonly', false);
});

Expand All @@ -225,7 +225,7 @@ describe('InternalAsyncComboBoxControl', () => {

control.itemLabelPath = 'foo';
control.first = 'https://demo.api/test/';
await control.updateComplete;
await control.requestUpdate();

const testItems = [{ foo: 'bar1' }, { foo: 'bar2' }];
const testSize = 10;
Expand Down Expand Up @@ -267,7 +267,7 @@ describe('InternalAsyncComboBoxControl', () => {
expect(comboBox).to.have.property('value', '');

control.testValue = 'test_value';
await control.updateComplete;
await control.requestUpdate();

expect(comboBox).to.have.property('value', 'test_value');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ describe('InternalAsyncDetailsControl', () => {
expect(details).to.have.property('summary', 'title');

control.open = true;
await control.updateComplete;
await control.requestUpdate();

expect(details).to.have.property('open', true);

control.open = false;
await control.updateComplete;
await control.requestUpdate();

expect(details).to.have.property('open', false);

Expand Down Expand Up @@ -219,7 +219,7 @@ describe('InternalAsyncDetailsControl', () => {

control.first = 'https://demo.api/hapi/customers';
control.limit = 10;
await control.updateComplete;
await control.requestUpdate();

expect(pagination).to.have.property('first', 'https://demo.api/hapi/customers?limit=10');
});
Expand Down Expand Up @@ -248,7 +248,7 @@ describe('InternalAsyncDetailsControl', () => {
expect(page).to.have.deep.property('related', []);

control.related = ['https://demo.api/hapi/customers/0'];
await control.updateComplete;
await control.requestUpdate();

expect(page).to.have.deep.property('related', ['https://demo.api/hapi/customers/0']);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ describe('InternalAsyncListControl', () => {
expect(Control).to.have.deep.nested.property('properties.item', {});
});

it('has a reactive property "itemProps"', () => {
expect(new Control()).to.have.deep.property('itemProps', {});
expect(Control).to.have.deep.nested.property('properties.itemProps', {
type: Object,
attribute: 'item-props',
});
});

it('has a reactive property "wide"', () => {
expect(new Control()).to.have.property('wide', false);
expect(Control).to.have.deep.nested.property('properties.wide', { type: Boolean });
Expand Down Expand Up @@ -179,7 +187,7 @@ describe('InternalAsyncListControl', () => {
control.alert = true;
control.wide = true;

await control.updateComplete;
await control.requestUpdate();

expect(form).to.have.deep.property('related', ['https://demo.api/virtual/error']);
expect(form).to.have.attribute('keep-open-on-delete');
Expand All @@ -195,9 +203,15 @@ describe('InternalAsyncListControl', () => {
`);

control.hideDeleteButton = true;
control.readonly = false;
expect(await getByTag(control, 'foxy-internal-confirm-dialog')).to.not.exist;

control.hideDeleteButton = false;
control.readonly = true;
expect(await getByTag(control, 'foxy-internal-confirm-dialog')).to.not.exist;

control.hideDeleteButton = false;
control.readonly = false;
const dialog = await getByTag(control, 'foxy-internal-confirm-dialog');

expect(dialog).to.exist;
Expand All @@ -216,7 +230,7 @@ describe('InternalAsyncListControl', () => {
expect(control.renderRoot).to.not.include.text('label');

control.label = 'Test label';
await control.updateComplete;
await control.requestUpdate();

expect(control.renderRoot).to.include.text('Test label');
});
Expand All @@ -234,7 +248,7 @@ describe('InternalAsyncListControl', () => {

control.first = 'https://demo.api/virtual/stall';
control.limit = 5;
await control.updateComplete;
await control.requestUpdate();

expect(pagination).to.have.attribute('first', 'https://demo.api/virtual/stall?limit=5');
});
Expand All @@ -250,11 +264,15 @@ describe('InternalAsyncListControl', () => {
expect(page).to.exist;
expect(page).to.have.attribute('infer', 'card');
expect(page).to.have.deep.property('related', []);
expect(page).to.have.deep.property('props', {});

control.related = ['https://demo.api/virtual/stall'];
await control.updateComplete;

await control.requestUpdate();
expect(page).to.have.deep.property('related', ['https://demo.api/virtual/stall']);

control.itemProps = { foo: 'bar' };
await control.requestUpdate();
expect(page).to.have.deep.property('props', { foo: 'bar' });
});

it('can render collection page items as simple list items using local name', async () => {
Expand Down Expand Up @@ -626,6 +644,46 @@ describe('InternalAsyncListControl', () => {
expect(swipeActions.querySelector(selector)).to.not.exist;
});

it('hides delete button for collection page items when readonly', async () => {
const control = await fixture<Control>(html`
<foxy-internal-async-list-control></foxy-internal-async-list-control>
`);

control.item = 'foxy-attribute-card';
control.form = 'foxy-attribute-form';
control.readonly = true;

const pagination = await getByTag(control, 'foxy-pagination');
const page = pagination!.querySelector('foxy-collection-page') as CollectionPage<any>;

const swipeActions = await fixture(
(page.item as ItemRenderer<any>)({
readonlyControls: BooleanSelector.False,
disabledControls: BooleanSelector.False,
hiddenControls: BooleanSelector.False,
templates: {},
readonly: false,
disabled: false,
previous: null,
related: ['https://demo.api/virtual/stall?related'],
hidden: false,
parent: 'https://demo.api/virtual/stall?parent',
spread: spread,
props: {},
group: '',
html: html,
lang: '',
href: 'https://demo.api/virtual/stall?href',
data: await getTestData('./hapi/customer_attributes/0'),
next: null,
ns: '',
})
);

const selector = 'vaadin-button foxy-i18n[key="delete_button_text"]';
expect(swipeActions.querySelector(selector)).to.not.exist;
});

it('renders Create button when .form is defined', async () => {
const control = await fixture<Control>(html`
<foxy-internal-async-list-control></foxy-internal-async-list-control>
Expand All @@ -639,7 +697,7 @@ describe('InternalAsyncListControl', () => {
const dialog = (await getByTag(control, 'foxy-form-dialog')) as FormDialog;

expect(label).to.have.property('localName', 'foxy-i18n');
expect(label).to.have.attribute('infer', '');
expect(label).to.have.attribute('infer', 'pagination');

const dialogShowMethod = stub(dialog, 'show');
button.click();
Expand Down Expand Up @@ -671,7 +729,7 @@ describe('InternalAsyncListControl', () => {
`);

control.item = 'foxy-attribute-card';
await control.updateComplete;
await control.requestUpdate();

const buttonSelector = 'vaadin-button foxy-i18n[key="create_button_text"]';
const aSelector = 'a foxy-i18n[key="create_button_text"]';
Expand All @@ -688,7 +746,7 @@ describe('InternalAsyncListControl', () => {
control.item = 'foxy-attribute-card';
control.form = 'foxy-attribute-form';
control.readonly = true;
await control.updateComplete;
await control.requestUpdate();

const buttonSelector = 'vaadin-button foxy-i18n[key="create_button_text"]';
const aSelector = 'a foxy-i18n[key="create_button_text"]';
Expand All @@ -705,7 +763,7 @@ describe('InternalAsyncListControl', () => {
control.item = 'foxy-attribute-card';
control.form = 'foxy-attribute-form';
control.hideCreateButton = true;
await control.updateComplete;
await control.requestUpdate();

const buttonSelector = 'vaadin-button foxy-i18n[key="create_button_text"]';
const aSelector = 'a foxy-i18n[key="create_button_text"]';
Expand Down
Loading
Loading