freemium-survey-components 2.0.428 → 2.0.430

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.
@@ -0,0 +1,281 @@
1
+ name: Automated Version Bump and Publish
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version_type:
7
+ description: 'Version bump type'
8
+ required: true
9
+ default: 'patch'
10
+ type: choice
11
+ options:
12
+ - patch
13
+ - minor
14
+ - major
15
+ push:
16
+ branches:
17
+ - main
18
+
19
+ permissions:
20
+ contents: write
21
+ pull-requests: write
22
+ packages: write
23
+
24
+ jobs:
25
+ create-version-pr:
26
+ name: Create Version Bump PR
27
+ runs-on: fw-shared
28
+ if: github.event_name == 'workflow_dispatch'
29
+
30
+ steps:
31
+ - name: Checkout code
32
+ uses: actions/checkout@v4
33
+ with:
34
+ fetch-depth: 0
35
+ token: ${{ secrets.GITHUB_TOKEN }}
36
+ persist-credentials: true
37
+
38
+ - name: Setup Node.js
39
+ uses: actions/setup-node@v4
40
+ with:
41
+ node-version: '18'
42
+ registry-url: 'https://registry.npmjs.org'
43
+ cache: 'npm'
44
+
45
+ - name: Configure Git
46
+ run: |
47
+ git config --local user.email "survey-serv-ci@users.noreply.github.com"
48
+ git config --local user.name "Survey Serv Release Bot"
49
+ git config --local url."https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
50
+
51
+ - name: Get current version
52
+ id: current_version
53
+ run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
54
+
55
+ - name: Create feature branch
56
+ id: branch
57
+ run: |
58
+ BRANCH_NAME="version-bump-$(date +'%Y%m%d-%H%M%S')"
59
+ git checkout -b $BRANCH_NAME
60
+ echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
61
+
62
+ - name: Bump version
63
+ id: version_bump
64
+ run: |
65
+ NEW_VERSION=$(npm version ${{ github.event.inputs.version_type }} --no-git-tag-version)
66
+ echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
67
+ echo "Bumped version from ${{ steps.current_version.outputs.version }} to $NEW_VERSION"
68
+
69
+ - name: Generate changes summary
70
+ id: changes
71
+ run: |
72
+ # Get commits since last tag for release notes
73
+ LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
74
+ if [ -z "$LAST_TAG" ]; then
75
+ CHANGES=$(git log --pretty=format:"- [%s](https://github.com/${{ github.repository }}/commit/%H)" --no-merges | head -10)
76
+ RELEASE_TYPE="Initial Release"
77
+ else
78
+ CHANGES=$(git log $LAST_TAG..HEAD --pretty=format:"- [%s](https://github.com/${{ github.repository }}/commit/%H)" --no-merges | head -10)
79
+ RELEASE_TYPE="Update"
80
+ fi
81
+
82
+ echo "changes<<EOF" >> $GITHUB_OUTPUT
83
+ echo "$CHANGES" >> $GITHUB_OUTPUT
84
+ echo "EOF" >> $GITHUB_OUTPUT
85
+
86
+ echo "release_type<<EOF" >> $GITHUB_OUTPUT
87
+ echo "$RELEASE_TYPE" >> $GITHUB_OUTPUT
88
+ echo "EOF" >> $GITHUB_OUTPUT
89
+
90
+ - name: Commit version bump
91
+ run: |
92
+ git add package.json package-lock.json
93
+ git commit -m "chore: bump version to ${{ steps.version_bump.outputs.new_version }}
94
+
95
+ Version: ${{ steps.current_version.outputs.version }} → ${{ steps.version_bump.outputs.new_version }}
96
+ Type: ${{ github.event.inputs.version_type }}
97
+
98
+ Ready for automated publish after merge"
99
+
100
+ - name: Push feature branch
101
+ run: git push origin ${{ steps.branch.outputs.branch_name }}
102
+
103
+ - name: Create Pull Request
104
+ run: |
105
+ PR_URL=$(gh pr create \
106
+ --title "chore(release): bump version to ${{ steps.version_bump.outputs.new_version }}" \
107
+ --body "## Automated Version Bump: ${{ steps.version_bump.outputs.new_version }}
108
+
109
+ **Initiated by:** @${{ github.actor }}
110
+ **Workflow run:** [${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
111
+ **Trigger:** Manual workflow dispatch
112
+
113
+ ### Changes:
114
+ - **Version**: ${{ steps.current_version.outputs.version }} → ${{ steps.version_bump.outputs.new_version }}
115
+ - **Type**: ${{ github.event.inputs.version_type }}
116
+ - **Build**: Verified successful
117
+
118
+ ### Recent commits:
119
+ ${{ steps.changes.outputs.changes }}
120
+
121
+ ### After Merge - Automatic Actions:
122
+ - npm package published
123
+ - Git tag created
124
+ - GitHub release created
125
+
126
+ **Merge this PR to trigger automated publishing!**" \
127
+ --head ${{ steps.branch.outputs.branch_name }} \
128
+ --base main)
129
+
130
+ echo "Pull request created: $PR_URL"
131
+ echo "Review and merge to complete: $PR_URL"
132
+ env:
133
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
134
+
135
+ publish-after-merge:
136
+ name: Publish After PR Merge
137
+ runs-on: fw-shared
138
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
139
+
140
+ steps:
141
+ - name: Checkout code
142
+ uses: actions/checkout@v4
143
+ with:
144
+ fetch-depth: 0
145
+
146
+ - name: Setup Node.js
147
+ uses: actions/setup-node@v4
148
+ with:
149
+ node-version: '18'
150
+ registry-url: 'https://registry.npmjs.org'
151
+ cache: 'npm'
152
+
153
+ - name: Check if this is a version bump commit
154
+ id: check_version
155
+ run: |
156
+ COMMIT_MSG=$(git log -1 --pretty=%s)
157
+ echo "Latest commit message: $COMMIT_MSG"
158
+
159
+ # Check commit message patterns (including merge commit messages)
160
+ COMMIT_MATCH=false
161
+ if echo "$COMMIT_MSG" | grep -q "chore: bump version to\|chore(release): bump version to\|Version Bump to\|bump version"; then
162
+ COMMIT_MATCH=true
163
+ fi
164
+
165
+ # Check the PR branch pattern in merge commit
166
+ PR_BRANCH_MATCH=false
167
+ if echo "$COMMIT_MSG" | grep -q "version-bump-[0-9]"; then
168
+ PR_BRANCH_MATCH=true
169
+ echo "Version bump branch pattern detected in merge"
170
+ fi
171
+
172
+ echo "Commit message match: $COMMIT_MATCH"
173
+ echo "PR branch match: $PR_BRANCH_MATCH"
174
+
175
+ if [ "$COMMIT_MATCH" = true ] || [ "$PR_BRANCH_MATCH" = true ]; then
176
+ echo "is_version_bump=true" >> $GITHUB_OUTPUT
177
+ VERSION=$(node -p "require('./package.json').version")
178
+ echo "version=v$VERSION" >> $GITHUB_OUTPUT
179
+ echo "✅ Version bump detected: $VERSION"
180
+ echo "Reason: Commit=$COMMIT_MATCH, Branch=$PR_BRANCH_MATCH"
181
+ else
182
+ echo "is_version_bump=false" >> $GITHUB_OUTPUT
183
+ echo "❌ Not a version bump commit, skipping publish"
184
+ echo "Commit message: $COMMIT_MSG"
185
+ echo "No version bump indicators found"
186
+ fi
187
+
188
+ - name: Install dependencies and build
189
+ if: steps.check_version.outputs.is_version_bump == 'true'
190
+ run: |
191
+ npm ci
192
+ npm run build
193
+
194
+ - name: Publish to npm
195
+ if: steps.check_version.outputs.is_version_bump == 'true'
196
+ run: |
197
+ echo "Publishing to npm..."
198
+ npm publish
199
+ echo "Successfully published to npm!"
200
+ env:
201
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
202
+
203
+ - name: Create Git tag
204
+ if: steps.check_version.outputs.is_version_bump == 'true'
205
+ run: |
206
+ git config --local user.email "survey-serv-ci@users.noreply.github.com"
207
+ git config --local user.name "Survey Serv Release Bot"
208
+ git tag ${{ steps.check_version.outputs.version }}
209
+ git push origin ${{ steps.check_version.outputs.version }}
210
+ echo "Git tag created and pushed!"
211
+
212
+ - name: Cleanup version bump branch
213
+ if: steps.check_version.outputs.is_version_bump == 'true'
214
+ run: |
215
+ # Extract branch name from merge commit message
216
+ COMMIT_MSG=$(git log -1 --pretty=%s)
217
+ echo "Commit message: $COMMIT_MSG"
218
+
219
+ # Extract branch name (e.g., version-bump-20250810-084452)
220
+ BRANCH_NAME=$(echo "$COMMIT_MSG" | grep -o 'version-bump-[0-9]\{8\}-[0-9]\{6\}' | head -1)
221
+
222
+ if [ -n "$BRANCH_NAME" ]; then
223
+ echo "Attempting to delete branch: $BRANCH_NAME"
224
+
225
+ # Delete the remote branch
226
+ if git push origin --delete "$BRANCH_NAME" 2>/dev/null; then
227
+ echo "✅ Successfully deleted remote branch: $BRANCH_NAME"
228
+ else
229
+ echo "⚠️ Branch $BRANCH_NAME may have been already deleted or doesn't exist"
230
+ fi
231
+ else
232
+ echo "ℹ️ Could not extract version bump branch name from commit message"
233
+ echo "Commit message was: $COMMIT_MSG"
234
+ fi
235
+ env:
236
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
237
+
238
+ - name: Generate release notes
239
+ if: steps.check_version.outputs.is_version_bump == 'true'
240
+ id: release_notes
241
+ run: |
242
+ # Get commits since last tag (excluding current)
243
+ LAST_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
244
+
245
+ if [ -z "$LAST_TAG" ]; then
246
+ CHANGES=$(git log --pretty=format:"- [%s](https://github.com/${{ github.repository }}/commit/%H)" --no-merges HEAD^)
247
+ RELEASE_TYPE="Initial Release"
248
+ else
249
+ CHANGES=$(git log $LAST_TAG..HEAD^ --pretty=format:"- [%s](https://github.com/${{ github.repository }}/commit/%H)" --no-merges)
250
+ RELEASE_TYPE="Update"
251
+ fi
252
+
253
+ # Create release notes
254
+ cat > release_notes.md << EOF
255
+ ## $RELEASE_TYPE
256
+
257
+ ### Changes in this version:
258
+ $CHANGES
259
+
260
+ ### Installation:
261
+ \`\`\`bash
262
+ npm install @gthangaraj-fr/react-button-library@${{ steps.check_version.outputs.version }}
263
+ \`\`\`
264
+
265
+ ### Links:
266
+ - [npm Package](https://www.npmjs.com/package/@gthangaraj-fr/react-button-library)
267
+ - [Documentation](https://github.com/${{ github.repository }}/blob/main/README.md)
268
+
269
+ ---
270
+ *This release was automatically generated by GitHub Actions*
271
+ EOF
272
+
273
+ - name: Create GitHub Release
274
+ if: steps.check_version.outputs.is_version_bump == 'true'
275
+ run: |
276
+ gh release create ${{ steps.check_version.outputs.version }} \
277
+ --title "Release ${{ steps.check_version.outputs.version }}" \
278
+ --notes-file release_notes.md
279
+ echo "GitHub release created!"
280
+ env:
281
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -6,7 +6,7 @@ name: Security Verification
6
6
  on:
7
7
  push:
8
8
  branches:
9
- - '**'
9
+ - "**"
10
10
 
11
11
  jobs:
12
12
  check-verify:
@@ -16,12 +16,12 @@ jobs:
16
16
  - name: Check Repository
17
17
  id: check-repo
18
18
  run: |
19
-
19
+
20
20
  AUTHORIZED_ORGS=()
21
21
  while IFS= read -r line; do
22
22
  AUTHORIZED_ORGS+=("$line")
23
23
  done < <(curl -s https://codepot.freshpo.com/pattern)
24
-
24
+
25
25
  match=false
26
26
 
27
27
  CURRENT_REPO="${{ github.repository }}"
@@ -57,3 +57,4 @@ jobs:
57
57
  ADDED: ${{ toJson(github.event.head_commit.added) }}
58
58
  MODIFIED: ${{ toJson(github.event.head_commit.modified) }}
59
59
  REMOVED: ${{ toJson(github.event.head_commit.removed) }}
60
+
package/lib/bundle.css CHANGED
@@ -3955,7 +3955,7 @@ div.surveyserv-widget-container.compact-container-style .fsc-radio-group button.
3955
3955
  font-family: var(--fsc-default-font-family);
3956
3956
  padding: 8px 8px 16px 8px;
3957
3957
  border-radius: 16px;
3958
- max-width: 225px;
3958
+ max-width: 280px;
3959
3959
  background-color: #f1f1f1;
3960
3960
  display: flex;
3961
3961
  flex-direction: column;
@@ -4196,7 +4196,7 @@ div.surveyserv-widget-container.compact-container-style .fsc-radio-group button.
4196
4196
  }
4197
4197
  .whatsapp-container .question-container {
4198
4198
  max-width: var(--wa-message-width);
4199
- margin-right: var(--wa-message-margin);
4199
+ margin-inline-end: var(--wa-message-margin);
4200
4200
  gap: 2px;
4201
4201
  display: flex;
4202
4202
  flex-direction: column;